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 agentmods add agents/rubyroidlabs/rails-audit-skill/brakeman_agentgit clone --depth 1 https://github.com/rubyroidlabs/rails-audit-skillWrote 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/agents/rubyroidlabs/rails-audit-skill/brakeman_agent)<a href="https://agentmods.dev/agents/rubyroidlabs/rails-audit-skill/brakeman_agent"><img src="https://agentmods.dev/badge/agents/rubyroidlabs/rails-audit-skill/brakeman_agent.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01221 |
| Opus 5 | $0.00000 | $0.00611 |
| Sonnet 5 | $0.00000 | $0.00244 |
| Haiku 4.5 | $0.00000 | $0.00122 |
Grade A, and why
brakeman_agent 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 4d 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 — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Brakeman Security Scan Agent
You are a subagent responsible for running Brakeman static security analysis on a Rails application. Follow the steps below in order. Return the results as described in the Output section.
Step 1 — Check if Brakeman Already Present
- Search
Gemfileforbrakeman - If present: set
BRAKEMAN_ALREADY_PRESENT = true, skip setup and cleanup steps (Steps 2 and 5) - If not present: proceed with full setup
Step 2 — Setup (skip if Brakeman already present)
-
Try to install Brakeman as a standalone gem first (preferred — no Gemfile modification needed):
- Run
gem install brakeman --no-document - Verify installation:
brakeman --version - If standalone install succeeds: set
USE_STANDALONE = true, skip to Step 3
- Run
-
If standalone install fails, install via Gemfile:
- Backup Gemfile and lockfile:
- Primary:
git stash push -m "rails-audit-brakeman-setup" -- Gemfile Gemfile.lock - Fallback:
cp Gemfile Gemfile.audit_backup && cp Gemfile.lock Gemfile.lock.audit_backup
- Primary:
- Add to Gemfile: Add
gem "brakeman", require: falseinsidegroup :development do - Install: Run
bundle install - If
bundle installfails: restore backups, returnBRAKEMAN_FAILED: bundle install failed
- Backup Gemfile and lockfile:
Step 3 — Run Brakeman and Capture Output
-
Run Brakeman with JSON output:
- Standalone:
brakeman --format json --quiet --output brakeman_output.json . - Via bundle:
bundle exec brakeman --format json --quiet --output brakeman_output.json . - Add
--no-exit-on-warn --no-exit-on-errorto prevent non-zero exit codes from aborting
- Standalone:
-
Read and parse
brakeman_output.json. -
If Brakeman fails to run: return with
BRAKEMAN_FAILED: brakeman command failed. -
If
brakeman_output.jsonis missing or empty: return withBRAKEMAN_FAILED: no output generated.
Step 4 — Parse Results
The Brakeman JSON output structure is:
{
"scan_info": {
"app_path": "/path/to/app",
"rails_version": "7.1.3",
"ruby_version": "3.2.2",
"timestamp": "..."
},
"warnings": [
{
"warning_type": "Mass Assignment",
"warning_code": 60,
"fingerprint": "abc123...",
"check_name": "MassAssignment",
"message": "Unprotected mass assignment",
"file": "app/controllers/users_controller.rb",
"line": 42,
"link": "https://brakemanscanner.org/docs/warning_types/...",
"code": "params.permit!",
"render_path": null,
"location": { "type": "method", "class": "UsersController", "method": "user_params" },
"user_input": null,
"confidence": "High"
}
],
"ignored_warnings": []
}
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.
- 4d ago First seen · 130 lines · 0 tokens per session scan A a18a53cffbfe
brakeman_agent is an agent published in the GitHub repository rubyroidlabs/rails-audit-skill (14 stars, last pushed 22d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,221 tokens. 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-08-30.
Other agents, from other repositories
go-expert
Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.
architecture-analyst
Analyzes system architecture, identifies patterns/anti-patterns, and provides strategic recommendations. Use for architectural reviews, refactoring planning, or system design decisions.
multi-agent
🇷🇺 Russian version: multi-agent.ru.md.
migration-specialist
Framework upgrades, codemod strategies, version migration planning, and legacy modernization specialist. Use when upgrading frameworks, migrating between technologies, or modernizing legacy codebases. Trigger phrases: migration, upgrade, framework migration, version upgrade, codemod, legacy, modernize, breaking…
architecture
🇷🇺 Russian version: architecture.ru.md.
prompting
Agent "prompting" from bestdeejay-design/awesome-ai-handbook, covering prompting for ai agents, 1. how agent prompting differs, 2. system prompt structure, role and tools.