agentleFS
yeaight7yeaight7/agent-powerups/skills/environment-doctor/SKILL.md

environment-doctor

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

Use when apx commands fail or assets are missing from listings, MCP servers fail to start, builds hit command-not-found or module-not-found errors, generated assets look stale, or setup works on one machine but not another.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a fresh clone or environment reset

    line 18
  2. Distinctive:

    Run each and note missing or wrong-version ones:

    line 31
  3. Very specific:

    If apx is not found:

    line 50
  4. Very specific:

    Check global npm packages: npm list -g agent-powerups

    line 51
  5. Very specific:

    Check PATH: echo $PATH (bash/zsh) or $env:PATH (PowerShell)

    line 52
  6. Very specific:

    If paths are empty or missing: verify APX_REPO_ROOT or the install path passed to apx.

    line 112
  7. Distinctive:

    All required commands found at expected versions

    line 150
  8. Distinctive:

    All active MCP configs pass check and smoke

    line 152
  9. Distinctive:

    No required env vars missing

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Environment Doctor

Systematically diagnose why the agent environment, project tooling, or Agent Powerups installation is not working as expected.

When to Use

  • apx commands fail with unexpected errors or "not found"
  • MCP servers fail to start or respond
  • Skills or commands are missing from apx list
  • Build or test commands fail with "command not found" or "module not found"
  • Generated assets appear stale (catalog, README, types)
  • Setup works on one machine but not another
  • After a fresh clone or environment reset

Inputs

  • Platform: Claude Code, Codex, Gemini CLI, or generic shell
  • Agent root path (if APX_REPO_ROOT is set, note its value)
  • The exact error or symptom observed
  • Output of any failing command

Workflow

1. Check required commands

Run each and note missing or wrong-version ones:

node --version        # 18+ for most Agent Powerups tooling
npx --version
python --version      # 3.9+ for validate scripts
git --version
apx --version         # Agent Powerups CLI
docker --version      # only if using Docker-based MCP configs

2. Verify Agent Powerups installation

apx list
apx validate skills
apx validate catalog

If apx is not found:

  • Check global npm packages: npm list -g agent-powerups
  • Check PATH: echo $PATH (bash/zsh) or $env:PATH (PowerShell)
  • Reinstall or re-add to PATH per docs/installation.md

3. Check MCP configs

For each MCP config that should be active:

apx mcp check <name>   # prerequisites: required commands, env vars
apx mcp smoke <name>   # launch test: does the server actually start?

Common failures:

SymptomLikely causeFix
docker: command not foundDocker not installedInstall Docker
docker: not runningDocker daemon stoppedStart Docker Desktop
GITHUB_TOKEN not setMissing env varSet in shell profile
Server starts then crashesPackage not cachedRun npx -y <package> once
${REPO_ROOT} literal in argsPlaceholder not replacedSubstitute actual path in config

4. Validate catalog and skills

python scripts/validate-catalog.py
python scripts/validate-skills.py

Each error line names the asset and the exact failing field. Fix in order.

5. Check for stale generated assets

git status --short
git diff --stat

Stale generated files will show as modified. Re-run the generator script to bring them current.

6. Check environment variables

List what is expected versus what is set — show presence, not values:

# bash/zsh
printenv | grep -E "GITHUB|CONTEXT7|OPENAI|ANTHROPIC" | sed 's/=.*/=SET/'

# PowerShell
Get-ChildItem Env: | Where-Object { $_.Name -match "GITHUB|CONTEXT7" } | Select-Object Name

7. Check paths

ls <agent-root>/skills/
ls <agent-root>/commands/
ls <agent-root>/mcp/

If paths are empty or missing: verify APX_REPO_ROOT or the install path passed to apx.

Output

ENVIRONMENT DOCTOR REPORT

Platform: <claude-code / codex / gemini-cli / generic>
Agent root: <path or "not set">

REQUIRED COMMANDS:
  node: 20.x ✓ / MISSING ✗
  npx: ✓ / MISSING
  python: 3.11 ✓ / MISSING
  git: ✓ / MISSING
  apx: 0.x ✓ / MISSING

MCP CONFIGS:
  <name>: check OK / FAIL — <reason>
  <name>: smoke OK / FAIL — <reason>

ASSET VALIDATION:
  catalog: PASS / FAIL — [N errors]
  skills:  PASS / FAIL — [N errors]

STALE GENERATED ASSETS: none / [list]

MISSING ENV VARS: none / [list of names only, no values]

BLOCKERS (must fix before proceeding):
  - [item]

NON-BLOCKING:
  - [item]

Verification

  • All required commands found at expected versions
  • apx validate catalog and apx validate skills exit 0
  • All active MCP configs pass check and smoke
  • No required env vars missing

Failure Modes

  • apx not in PATH after install — reload shell profile (source ~/.zshrc) or restart terminal
  • Docker daemon not running for Docker-based MCP — start Docker Desktop before smoke
  • ${REPO_ROOT} literal in filesystem MCP args — substitute the actual absolute path
  • APX_REPO_ROOT pointing to a stale path after a repo move — update the env var

Sources / Inspiration

Inspired by Yeachan-Heo/oh-my-codex skills/doctor/SKILL.md. Rewritten in Agent Powerups style with multi-platform coverage for Claude Code, Codex, Gemini CLI, and generic shell environments.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.