SuperAPI AI Directory

eliteforge-agent-doctor

Agents & models

View repository

Updated 10-16 05:02

About this skill

EliteForge Agent Doctor

Objective

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

Base version requirements

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

Must confirm first

Before writing to hosts, you must clearly 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 works in Chongqing or Beijing.

  2. Run report mode, diagnostics 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 a subsequent task actually needs to operate on the internal platform.

python3 scripts/bootstrap_env.py --mode apply --office cq --install-internal-clis
  1. After repairing, run reportonce more, and 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 each skills/eliteforge-*/SKILL.md top-level file's ## Environment Variables section, and identify skill environment variables according to the eliteforge-skill-spec specified `ELITEFORGE_SKILL_<ABBR>_<PURPOSE>` [optional|required|conditional] desc format; only report variable names and missing status, do not print variable values.
  • Attempt to install the 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, SDKMAN must be prioritized for installation; if SDKMAN is unavailable or the installation fails, fall back to the system package manager.
  • Install the required Python CLI packages via pipx :pre-commit。
  • Configure ~/.npmrc 's npm private registry.
  • Configure ~/.pip/pip.conf 's pip private registry.
  • Check the 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= empty value
  • Rewrite git.cisdigital.cn 's SSH address to HTTPS.
  • Maintain according to the confirmed office location /etc/hosts。

Security rules

  • Do not hard-code, commit to the repository, or directly print passwords, Tokens, or shared credentials.
  • Private source credentials are governed by the online "must-know" documentation; the script only maintains non-sensitive source address configuration, and does not require or read local private source credential environment variables.
  • Git personal identity configuration must be performed manually by the user with git config --global user.name "你的姓名" and git config --global user.email "公司邮箱" ; the script does not write it automatically.user.name/user.email readiness determination is based on "configured and not a placeholder"; non-Chinese names or non-standard email addresses are only advisory prompts and are not blocking items.
  • When private source authentication information is needed, prompt the user to write it into the local configuration themselves according to the online "must-know" documentation; do not require the user to send passwords or Tokens in plaintext in the conversation.
  • If /etc/hosts already has the same domain pointing to another IP, do not overwrite it, and must report the conflict.
  • When writing hosts, only maintain the script marker 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 provisioning, or project authorization is needed, report it as a blocker.
  • git.cisdigital.cn HTTPS is preferred; do not require users to switch to SSH cloning.

Script parameters

  • --mode report|apply:report only checks;apply writes security fixes and attempts to install missing dependencies.
  • --office cq|bj: required business parameter, confirmed by the user; use cqfor Chongqing, and bj。
  • --package-manager auto|brew|apt-get|dnf|yum|pacman|zypper|winget|choco: force specification 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: specifies 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: installs or upgrades the internal Python CLI via pipx .

Output rules

  • The summary must be short and actionable, and at least cover: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, it 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 as missing_required、missing_conditional、optional_unset three categories; 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, the user must be prompted to configure the corresponding environment variables; do not require 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 wholesale.

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.