safety-check
Skill93 starsChanged 8 days agoMITView on GitHub
Audit staged changes against the 11 host app safety rules
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AllanSantos-DV/skill-kittheir own version, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- AllanSantos-DV/skill-kit★ 0same name
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 repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-breadcrumb-pageSkill
- chaosSkill
- cqrs-patternsSkill
- demo-updateSkill
- host-app-safetySkill
- new-featureSkill
- release-rulesSkill
- releaseSkill
- roadmap-statusSkill
- testSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
Verification Before Done: Never report PASS without reading the actual code.
- Distinctive: line 70
Autonomous Bug Fixing: If a safety violation is found (FAIL), fix it immediately rather than just reporting it.
- Very specific: line 71
Self-Improvement Loop: If a safety violation was caused by a pattern not yet in the 11 rules, add it to tasks/lessons.md.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/safety-check — Host App Safety Audit
Audit staged or recent changes against the 11 host app safety rules. This skill is also auto-invocable — Claude should run it automatically when making changes to the capture path.
Usage
/safety-check— audit staged changes (git diff --cached)/safety-check HEAD~3— audit last 3 commits/safety-check <file>— audit a specific file
The 10 Safety Rules
Audit each changed file against these rules:
- Never raise in capture path — Look for
raisestatements in middleware, subscriber, or capture commands without surroundingrescue - Never block request path — Look for HTTP calls, file I/O, or slow operations in synchronous capture code
- Budget every operation — Check timing: breadcrumb callback <10µs, health snapshot <1.5ms, storm check <15µs, capture <5ms before the response
- Clean up Thread.current — Any
Thread.current[]=must have a matchingensurecleanup - Always re-raise original exceptions — Middleware/subscriber must re-raise after capture (Sentry #1173)
- Feature-detect — Any call to
Puma,Sidekiq, etc. must be guarded withdefined?()orrespond_to?() - Make everything disableable — New request-path features need a config flag
- Never use ObjectSpace.each_object — Freezes all threads, grows heap
- Never use Signal.trap — Breaks Puma/Sidekiq signal handling
- Never store Binding objects — Prevents GC of entire call stack
Capture Path Files (Highest Scrutiny)
These files run on EVERY request or error — any bug here affects the host app:
lib/rails_error_dashboard/middleware/error_catcher.rblib/rails_error_dashboard/error_reporter.rblib/rails_error_dashboard/commands/log_error.rblib/rails_error_dashboard/commands/find_or_increment_error.rblib/rails_error_dashboard/commands/find_or_create_application.rblib/rails_error_dashboard/services/error_normalizer.rblib/rails_error_dashboard/services/breadcrumb_collector.rblib/rails_error_dashboard/services/system_health_snapshot.rb
Audit Process
- Get the diff:
git diff --cached # or git diff HEAD~N, or read the specified file - Classify each changed file:
- Capture path (listed above) — audit ALL 11 rules
- Dashboard path (controllers, views, queries) — audit rules 1, 7, 8, 9
- Background path (jobs, notifications) — audit rules 1, 5, 6
- Other — audit rules 8, 9, 10
Report findings in a table:
File Rule Status Details error_catcher.rb#1 No raise PASS All paths wrapped in rescue error_catcher.rb#5 Re-raise PASS Line 42: raise errorafter capturebreadcrumb_collector.rb#3 Budget WARN No timing measurement found - Verdict: PASS (all clear), WARN (potential issues), or FAIL (definite violation)
Workflow Orchestration
- Verification Before Done: Never report PASS without reading the actual code. Diff lines alone are insufficient — read the full file to understand rescue/ensure context.
- Autonomous Bug Fixing: If a safety violation is found (FAIL), fix it immediately rather than just reporting it. Then re-run the check to verify the fix.
- Self-Improvement Loop: If a safety violation was caused by a pattern not yet in the 11 rules, add it to
tasks/lessons.md.
Auto-Invocation
Claude should automatically run this check when:
- Editing any file in the capture path (listed above)
- Adding new middleware or subscriber code
- Modifying
engine.rbinitialization hooks - Adding Thread.current usage anywhere
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.

