language-router
Skill5 starsChanged 46 days agoMITView on GitHub
use this on any turn that writes or reviews code. it owns the language map, the process skills that may load with the one language skill, and the turns that load no language skill; pick at most one language skill. do not use for docs-only, git-only, or planning-only turns.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- maintainers/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- buying-researcherSkill
- cursor-cloud-agents-whenSkill
- debug-anthropicSkill
- debug-pocockSkill
- debugSkill
- discover-the-ideaSkill
- docs-google-styleSkill
- golang-safetySkill
- golang-securitySkill
- golang-testingSkill
- grok-acpSkill
- host-config-pyinfraSkill
- lang-cppSkill
- lang-csharpSkill
- lang-cSkill
- lang-dartSkill
- lang-dockerSkill
- lang-goSkill
- lang-javaSkill
- lang-js-tsSkill
- lang-kotlinSkill
- lang-luaSkill
- lang-makefileSkill
- lang-phpSkill
- lang-powershellSkill
- lang-protobufSkill
- lang-pythonSkill
- lang-rubySkill
- lang-rustSkill
- lang-shellSkill
- lang-sqlSkill
- lang-swiftSkill
- lang-terraformSkill
- lang-web-markupSkill
- modern-pythonSkill
- pr-reviewSkill
- sdlc-artifactsSkill
- sdlc-onboardingSkill
- security-hardeningSkill
- shell-safetySkill
- tddSkill
- tracker-sdlcSkill
- ui-craftSkill
- ux-designSkill
- verify-before-doneSkill
- yagniSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Never load the catalog; read only the SKILL.md you chose and its pointer.
- Very specific: line 25
Never remint an id that already exists, such as golang-*, modern-python or shell-safety.
- Very specific: line 47
If the turn includes shell, shell-safety may also load with the one language skill.
- Very specific: line 49
When a debug skill loads, load one of debug, debug-pocock or debug-anthropic.
- Very specific: line 91
If any .cpp or .hpp file is in the change, load lang-cpp.
- Distinctive: line 105
If the turn is a no-language turn, load no language skill.
- Distinctive: line 110
If a file's language is a stub, follow Stubs for it.
- Very specific: line 111
If *.proto files own ≥80% of the change and any hand-edited host code changed, load lang-protobuf and the host language skill.
- Distinctive: line 115
If two languages are first-class in the change, such as SQL and its host language, TSX and a stylesheet, or proto and hand-edited host …
- Very specific: line 118
Read the chosen SKILL.md. Stop routing.
- Distinctive: line 123
Never add a second methodology router beside this repo's ids.
- Very specific: line 125
Never paste official style guides into context "just in case".
- Distinctive: line 130
If you think one of these, stop and reread the iron law:
≈ “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
Language router
Load this skill on every code turn: a turn that writes or reviews
code. This file owns three rules: the language map, the load-with list
and the no-language turns. It routes to existing ids and to the lang-*
guides in this pack. It has no scripts/.
Iron law
Load at most one language skill per turn. A language skill is
golang-safety, golang-testing, golang-security, modern-python,
shell-safety, or a lang-* skill other than a pointer. A pointer
is lang-go, lang-python or lang-shell; a pointer does not count as
a load.
- Load a second language skill only when the diff is genuinely
mixed-language, or
shell-safetywhen the turn includes shell. - Never load the catalog; read only the
SKILL.mdyou chose and its pointer. - Never remint an id that already exists, such as
golang-*,modern-pythonorshell-safety; load the existing id.
No-language turns
A turn in this table loads no language skill.
| Turn | Language skill |
Onboarding turn (sdlc-onboarding) | none |
Gather-only or refine-only turn (discover-the-idea) | none |
| Incoming-item Brief: problem, then fix vs removal (Item brief) | none |
UX-only turn (ux-design) | none |
Research-only turn (buying-researcher) | none |
| README-only, docs-only, git-only, planning-only or templates-only turn | none |
Load-with list
- These process skills may load with the one language skill:
tdd,verify-before-done,pr-review,security-hardening,yagni,sdlc-artifacts,debug,docs-google-style,tracker-sdlc,ui-craft. - If the turn includes shell,
shell-safetymay also load with the one language skill. - When a debug skill loads, load one of
debug,debug-pocockordebug-anthropic. Never load two of them in one turn.
Map
Match files to a row. The Load column names the language skill.
| Files / signals | Load |
*.go, go.mod | One of: golang-safety by default; golang-testing when writing or changing tests or test tables, or when the change touches races or goleak; golang-security when the change touches input, auth, HTTP, SQL, files, subprocesses, or crypto. Pointer: lang-go. |
*.py, pyproject.toml, uv.lock | modern-python. Pointer: lang-python. |
*.sh, *.bash, shebang sh/bash, agent shell | shell-safety. Pointer: lang-shell. |
*.rs, Cargo.toml | lang-rust |
*.ts, *.tsx, *.js, *.mjs, *.cjs, tsconfig.json, package.json | lang-js-ts |
*.c, *.h and no C++ files | lang-c |
*.cpp, *.cc, *.cxx, *.hpp | lang-cpp |
*.cs, *.csproj, *.sln | lang-csharp |
*.java, pom.xml, build.gradle | lang-java |
*.kt, *.kts | lang-kotlin |
*.rb, Gemfile | lang-ruby |
*.php, composer.json | lang-php |
*.swift, Package.swift | lang-swift |
*.dart, pubspec.yaml | lang-dart |
*.sql | lang-sql |
*.html, *.htm, *.css, *.scss | lang-web-markup |
Dockerfile, *.dockerfile, compose.y*ml | lang-docker |
*.tf, *.hcl | lang-terraform |
Makefile, GNUmakefile | lang-makefile |
*.ps1, *.psm1 | lang-powershell |
*.proto | lang-protobuf |
*.lua | lang-lua |
Pointers exist so every identified language has a file. Reading a pointer is optional; it routes to the language skill in its row.
*.tsx loads lang-js-ts, not lang-web-markup, unless the change is
primarily markup or CSS.
Family rules
- TypeScript wins over JavaScript when
tsconfig.jsonor a*.tsor*.tsxfile exists. - If any
.cppor.hppfile is in the change, loadlang-cpp. Never loadlang-cbeside it. - React, Spring, Rails, FastAPI and Flutter are frameworks, not language skills. Never create a framework skill mid-session; load the language skill its files map to.
Stubs
Elixir, Scala, Haskell, Zig, Solidity, Perl, Objective-C, R and Assembly have no skill body. For a stub language, load no language skill, say so, and use the official docs only. Never create a pack for it.
Algorithm
- If the turn is a no-language turn, load no language skill. Stop routing.
- List the files this turn will read or write.
- Match each file to a Map row. Extensions and well-known file names beat chat keywords.
- If a file's language is a stub, follow Stubs for it.
- If
*.protofiles own ≥80% of the change and any hand-edited host code changed, loadlang-protobufand the host language skill. Otherwise, if one language owns ≥80% of the change, load that language skill only. - If two languages are first-class in the change, such as SQL and its host language, TSX and a stylesheet, or proto and hand-edited host code, load both.
- Read the chosen
SKILL.md. Stop routing. Never summarize the catalog; name only the skill you load.
Never
- Never add a second methodology router beside this repo's ids; route with this file.
- Never paste official style guides into context "just in case"; read
only the chosen
SKILL.mdand its pointer.
Red flags
If you think one of these, stop and reread the iron law:
- "Load Go testing and safety and security to be thorough"
- "Polyglot repo, load every matching skill"
- "Install the vendor language pack instead of the id in this repo"
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.

