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-safety when the turn includes shell.
- Never load the catalog; read only the
SKILL.md you chose and its
pointer.
- Never remint an id that already exists, such as
golang-*,
modern-python or shell-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, modern-web-guidance, astryx. modern-web-guidance is
a reference pack for browser UI code and astryx a reference for the
Astryx design system; neither is a language skill, and neither counts
toward the one-language limit.
- If the turn includes shell,
shell-safety may also load with the
one language skill.
- When a debug skill loads, load one of
debug, debug-pocock or
debug-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.json or a *.ts or
*.tsx file exists.
- If any
.cpp or .hpp file is in the change, load lang-cpp. Never
load lang-c beside 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
*.proto files own ≥80% of the change and any hand-edited host
code changed, load lang-protobuf and 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.md and 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"
1---2name: language-router3description: 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.4metadata:5 source: https://skillmd.com/skills/alexderz/language-router6---78# Language router910Load this skill on every **code turn**: a turn that writes or reviews11code. This file owns three rules: the language map, the load-with list12and the no-language turns. It routes to existing ids and to the `lang-*`13guides in this pack. It has no `scripts/`.1415## Iron law1617**Load at most one language skill per turn.** A **language skill** is18`golang-safety`, `golang-testing`, `golang-security`, `modern-python`,19`shell-safety`, or a `lang-*` skill other than a pointer. A **pointer**20is `lang-go`, `lang-python` or `lang-shell`; a pointer does not count as21a load.2223- Load a second language skill only when the diff is genuinely24 mixed-language, or `shell-safety` when the turn includes shell.25- Never load the catalog; read only the `SKILL.md` you chose and its26 pointer.27- Never remint an id that already exists, such as `golang-*`,28 `modern-python` or `shell-safety`; load the existing id.2930## No-language turns3132A turn in this table loads no language skill.3334| Turn | Language skill |35| --- | --- |36| Onboarding turn (`sdlc-onboarding`) | none |37| Gather-only or refine-only turn (`discover-the-idea`) | none |38| Incoming-item Brief: problem, then fix vs removal ([Item brief](../sdlc/references/entry-brief-repo.md#item-brief)) | none |39| UX-only turn (`ux-design`) | none |40| Research-only turn (`buying-researcher`) | none |41| README-only, docs-only, git-only, planning-only or templates-only turn | none |4243## Load-with list44451. These process skills may load with the one language skill: `tdd`,46 `verify-before-done`, `pr-review`, `security-hardening`, `yagni`,47 `sdlc-artifacts`, `debug`, `docs-google-style`, `tracker-sdlc`,48 `ui-craft`, `modern-web-guidance`, `astryx`. `modern-web-guidance` is49 a reference pack for browser UI code and `astryx` a reference for the50 Astryx design system; neither is a language skill, and neither counts51 toward the one-language limit.522. If the turn includes shell, `shell-safety` may also load with the53 one language skill.543. When a debug skill loads, load **one** of `debug`, `debug-pocock` or55 `debug-anthropic`. Never load two of them in one turn.5657## Map5859Match files to a row. The Load column names the language skill.6061| Files / signals | Load |62| --- | --- |63| `*.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`. |64| `*.py`, `pyproject.toml`, `uv.lock` | `modern-python`. Pointer: `lang-python`. |65| `*.sh`, `*.bash`, shebang sh/bash, agent shell | `shell-safety`. Pointer: `lang-shell`. |66| `*.rs`, `Cargo.toml` | `lang-rust` |67| `*.ts`, `*.tsx`, `*.js`, `*.mjs`, `*.cjs`, `tsconfig.json`, `package.json` | `lang-js-ts` |68| `*.c`, `*.h` and no C++ files | `lang-c` |69| `*.cpp`, `*.cc`, `*.cxx`, `*.hpp` | `lang-cpp` |70| `*.cs`, `*.csproj`, `*.sln` | `lang-csharp` |71| `*.java`, `pom.xml`, `build.gradle` | `lang-java` |72| `*.kt`, `*.kts` | `lang-kotlin` |73| `*.rb`, `Gemfile` | `lang-ruby` |74| `*.php`, `composer.json` | `lang-php` |75| `*.swift`, `Package.swift` | `lang-swift` |76| `*.dart`, `pubspec.yaml` | `lang-dart` |77| `*.sql` | `lang-sql` |78| `*.html`, `*.htm`, `*.css`, `*.scss` | `lang-web-markup` |79| `Dockerfile`, `*.dockerfile`, `compose.y*ml` | `lang-docker` |80| `*.tf`, `*.hcl` | `lang-terraform` |81| `Makefile`, `GNUmakefile` | `lang-makefile` |82| `*.ps1`, `*.psm1` | `lang-powershell` |83| `*.proto` | `lang-protobuf` |84| `*.lua` | `lang-lua` |8586Pointers exist so every identified language has a file. Reading a87pointer is optional; it routes to the language skill in its row.8889`*.tsx` loads `lang-js-ts`, not `lang-web-markup`, unless the change is90primarily markup or CSS.9192### Family rules9394- TypeScript wins over JavaScript when `tsconfig.json` or a `*.ts` or95 `*.tsx` file exists.96- If any `.cpp` or `.hpp` file is in the change, load `lang-cpp`. Never97 load `lang-c` beside it.98- React, Spring, Rails, FastAPI and Flutter are frameworks, not language99 skills. Never create a framework skill mid-session; load the language100 skill its files map to.101102## Stubs103104Elixir, Scala, Haskell, Zig, Solidity, Perl, Objective-C, R and Assembly105have no skill body. For a stub language, load no language skill, say106so, and use the official docs only. Never create a pack for it.107108## Algorithm1091101. If the turn is a no-language turn, load no language skill. Stop111 routing.1122. List the files this turn will read or write.1133. Match each file to a Map row. Extensions and well-known file names114 beat chat keywords.1154. If a file's language is a stub, follow Stubs for it.1165. If `*.proto` files own ≥80% of the change and any hand-edited host117 code changed, load `lang-protobuf` and the host language skill.118 Otherwise, if one language owns ≥80% of the change, load that119 language skill only.1206. If two languages are first-class in the change, such as SQL and its121 host language, TSX and a stylesheet, or proto and hand-edited host122 code, load both.1237. Read the chosen `SKILL.md`. Stop routing. Never summarize the124 catalog; name only the skill you load.125126## Never127128- Never add a second methodology router beside this repo's ids; route129 with this file.130- Never paste official style guides into context "just in case"; read131 only the chosen `SKILL.md` and its pointer.132133## Red flags134135If you think one of these, stop and reread the iron law:136137- "Load Go testing and safety and security to be thorough"138- "Polyglot repo, load every matching skill"139- "Install the vendor language pack instead of the id in this repo"