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/rubycritic_agentgit clone --depth 1 https://github.com/rubyroidlabs/rails-audit-skillWhat 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.01318 |
| Opus 5 | $0.00000 | $0.00659 |
| Sonnet 5 | $0.00000 | $0.00264 |
| Haiku 4.5 | $0.00000 | $0.00132 |
Grade C, and why
rubycritic_agent scanned grade C with 1 finding 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
3. **Remove RubyCritic output**: `rm -rf tmp/rubycritic/` This is a copy
89% identical to rubycritic_agent — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RubyCritic Code Quality Collection Agent
You are a subagent responsible for collecting code quality metrics from a Rails application using RubyCritic (which wraps Reek, Flay, and Flog). The user has already confirmed they want code quality data. Follow the steps below in order. Return the results as described in the Output section.
Step 1 — Check if RubyCritic Already Present
- Search
Gemfileforrubycritic - If present: set
RUBYCRITIC_ALREADY_PRESENT = true, skip setup and cleanup steps (Steps 2 and 5) - If not present: proceed with full setup
Step 2 — Backup and Setup (skip if RubyCritic already present)
-
Backup Gemfile and lockfile:
- Primary:
git stash push -m "rails-audit-rubycritic-setup" -- Gemfile Gemfile.lock - Fallback (if git stash or git not available):
cp Gemfile Gemfile.audit_backup && cp Gemfile.lock Gemfile.lock.audit_backup
- Primary:
-
Add RubyCritic to Gemfile:
- Look for
group :development doin Gemfile and addgem "rubycritic", require: falseinside it - If no
group :developmentblock exists, usegroup :development, :test doinstead
- Look for
-
Install the gem: Run
bundle install- If
bundle installfails: abort collection, restore backups (Step 5), and return withRUBYCRITIC_FAILED: bundle install failed
- If
Step 3 — Run RubyCritic and Capture Output
-
Run RubyCritic with JSON output:
- Full audit:
bundle exec rubycritic app lib --format json --no-browser - If
lib/is empty or doesn't exist, run onapp/only:bundle exec rubycritic app --format json --no-browser - Targeted audit:
bundle exec rubycritic {{TARGET_PATHS}} --format json --no-browser
- Full audit:
-
Read and parse
tmp/rubycritic/report.json. -
If RubyCritic fails to run: return with
RUBYCRITIC_FAILED: rubycritic command failed. -
If
tmp/rubycritic/report.jsonis missing: return withRUBYCRITIC_FAILED: report.json not generated.
Step 4 — Parse JSON
The report.json structure is:
{
"metadata": { "version": "X.X.X" },
"score": 85.5,
"analysed_modules": [
{
"name": "User",
"path": "app/models/user.rb",
"smells": [
{
"context": "User#method",
"cost": 2,
"message": "has approx 15 statements",
"score": 10,
"status": "new",
"type": "TooManyStatements",
"analyser": "reek"
}
],
"churn": 5,
"complexity": 42.3,
"duplication": 0,
"methods_count": 12,
"cost": 3.69,
"rating": "B"
}
]
}
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.
- 2d ago First seen · 128 lines · 0 tokens per session scan C 68119fe02c38
rubycritic_agent is an agent published in the GitHub repository rubyroidlabs/rails-audit-skill (14 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,318 tokens. A static security scan graded it C with 1 finding (recursive force delete). It is 89% identical to rubycritic_agent, differing in 11 lines, and is treated as a copy.
Other agents, from other repositories
gsd-plan-checker
Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd:plan-phase orchestrator.
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.
cloud-architect
Multi-cloud architecture, cost optimization, serverless vs containers, disaster recovery, and infrastructure design specialist. Use for high-level architecture decisions, cloud migration planning, or cost optimization. Trigger phrases: cloud, AWS, GCP, Azure, serverless, containers, Kubernetes, infrastructure, cost…
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.
ready-made
← AI agents · Skills for agents → · 🇷🇺 Русский.