agentleFS
thoitiettxl-cyberthoitiettxl-cyber/Claw-II/skills/claude-code-termux-runbook/SKILL.md

claude-code-termux-runbook

Skill2 starsChanged 7 months agoMITView on GitHub

Runbook operates Claude Code on Termux with proxy API (cliproxy), including env setup/model mapping, auth/provider error triage, patch/rollback cli.js backup-first and mandatory verification.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write upstream patches or reverse-engineer the entire bundle.

    line 25
  2. Distinctive:

    If the operation requires a scope outside the runbook, stop and request a direction lock.

    line 52
  3. Very specific:

    If you need to patch cli.js: backup-first -> minimum patch -> verify runtime -> save rollback.

    line 59
  4. Very specific:

    Check whether the shell loads env.

    line 64
  5. Very specific:

    Check the alias mapping ANTHROPIC_DEFAULT_* and model catalog of the proxy.

    line 66
  6. Distinctive:

    Not runtime-fail; Handle with the old logout session if you want to clear the warning.

    line 68

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

claude-code-termux-runbook

Indexed Reference Map

  • @[SKILL.md#L1-L78] Frontmatter, trigger rules, SOP, output contract.
  • @[references/INDEX.md#L1-L21] Reading order + task routing map.
  • @[references/QUICK_REFERENCE.md#L1-L51] Quick command setup/check/verify.
  • @[references/CORE_API.md#L1-L37] Principle of model alias vs provider catalog + auth mode.
  • @[references/PATTERNS.md#L1-L33] Standard pattern and anti-pattern when manipulating.
  • @[references/EXAMPLES.md#L1-L56] Playbooks end-to-end theo symptom.
  • @[references/AI_WORKFLOW.md#L1-L38] The process executes when the user requests an operation.

Scope

  • In-scope:
    • Claude Code on Termux (Android) runs through ANTHROPIC_BASE_URL local proxy.
    • Env mapping ANTHROPIC_DEFAULT_{HAIKU|SONNET|OPUS}_MODEL, ANTHROPIC_MODEL.
    • Triage error Not logged in, auth conflict, provider/model mismatch.
    • Hotfix local cli.js theo backup-first + verify + rollback.
  • Out-of-scope:
    • Write upstream patches or reverse-engineer the entire bundle.
    • Automatically operate beyond the user's request.
    • Hard-delete artifact when there is no rollback path.

Reading Order

  1. references/INDEX.md
  2. references/QUICK_REFERENCE.md
  3. references/CORE_API.md
  4. references/PATTERNS.md
  5. references/EXAMPLES.md
  6. references/AI_WORKFLOW.md

Coverage Matrix

  • Setup runtime env + model mapping -> QUICK_REFERENCE.md, CORE_API.md
  • Diagnose login/auth/provider mismatch -> CORE_API.md, EXAMPLES.md
  • Patch/rollback cli.js secure -> PATTERNS.md, EXAMPLES.md
  • The assistant process operates according to user requests -> AI_WORKFLOW.md

Trigger Rules

  • Positive:
    • User requests "audit Claude Code Termux", "fix model mapping", "fix cli.js", "why does it say Not logged in even though there is an API key", "use cliproxy".
    • Log contains unknown provider for model, Not logged in, Auth conflict.
  • Negative:
    • Task unrelated to Claude Code/Termux/model routing.
    • Requires a coding feature unrelated to the Claude runtime.
  • Escalation:
    • Any changes to the runtime file (cli.js, launcher) must be backup-first and report a rollback path.
    • If the operation requires a scope outside the runbook, stop and request a direction lock.

SOP

  1. Confirm symptom + expected behavior.
  2. Collect minimal evidence: claude --version, active env, actual error.
  3. Classify errors by CORE_API.md (env missing / provider mismatch / auth conflict / code drift).
  4. Prioritize light fixes (env mapping, shell load) before patching the runtime.
  5. If you need to patch cli.js: backup-first -> minimum patch -> verify runtime -> save rollback.
  6. Report completion according to evidence (scope, path change, verify PASS/FAIL, rollback, risk).

Error Handling

  • Not logged in:
    • Check whether the shell loads env; verify ANTHROPIC_API_KEY + ANTHROPIC_BASE_URL.
  • unknown provider for model:
    • Check the alias mapping ANTHROPIC_DEFAULT_* and model catalog of the proxy.
  • Auth conflict:
    • Not runtime-fail; Handle with the old logout session if you want to clear the warning.
  • Patch failure or syntax break:
    • Restore right from backup and report FAIL + cause.

Output Contract

  • Artifact:
    • Important command outputs, changed file/path, backup path.
  • Validation:
    • Minimum 1 runtime probe (claude -p --model <mapped-model> ...) + exit code.
  • Compliance Verdict:
    • PASS|PARTIAL|FAIL + brief reason.

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.