code-style

code-style is a skill for Claude Code, Codex from RailtownAI/railtracks. It costs 56 tokens per session (615 once invoked), scanned A, original, MIT.

Python coding rules for the Railtracks repository, covering formatting, imports, tests, documentation strings, and tool definitions.

In plain words
What is it for?
Use it when writing or editing Python functions, tools, signatures, comments, imports, or error handling.
Why use it?
It helps code changes follow the repository's conventions and pass its automated checks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/railtownai/railtracks/code-style
Any agent
npx skills add RailtownAI/railtracks --skill code-style
Clone the repo
git clone --depth 1 https://github.com/RailtownAI/railtracks

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for code-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/railtownai/railtracks/code-style.svg)](https://agentmods.dev/skills/railtownai/railtracks/code-style)
Your own site
<a href="https://agentmods.dev/skills/railtownai/railtracks/code-style"><img src="https://agentmods.dev/badge/skills/railtownai/railtracks/code-style.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 615 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.00615
Opus 5 $0.00028 $0.00308
Sonnet 5 $0.00011 $0.00123
Haiku 4.5 $0.00006 $0.00061

Measured yesterday against content hash 789e59deec68, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-style scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/code-style/SKILL.md · 39 lines

What it actually says

Code style

Before finishing any code change in this repo, check the diff 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 --fix and ruff format, required for every PR (CI-enforced), so treat a change as unfinished until both are clean.
  • 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 Any when a concrete type is available or already imported nearby. Don't reach for Any as a quick fix to silence something that's actually broken, either; fix the real type mismatch.
  • TODOs: no inline # TODO comments. 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.
  • Mutable defaults: don't store a mutable default (x or []) by reference and mutate it later; copy defensively.
  • Errors: use repr(e) rather than str(e) in error/log messages.
  • __init__.py: don't add docstrings to __init__.py files; 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.
Changes

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.

  1. yesterday First seen · 39 lines · 56 tokens per session scan A 789e59deec68

Subscribe to this mod's changes

code-style is a skill published in the GitHub repository RailtownAI/railtracks (148 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 615 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.