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.
npx skills add RailtownAI/railtracks --skill agent-buildergit clone --depth 1 https://github.com/RailtownAI/railtracksWrote 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.
[](https://agentmods.dev/skills/railtownai/railtracks/agent-builder)<a href="https://agentmods.dev/skills/railtownai/railtracks/agent-builder"><img src="https://agentmods.dev/badge/skills/railtownai/railtracks/agent-builder/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/railtownai/railtracks/agent-builder"><img src="https://agentmods.dev/badge/skills/railtownai/railtracks/agent-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.02808 |
| Opus 5.5 | $0.00015 | $0.01123 |
| Sonnet 5.5 | $0.00007 | $0.00562 |
| Haiku 4.5 | $0.00004 | $0.00281 |
Grade A, and why
agent-builder 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 6d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Build a Railtracks Agent
The user wants to build an agent using the railtracks framework: $ARGUMENTS
How railtracks works
- Tools are plain Python functions decorated with
@rt.function_node. Type hints become the parameter schema; the docstring becomes the description. - Agents are created with
rt.agent_node(). Its behaviour depends on whether tools or a structured output schema are passed (see below). - Flows wrap an agent or async function as the entry point and handle execution, config, and context.
rt.call()is used inside async workflows to call agents or nodes directly.- Results:
flow.invoke(),await flow.ainvoke()andawait rt.call()on an agent return a response object. Read a text agent's reply with.text(astr) and anoutput_schemaagent's with.structured(an instance of your schema). The full conversation is on.message_history. Don't read a text agent's.content: it becomes a list of parts in railtracks 1.9.0. Read messages withmessage.texttoo.
What agent_node builds
rt.agent_node() builds one node behind the scenes — there is no separate named type to pick. What you pass changes what the agent does at runtime:
| Passed | Behaviour |
|---|---|
Neither tool_nodes nor output_schema |
Plain chat, text output |
output_schema only |
Structured output, no tools |
tool_nodes only |
Tool-calling loop, text output |
LLM Providers
# Example model IDs; use the provider and model the project already uses
rt.llm.AnthropicLLM("claude-sonnet-5-5")
rt.llm.OpenAILLM("gpt-6-luna")
rt.llm.GeminiLLM("gemini-3.8-flash")
rt.llm.OpenAICompatibleProvider(
"my-model", api_base="https://api.example.com/v1", api_key="..."
)
Steps
- Read the existing code — check what files already exist in the project. Understand the task before writing anything.
- Identify what tools the agent needs — each capability the agent should have becomes a
@rt.function_node. Ask the user to clarify if it's not obvious from$ARGUMENTS. - Define the tools — write each tool as a Python function with:
- Full type hints on all parameters and return value
- A docstring with a one-line summary and
Args:/Returns:sections - Real implementation (or a clear stub with a TODO if the user needs to fill it in)
- Define the agent — call
rt.agent_node()with (note: it returns a class/type, so use PascalCase for the variable name):- A descriptive name
tool_nodeslisting the tools (if any), oroutput_schemaas a PydanticBaseModelfor structured output — one or the other, never both (passing both raisesNodeCreationError)llm— follow the provider the project already uses, or one whose API key is configured (providers and their key variables: https://docs.railtracks.org/documentation/getting_started/llm_setup/); otherwise ask the user which LLM to usesystem_message— a clear, specific system prompt
- Wrap in a Flow — create
rt.Flow(name="...", entry_point=MyAgent)for simple cases. For multi-step or multi-agent workflows, define anasync deffunction as the entry point and useawait rt.call(MyAgent, ...)inside it. - Add invocation code — include a
if __name__ == "__main__":block that callsflow.invoke(...)with a representative example and printsresult.text, so the user can run it immediately. Useawait flow.ainvoke(...)instead if the code is already async. - Check imports — make sure
import railtracks as rtis at the top and any Pydantic models importfrom pydantic import BaseModel.
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.
- 6d ago Changed 164126f22714
- 1mo ago Changed · +19 lines e052364858b2
- 1mo ago Changed 055acd57e2a5
- 1mo ago Changed · +16 lines 82ea200ffdb2
- 1mo ago Changed · -6 lines d68c31f1128e
- 2mo ago Changed · +51 lines d83fc6079d60
- 2mo ago Changed d1a847ac5d6f
- 2mo ago First seen · 166 lines · 37 tokens per session scan A e13d20f9e96b
agent-builder is a skill published in the GitHub repository RailtownAI/railtracks (235 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 2,808 once invoked, about $0.0001 per session on Opus 5.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-23.
agent-builder compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-builderRailtownAI/railtracks | Skill | 235 | today | MIT | A | 37 | Claude Code |
| first-readerShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 174 | Claude Code, Codex |
| mcp-apps-builderShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 139 | Claude Code, Codex |
| project-graveyardShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 127 | Claude Code, Codex |
| commit-archaeologistShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 82 | Claude Code, Codex |
| dependency-doctorShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 115 | Claude Code, Codex |
| scope-creep-detectorShubhamsaboo/awesome-llm-apps | Skill | 147k | yesterday | Apache-2.0 | A | 98 | Claude Code, Codex |