code-style
Skill230 starsChanged 2 months agoMITView on GitHub
Apply railtracks' code-style conventions whenever writing or editing Python code in this repo: new functions, modified signatures, docstrings, comments, imports, error handling. Use this automatically as part of any code change, not just when explicitly asked to clean up code.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- JetBrains/MPStheir own version, first seen Oct 1, 2026
- caikiji/skills-labtheir own version, first seen Sep 7, 2026
- okharedia/my-skillstheir own version, first seen Sep 5, 2026
- frappe/skillstheir own version, first seen Aug 12, 2026
- farofy/ignitetheir own version, first seen Aug 1, 2026
Used with
Projects with it also use debugging and testing.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
BlockSkilldebugging
Debugging guidelines and best practices
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- JetBrains/intellij-community★ 21ksame name
- JetBrains/MPS★ 1.7ksame name
- microsoft/semantic-link-labs★ 584same name
- frappe/skills★ 145same name
- maxyeh0817/Forge★ 34same name
- Vesely/skills★ 28same name
- andrueandersoncs/claude-skill-effect-ts★ 8same name
- caikiji/skills-lab★ 4same name
- nevitonsantana/adaptive-skills★ 2same name
- didier/skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 5 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
5
Distinctive
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 14
Lint/format: run ruff check --fix and ruff format, required for every PR (CI-enforced).
- Very specific: line 15
Imports: prefer top-level imports. Local/inline imports are fine when there's a real reason (e.g.
- Very specific: line 20
Docstrings: must match the actual signature (param names, types, | None / Iterable[...] etc.).
- Distinctive: line 21
Update the docstring any time a signature changes.
- Very specific: line 27
Typing: no bare Any when a concrete type is available or already imported nearby.
- Very specific: line 29
TODOs: no inline # TODO comments.
- Distinctive: line 30
Cruft: no dead/commented-out code, no stray debug/scratch files left in a change.
- Distinctive: line 31
Documentation paragraphs: keep prose paragraphs on one line, matching the existing docs.
- Very specific: line 32
Mutable defaults: don't store a mutable default (x or []) by reference and mutate it later.
- Very specific: line 34
Errors: use repr(e) rather than str(e) in error/log messages.
- Very specific: line 35
__init__.py: don't add docstrings to __init__.py files. - Distinctive: line 36
Consistency with siblings: when adding a new variant of something that already has 2+ siblings (chunkers, loaders, LLM providers, etc.), …
- Distinctive: line 39
Model references in examples: use current, provider-documented model IDs in user-facing examples and bundled CLI skills.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
railtracks Code Style
Code changes in this repo should be reviewed against these rules. Each one comes from a recurring, repeated PR review comment on railtracks, not a hypothetical style preference.
- Lint/format: run
ruff check --fixandruff format, required for every PR (CI-enforced). - Imports: prefer top-level imports. Local/inline imports are fine when there's a real reason (e.g.
deferring an expensive or optional dependency like
litellm); don't add them out of habit, and don't let a lint failure be the excuse either way. - Tests: new functionality gets tests in the matching package's
tests/directory; don't leave a behavior change uncovered. - Docstrings: must match the actual signature (param names, types,
| None/Iterable[...]etc.). Update the docstring any time a signature changes. - Tool docstrings/type hints: for any
@rt.function_node-wrapped tool, the docstring is the literal tool description the LLM sees and the type hints define its JSON schema parameters; don't write vague docstrings or omit type hints on a tool function. - Module-level comment strings: a docstring at the top of a file is welcome. Avoid long inline paragraph-style comments in the body of the code; keep inline comments short and targeted.
- Typing: no bare
Anywhen a concrete type is available or already imported nearby. Don't reach forAnyas a quick fix to silence something that's actually broken, either; fix the real type mismatch. - TODOs: no inline
# TODOcomments. Either fix it now or file a tracked GitHub issue and reference it. - Cruft: no dead/commented-out code, no stray debug/scratch files left in a change.
- Documentation paragraphs: keep prose paragraphs on one line, matching the existing docs; do not hard-wrap sentences. Preserve code-block formatting.
- Mutable defaults: don't store a mutable default (
x or []) by reference and mutate it later; copy defensively. - Errors: use
repr(e)rather thanstr(e)in error/log messages. __init__.py: don't add docstrings to__init__.pyfiles; not this repo's convention.- Consistency with siblings: when adding a new variant of something that already has 2+ siblings (chunkers, loaders, LLM providers, etc.), match their existing shape/behavior rather than introducing an ad hoc one-off.
- Model references in examples: use current, provider-documented model IDs in user-facing examples and bundled CLI skills. Verify IDs against the provider's model catalog and deprecation page when adding or refreshing examples. Keep a model-specific reference only when the example demonstrates behavior unique to that model, and explain that choice nearby when it would otherwise look stale. Historical upgrade guides and tests that intentionally exercise model-name passthrough may retain older IDs.
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.

