Panic Map — Development skill for Claude Code
Agent skill: find every place your Rust code can panic, judge which ones untrusted input can reach, fix them with typed errors, prove it with hostile-input tests, and block new panic sites in CI.
How to install Panic Map
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open fangdididi/panic-map and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Panic Map does
Agent skill: find every place your Rust code can panic, judge which ones untrusted input can reach, fix them with typed errors, prove it with hostile-input tests, and block new panic sites in CI. EN + 中文
Alternatives in Development
- Battle — Head-to-head graded battle card between two sites — eight dimensions, bar-by-bar, verdict line 3.6k ★
- Check A11y — Report WCAG contrast for the theme and the minimal fix to reach AA 452 ★
- Claude Elementor Kit — Build WordPress sites with Claude Code via the Elementor MCP — a kit with skill, setup wizard, and cross-platf 84 ★
README
panic-map
[English](README.md) | [简体中文](README.zh-CN.md)
**An agent skill that finds every place your Rust code can crash, decides which ones outside input can actually reach, fixes those, and stops new ones from sneaking back in.**
Rust is memory safe, but it is not crash safe. `.unwrap()`, `.expect()`, `v[i]`, `&s[a..b]`, `x / n`, `RefCell::borrow_mut()` and `mutex.lock().unwrap()` all panic when their assumption is wrong. AI agents write a lot of these, and "just remove the unwraps" usually swaps a loud crash for a quiet wrong answer. panic-map gives your agent (Claude Code, Codex, Cursor and others) a disciplined way to do it properly:
- Map every panic site with a bundled scanner that ignores comments, strings and test code.
- Judge each one: REACHABLE from untrusted input, a stated INVARIANT, STARTUP-only, ACCEPTED, or UNKNOWN until probed.
- Fix the reachable ones with typed errors and total operations (
get,split_once,checked_*,NonZero*,let else). - Prove it with hostile-input tables, property tests or fuzzing whose only assertion is "never panics".
- Hold the line with a CI baseline that rejects new unexplained panic sites and a three-stage clippy lint ratchet.
Features
- Nine site kinds: UNWRAP, EXPECT, MACRO (
panic!/todo!/unimplemented!/unreachable!), ASSERT (release-time asserts), INDEX, SLICE (including UTF-8 char boundaries), DIV, BORROW (RefCell), LOCK (poisoned mutexes). - Honest scanner: a Rust-aware lexer that blanks comments (including nested
/* */), strings, raw strings and char literals, keeps line numbers, skips#[cfg(test)]/#[test]items andtarget/,tests/,benches/. It also says plainly what it cannot see, with a manual checklist for those cases. - Reach-first judging: every row needs a one-line path from an input, and a weak reason ("should never happen") counts as UNKNOWN.
- In-code markers:
// panic-map: invariant|startup|acceptedputs the
Related Skills
Cmd Judge
Adversarial verifier for the PROVE phase: treats a finished-work report as untrusted claims, re-runs every ver
Comment Floor
Agent skill: work your own post's comment section like a front desk. Capture every floor, prove completeness,
Untrusted Input
Untrusted input — read and apply before anything else
Debt Scan
Read and apply prompts/_untrusted-input.md first.
Package Doctor
Scan Python dependencies for exploited CVEs and abandoned packages that handle untrusted input, ranked by CISA
Buy Or Wait Evidence Agent
Deterministic financial decision agent for HackerRank Orchestrate "Buy or Wait?". A bounded Claude evidence ag
Related Agents
Error Paths
Review angle "error paths & concurrency" of the user's §6 adversarial-review gate — panic sites, swallowed err
Edge Observability Validator
Checks headless L1/L2 Rust daemons cannot fail silently — structured logs, per-message panic isolation, health
Gremlin
Adversarial QA. Use to break new code with hostile inputs, edge cases, race conditions and bad state, and to p