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
In this repository47 other files it gives its agents.
- brainstormingSkill
- cli-patcherSkill
- code-review-workflowSkill
- commit-commandsSkill
- consulting-analysisSkill
- context7-cleanSkill
- data-analysisSkill
- deep-researchSkill
- edit-tool-compat-guardSkill
- env-managerSkill
- executing-plansSkill
- feature-devSkill
- firecrawlSkill
- frontend-designSkill
- gateway-device-pairingSkill
- githubSkill
- glibc-prebuilt-bundleSkill
- gogSkill
- image-generationSkill
- memory-setupSkill
- module-auditorSkill
- module-scaffoldSkill
- openclaw-config-guardianSkill
- openclaw-ollama-runtime-kbSkill
- plugin-cutover-guardianSkill
- plugin-runtime-guardianSkill
- python-env-managerSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-benchSkill
- skill-creatorSkill
- skill-unificationSkill
- skill-vetterSkill
- socratic-groundingSkill
- subagent-orchestrationSkill
- systematic-debuggingSkill
- tailscale-oauth-bridgeSkill
- termux-packagerSkill
- termux-runnerSkill
- test-driven-developmentSkill
- vercel-deploy-claimableSkill
- verification-before-completionSkill
- video-generationSkill
- workspace-cleanupSkill
- writing-plansSkill
- yt-dlp-ingest-firstSkill
- zero-downtime-cutoverSkill
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
- Distinctive: line 25
Write upstream patches or reverse-engineer the entire bundle.
- Distinctive: line 52
If the operation requires a scope outside the runbook, stop and request a direction lock.
- Very specific: line 59
If you need to patch cli.js: backup-first -> minimum patch -> verify runtime -> save rollback.
- Very specific: line 64
Check whether the shell loads env.
- Very specific: line 66
Check the alias mapping ANTHROPIC_DEFAULT_* and model catalog of the proxy.
- Distinctive: line 68
Not runtime-fail; Handle with the old logout session if you want to clear the warning.
≈ “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.
Files
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_URLlocal proxy. - Env mapping
ANTHROPIC_DEFAULT_{HAIKU|SONNET|OPUS}_MODEL,ANTHROPIC_MODEL. - Triage error
Not logged in, auth conflict, provider/model mismatch. - Hotfix local
cli.jstheo backup-first + verify + rollback.
- Claude Code on Termux (Android) runs through
- 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
references/INDEX.mdreferences/QUICK_REFERENCE.mdreferences/CORE_API.mdreferences/PATTERNS.mdreferences/EXAMPLES.mdreferences/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.jssecure ->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.
- Any changes to the runtime file (
SOP
- Confirm symptom + expected behavior.
- Collect minimal evidence:
claude --version, active env, actual error. - Classify errors by
CORE_API.md(env missing / provider mismatch / auth conflict / code drift). - Prioritize light fixes (env mapping, shell load) before patching the runtime.
- If you need to patch
cli.js: backup-first -> minimum patch -> verify runtime -> save rollback. - 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.
- Check whether the shell loads env; verify
unknown provider for model:- Check the alias mapping
ANTHROPIC_DEFAULT_*and model catalog of the proxy.
- Check the alias mapping
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.
- Minimum 1 runtime probe (
- Compliance Verdict:
PASS|PARTIAL|FAIL+ brief reason.
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
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.

