SuperAPI AI Directory

eliteforge-agent-must-known

Deployment & operations

View repository

Updated 10-16 05:02

About this skill

EliteForge Agent Must-Know Essentials

Trigger Threshold

Use this skill only when the user explicitly states that the current project follows 璀璨工坊规范 or eliteforge specification . If the user has not made such a project-level declaration, do not enable this skill; handle it as a general capability.

Goal

Do only one thing: determine whether the current machine can continue executing the relevant development tasks; if it cannot, automatically fill in the gaps as much as possible based on the current system's existing capabilities.

Base Version Requirements

  • Java/Javac: The major version must be 25 or above.
  • Maven: Must be 3.9.10 or above.

Environment Variables

  • ELITEFORGE_GIT_USER_NAME,SCREAMING_SNAKE_CASE [optional] Git user.name value used only when Git identity is missing and the current shell already provides this value.
  • ELITEFORGE_GIT_USER_EMAIL,SCREAMING_SNAKE_CASE [optional] Git user.email value used only when Git identity is missing and the current shell already provides this value.

Must First Confirm

Before writing to hosts, you must ask the user for their office location:

  • Chongqing office: use references/cq-required-hosts.txt, script parameter is --office cq
  • Beijing office: use references/bj-required-hosts.txt, script parameter is --office bj

If the user has not confirmed their office location, only diagnostics and non-hosts fixes are allowed; do not guess the hosts configuration.

Workflow

  1. First confirm whether the user is at the Chongqing office or the Beijing office.

  2. Run report mode, diagnose only without writing.report A return code of 2 means the environment is not ready, and does not indicate a script error.

python3 scripts/bootstrap_env.py --mode report --office cq
python3 scripts/bootstrap_env.py --mode report --office bj
  1. If the report shows the environment is incomplete, after confirming with the user whether to automatically repair it, run apply mode.
python3 scripts/bootstrap_env.py --mode apply --office cq
python3 scripts/bootstrap_env.py --mode apply --office bj
  1. If automatic installation is blocked by system permissions, report the missing items and the permission conditions the user needs to handle. Do not fake a successful installation.

  2. Only install the internal CLI when subsequent tasks really do need to operate on the internal platform.

python3 scripts/bootstrap_env.py --mode apply --office cq --install-internal-clis
  1. After the repair, run reportonce more to output the final status.

What the Script Is Responsible For

  • Identify system information: operating system, platform, architecture, Shell, PATH, home directory, hosts file path.
  • Identify system tools:git、python3、node、npm、npx、pipx、jq、rg、mvn、pnpm、java、javac、curl、wget、sudo , etc.
  • Identify SDKMAN and package managers: SDKMAN,brew、apt-get、dnf、yum、pacman、zypper、winget、choco。
  • By default, only scan the skills/eliteforge-*/SKILL.md section in each ## Environment Variables top-level file, and identify skill environment variables according to the eliteforge-skill-spec format specified by `VAR_NAME,SCREAMING_SNAKE_CASE` [optional|required|conditional] desc ; report only variable names and missing status, do not print variable values.
  • Attempt to install required commands:git、python3、node、npm、npx、pipx、jq、rg、pnpm, Java/Javac 25 or above, Maven 3.9.10 or above.
  • When automatically installing Java/Javac and Maven, if the current machine already has SDKMAN installed and it can be initialized, installation must be prioritized through SDKMAN; if SDKMAN is unavailable or installation fails, then fall back to the system package manager.
  • Install required Python CLI packages via pipx :pre-commit。
  • Configure the npm private registry for ~/.npmrc .
  • Configure the pip private registry for ~/.pip/pip.conf .
  • Check Git global configuration:
    • user.name must be configured and must not be a placeholder; using a personal Chinese name is recommended, but Chinese characters are not used as a readiness gate.
    • user.email must be configured and must not be a placeholder; using a valid company email is recommended.
    • init.defaultBranch=master
    • color.ui=auto
    • pager.branch=false
    • pager.status=false
    • core.quotePath=false
    • http.https://git.cisdigital.cn.proxy= null value
  • Rewrite the SSH address of git.cisdigital.cn to HTTPS.
  • Maintain per confirmed office location for /etc/hosts。

Security rules

  • Do not hardcode, commit to the repository, or directly print passwords, tokens, or shared credentials.
  • For private source credentials, refer to the online "must-know essentials" documentation; scripts only maintain non-sensitive source address configuration and do not require or read local private source credential environment variables.
  • Git personal identity configuration must not be written with placeholders.user.name/user.email The readiness check is based on "configured and not a placeholder"; non-Chinese names or non-standard email addresses are only advisory prompts, not blocking items. When missing, first report the user to run git config --global user.name "你的姓名" and git config --global user.email "公司邮箱"the script may automatically write these two items only when ELITEFORGE_GIT_USER_NAME、ELITEFORGE_GIT_USER_EMAIL is already provided by the current shell.
  • When private source authentication information is needed, prompt the user to write it to the local configuration themselves according to the online "must-know essentials" documentation; do not ask the user to send passwords or tokens in plaintext in the conversation.
  • If /etc/hosts the same domain name in the file already points to another IP, do not overwrite it; a conflict must be reported.
  • Writing hosts only maintains the script-marked block; do not clear the user's existing content.
  • System installation and hosts writing only attempt what can be done automatically; when interactive sudo, administrator privileges, account activation, or project authorization is needed, report it as blocked.
  • git.cisdigital.cn Prefer HTTPS; do not require the user to switch to SSH cloning.

Script parameters

  • --mode report|apply:report check only;apply write safe fixes and attempt to install missing dependencies.
  • --office cq|bj: required business parameter, confirmed by the user; for Chongqing use cq, for Beijing use bj。
  • --package-manager auto|brew|apt-get|dnf|yum|pacman|zypper|winget|choco: force specify when automatic detection is inaccurate. This parameter only controls the system package manager fallback path; Java/Javac and Maven still preferentially try SDKMAN.
  • --home-dir and --hosts-file: can point to temporary paths for verification without polluting the real machine.
  • --skills-root: specify the directory where the eliteforge-* skill is located; by default it is inferred from the script location as the repository skills directory.
  • --skip-install: skip tool installation, but still apply configuration file fixes.
  • --install-internal-clis: install or upgrade the internal Python CLI via pipx .

Output rules

  • The summary must be short and actionable, covering at least:system、SDKMAN、package manager、tools、hosts、npm/pip mirrors、git global config、git https rewrite、pipx packages、skill_env_vars、remaining blockers。
  • If applywas run, you must clearly state which files were changed, which installation commands were executed, and which items were blocked by permissions or accounts.
  • skill_env_vars must be reported separately for the three categories missing_required、missing_conditional、optional_unset ; only missing_required and the already-triggered missing_conditional are environment readiness blockers.
  • If skill_env_vars.missing_required or skill_env_vars.missing_conditional is non-empty, you must prompt the user to configure the corresponding environment variables; do not ask the user to send passwords or tokens in plaintext in the conversation.
  • For matters that still require human handling, point out the specific conditions or files; do not copy reference materials verbatim in full paragraphs.

Reference materials

  • references/onboarding-checklist.md: human prerequisites, private source credentials, security boundaries.
  • references/cq-required-hosts.txt: Chongqing office hosts.
  • references/bj-required-hosts.txt: Beijing office hosts.