agentleFS
alexderzalexderz/agentic-toolbox/skills/language-router/SKILL.md

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.

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
  1. Very specific:

    Never load the catalog; read only the SKILL.md you chose and its pointer.

    line 23
  2. Very specific:

    Never remint an id that already exists, such as golang-*, modern-python or shell-safety.

    line 25
  3. Very specific:

    If the turn includes shell, shell-safety may also load with the one language skill.

    line 47
  4. Very specific:

    When a debug skill loads, load one of debug, debug-pocock or debug-anthropic.

    line 49
  5. Very specific:

    If any .cpp or .hpp file is in the change, load lang-cpp.

    line 91
  6. Distinctive:

    If the turn is a no-language turn, load no language skill.

    line 105
  7. Distinctive:

    If a file's language is a stub, follow Stubs for it.

    line 110
  8. Very specific:

    If *.proto files own ≥80% of the change and any hand-edited host code changed, load lang-protobuf and the host language skill.

    line 111
  9. Distinctive:

    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 …

    line 115
  10. Very specific:

    Read the chosen SKILL.md. Stop routing.

    line 118
  11. Distinctive:

    Never add a second methodology router beside this repo's ids.

    line 123
  12. Very specific:

    Never paste official style guides into context "just in case".

    line 125
  13. Distinctive:

    If you think one of these, stop and reread the iron law:

    line 130

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

TurnLanguage 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 turnnone

Load-with list

  1. 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.
  2. If the turn includes shell, shell-safety may also load with the one language skill.
  3. 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 / signalsLoad
*.go, go.modOne 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.lockmodern-python. Pointer: lang-python.
*.sh, *.bash, shebang sh/bash, agent shellshell-safety. Pointer: lang-shell.
*.rs, Cargo.tomllang-rust
*.ts, *.tsx, *.js, *.mjs, *.cjs, tsconfig.json, package.jsonlang-js-ts
*.c, *.h and no C++ fileslang-c
*.cpp, *.cc, *.cxx, *.hpplang-cpp
*.cs, *.csproj, *.slnlang-csharp
*.java, pom.xml, build.gradlelang-java
*.kt, *.ktslang-kotlin
*.rb, Gemfilelang-ruby
*.php, composer.jsonlang-php
*.swift, Package.swiftlang-swift
*.dart, pubspec.yamllang-dart
*.sqllang-sql
*.html, *.htm, *.css, *.scsslang-web-markup
Dockerfile, *.dockerfile, compose.y*mllang-docker
*.tf, *.hcllang-terraform
Makefile, GNUmakefilelang-makefile
*.ps1, *.psm1lang-powershell
*.protolang-protobuf
*.lualang-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

  1. If the turn is a no-language turn, load no language skill. Stop routing.
  2. List the files this turn will read or write.
  3. Match each file to a Map row. Extensions and well-known file names beat chat keywords.
  4. If a file's language is a stub, follow Stubs for it.
  5. 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.
  6. 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.
  7. 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"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.