Borrowing it
Nothing to install: this file belongs to chocks/locode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/chocks/locode/main/CLAUDE.mdgit clone --depth 1 https://github.com/chocks/locodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/chocks/locode/claude-md)<a href="https://agentmods.dev/instructions/chocks/locode/claude-md"><img src="https://agentmods.dev/badge/instructions/chocks/locode/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/chocks/locode/claude-md"><img src="https://agentmods.dev/badge/instructions/chocks/locode/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.01615 | $0.01615 |
| Opus 5.5 | $0.00646 | $0.00646 |
| Sonnet 5.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 1mo 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.
- 1mo 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 4mo ago), licensed MIT. It adds 1,615 tokens to every session, about $0.0065 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.