Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/chocks/locode/claude-mdgit clone --depth 1 https://github.com/chocks/locodeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01615 | $0.01615 |
| Opus 5 | $0.00807 | $0.00807 |
| Sonnet 5 | $0.00323 | $0.00323 |
| Haiku 4.5 | $0.00161 | $0.00161 |
Grade C, and why
locode CLAUDE.md scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
4. **No shell strings** — use `execFileSync(cmd, args[])` not `execSync('cmd args')`. If a shell pipe is genuinely required (e.g., `curl | sh`), keep the shell form but add an inline comment explaining why Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
4. **No shell strings** — use `execFileSync(cmd, args[])` not `execSync('cmd args')`. If a shell pipe is genuinely required (e.g., `curl | sh`), keep the shell form but add an inline comment explaining why Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
4. **No shell strings** — use `execFileSync(cmd, args[])` not `execSync('cmd args')`. If a shell pipe is genuinely required (e.g., `curl | sh`), keep the shell form but add an inline comment explaining why How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Locode — Claude Code Instructions
Project
TypeScript CLI that routes tasks between Ollama (local LLM) and Claude based on task complexity. Goal: measurable token savings.
Essential Commands
npm install # install deps
npm test # run vitest (must pass before any commit)
npm run build # tsc compile → dist/
npm run dev # ts-node src/index.ts (no build needed)
./dist/src/index.js # run compiled CLI (after build)
Dev Workflow
All changes go through a branch + PR:
git checkout -b fix/<issue> # or feat/<feature>
# make changes, npm test, npm run build
git push -u origin <branch>
gh pr create --fill
Never commit directly to main. PRs require passing tests (prepublishOnly enforces this on publish).
Release Process
Releases are tag-driven. CI never commits to main. The publish workflow fires on any v* tag push.
# 1. Create a release branch from clean main
git checkout main && git pull
git checkout -b release/vX.Y.Z
# 2. Bump version in package.json only (no commit, no tag)
npm run release:patch # or release:minor / release:major
# 3. Commit the version bump and open a PR
git add package.json package-lock.json
git commit -S -m "chore: release vX.Y.Z"
git push -u origin release/vX.Y.Z
gh pr create --fill
# 4. After PR is merged, push a signed tag from local main
git checkout main && git pull
VERSION="v$(node -p "require('./package.json').version")"
git tag -s "$VERSION" -m "Release $VERSION"
git push origin "$VERSION"
Key rules:
- Never run
npm versionwithout--no-git-tag-versionin the bump step — the tag must be created after merge, not before - Never push the tag before the PR is merged — the tag should point to the commit on
main - The publish workflow (
.github/workflows/publish.yml) handles build, test, npm publish, and GitHub Release creation automatically
Non-negotiable Rules
- TDD always — write failing test, run it, implement, confirm pass, commit
- All tests must pass before committing — run
npm test - Build must succeed — run
npm run buildand fix TypeScript errors - No shell strings — use
execFileSync(cmd, args[])notexecSync('cmd args'). If a shell pipe is genuinely required (e.g.,curl | sh), keep the shell form but add an inline comment explaining why - Shell allow-list —
src/tools/shell.tsusesALLOWED_COMMANDSSet; never switch to deny-list - Config-driven models — never hardcode
'qwen3:8b'or'claude-sonnet-4-6'; useconfig.local_llm.modelandconfig.claude.model - No dead config — if you add a field to
src/config/schema.ts, wire it up somewhere - Never commit directly to
main— always create a branch (git checkout -b feat/<name>orfix/<name>), make changes there, then open a PR withgh pr create schema.tsis the single source of truth for defaults —locode.yamlandsetup.tsCONFIG_TEMPLATE must agree with the Zod defaults insrc/config/schema.ts. When changing a default, update the schema first, then sync the others- Path comparisons need a trailing separator — never use
path.startsWith(base)for directory containment checks; usepath === base || path.startsWith(base + path.sep)to prevent sibling-directory traversal (e.g.,/tmp/repo-evilmatching/tmp/repo) - No regex backtracking hazards — CodeQL runs on every PR. Avoid alternation patterns like
(?:A|B)*where A and B can match the same input. Prefer simple line-based scans over complex multi-line regex when parsing config/YAML
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 113 lines · 1,615 tokens per session scan C 2a094e35ff16
locode CLAUDE.md is an instructions file published in the GitHub repository chocks/locode (23 stars, last pushed 2mo ago), licensed MIT. It adds 1,615 tokens to every session, about $0.0081 per session on Opus 5. A static security scan graded it C with 3 findings (downloads and executes remote code, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
mcp-ollama-python AGENTS.md
Instructions for pblagoje/mcp-ollama-python, covering gitnexus — code intelligence, always do, never do, resources and cli.
mcp-ollama-python CLAUDE.md
Instructions for pblagoje/mcp-ollama-python, covering gitnexus — code intelligence, always do, never do, resources and cli.
ollama AGENTS.md
AGENTS.md instructions for ollama/ollama, covering agents.md and building.
ollama CLAUDE.md
Claude Code instructions for ollama/ollama: See AGENTS.md for the shared agent instructions for this repository.
pocketpaw CLAUDE.md
Instructions for pocketpaw/pocketpaw, covering claude.md, project overview, knowledge base, search the kb from terminal and show a specific module's wiki.
MaxKB CLAUDE.md
Claude Code instructions for 1Panel-dev/MaxKB, covering claude.md, project overview, development commands, database / static and architecture.