agentleFS
Fable-ForgeFable-Forge/fableforge-agent-skills/skills/windows-ai-cli-recovery/SKILL.md

windows-ai-cli-recovery

Skill1 starsChanged 53 days agoMITView on GitHub

Use when diagnosing Windows AI CLI or app problems for Codex, Claude Code, npm-installed CLIs, PowerShell command lookup, PATH, execution policy, proxy env files, reconnect loops, Codex Desktop status messages, missing claude/codex commands, WindowsApps or sandbox popups, or verifying local .codex/.claude skills and config on this machine.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to restore the simple command the user expects, such as codex or claude, on Windows PowerShell.

    line 10
  2. Distinctive:

    Prefer read-only checks before edits.

    line 16
  3. Distinctive:

    Do not expose secrets from config files.

    line 17
  4. Very specific:

    When reading .env, show only proxy endpoints or non-secret settings that are needed for the task.

    line 18
  5. Distinctive:

    Before editing profile, PATH, or config files, explain the exact file or setting being changed.

    line 19
  6. Distinctive:

    Verify current state with narrow commands.

    line 30
  7. Very specific:

    Use npm config get prefix and inspect the npm global bin directory.

    line 32
  8. Very specific:

    Use Get-Item / Test-Path for expected .cmd files.

    line 33
  9. Very specific:

    Use Get-NetTCPConnection only for local proxy port discovery.

    line 34
  10. Distinctive:

    Add the npm global directory to the user PATH when the executable exists but cannot be found.

    line 37
  11. Very specific:

    Prefer <tool>.cmd when .ps1 is blocked.

    line 38
  12. Distinctive:

    Add a PowerShell profile function only when the user explicitly wants the bare command and PATH/execution policy alone does not restore it.

    line 39
  13. Distinctive:

    Verify the restored workflow.

    line 42
  14. Very specific:

    Run the exact command the user wants, such as claude --version or codex --version.

    line 43
  15. Distinctive:

    If a new shell is required, provide the one-line temporary PATH refresh and the permanent explanation.

    line 44

≈ “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

Windows AI CLI Recovery

Overview

Use this skill to restore the simple command the user expects, such as codex or claude, on Windows PowerShell. Verify the current machine state first, then apply the smallest reversible fix.

For concrete command patterns and decision points, read references/windows-cli-checks.md when the task involves PATH, npm global bin, proxy ports, PowerShell profiles, execution policy, or Codex Desktop state.

Safety Rules

  • Prefer read-only checks before edits.
  • Do not expose secrets from config files.
  • When reading .env, show only proxy endpoints or non-secret settings that are needed for the task.
  • Before editing profile, PATH, or config files, explain the exact file or setting being changed.
  • Preserve the user's preferred command shape when possible. If they want to type claude, restore claude, not a long command they must memorize.

Workflow

  1. Classify the failure.
    • Command not found: inspect command lookup, npm global bin, PATH, and installed files.
    • PowerShell script blocked: check whether .cmd works while .ps1 is blocked.
    • Reconnect/proxy issue: inspect local proxy listener and Codex .env.
    • Codex Desktop message: explain whether it is app state, context compression, review UI, or project file state.
  2. Verify current state with narrow commands.
    • Use Get-Command <name> -All.
    • Use npm config get prefix and inspect the npm global bin directory.
    • Use Get-Item / Test-Path for expected .cmd files.
    • Use Get-NetTCPConnection only for local proxy port discovery.
  3. Choose the smallest fix.
    • Add the npm global directory to the user PATH when the executable exists but cannot be found.
    • Prefer <tool>.cmd when .ps1 is blocked.
    • Add a PowerShell profile function only when the user explicitly wants the bare command and PATH/execution policy alone does not restore it.
    • For Codex proxy, write or verify C:\Users\<user>\.codex\.env only after confirming the local proxy port.
  4. Verify the restored workflow.
    • Run the exact command the user wants, such as claude --version or codex --version.
    • If a new shell is required, provide the one-line temporary PATH refresh and the permanent explanation.

Output Expectations

End with:

  • root cause in one or two sentences
  • exact setting or file changed, if any
  • verified command output or remaining blocker
  • the shortest command the user should use next

Known Patterns

  • npm global CLIs on Windows often install to %APPDATA%\npm as .cmd and .ps1 shims.
  • PowerShell may block .ps1 shims while .cmd works.
  • A new PowerShell window may be required after changing user PATH.
  • Codex proxy config belongs in C:\Users\<user>\.codex\.env with HTTP_PROXY and HTTPS_PROXY.
  • A Codex "complete content failed to load" review message can be a UI/diff loading problem, not proof that edited files are broken.
  • "Automatic context compression" means the app is summarizing a long thread so work can continue; it is not by itself a failure.

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.