security-sweep

security-sweep is a skill for Claude Code from n24q02m/better-code-review-graph. It costs 37 tokens per session (1,666 once invoked), scanned A, original, Apache-2.0.

A graph-based security review that scans code for dangerous operations and checks whether reachable entry points can actually lead to them. An entry point is a place such as a request handler where untrusted input enters the program.

In plain words
What is it for?
Use it to scan a codebase, rank findings by reachable risk, and classify remaining findings for suppression.
Why use it?
It helps separate exploitable findings from warnings in unreachable or unused code. This makes security triage more focused than a flat pattern scan.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the better-code-review-graph plugin — 7 skills, 3 hooks, 1 MCP server shipped together

Good fit Use it to scan a codebase, rank findings by reachable risk, and classify remaining findings for suppression.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/n24q02m/better-code-review-graph/security-sweep
Install

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.

Any agent
npx skills add n24q02m/better-code-review-graph --skill security-sweep
Clone the repo
git clone --depth 1 https://github.com/n24q02m/better-code-review-graph

Made for: Claude Code.

Or install better-code-review-graph, the plugin that ships this one along with the rest of its 7 skills, 3 hooks, 1 MCP server.

Wrote 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.

agentmods badge for security-sweep

README.md
[![agentmods](https://agentmods.dev/badge/skills/n24q02m/better-code-review-graph/security-sweep/github.svg)](https://agentmods.dev/skills/n24q02m/better-code-review-graph/security-sweep)
Your own site
<a href="https://agentmods.dev/skills/n24q02m/better-code-review-graph/security-sweep"><img src="https://agentmods.dev/badge/skills/n24q02m/better-code-review-graph/security-sweep/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.

agentmods 80×15 button for security-sweep

Your own site · 80×15
<a href="https://agentmods.dev/skills/n24q02m/better-code-review-graph/security-sweep"><img src="https://agentmods.dev/badge/skills/n24q02m/better-code-review-graph/security-sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,666 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01666
Opus 5.5 $0.00015 $0.00666
Sonnet 5.5 $0.00007 $0.00333
Haiku 4.5 $0.00004 $0.00167

Measured 1mo ago against content hash 26b21d4dd3e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-sweep 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 1mo 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/security-sweep/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Sweep

Scan the codebase for dangerous constructs, then use the graph to answer the question a flat scanner cannot: can untrusted input actually reach this? A medium-severity finding in a request handler outranks a critical one in dead code, and only the call graph can tell them apart.

Command surface: run the local CLI through the coding harness shell. Examples use the installed better-code-review-graph command; from a source checkout, prefix it with uv run. No MCP mapping is required.

Steps

  1. Make the graph current with better-code-review-graph graph build --base HEAD --repo-root "<path>". Findings are attached to graph nodes, so anything unindexed is unscanned.

  2. Read the active ruleset with better-code-review-graph security rule_list --engine heuristic before scanning, and check which languages each rule declares. This determines what a clean result is worth -- see Coverage Limits below.

  3. Run the Tier 1 scan: better-code-review-graph security scan --engine heuristic --repo-root "<path>". It returns total, by_severity, by_rule, tags_by_node, and suppressed_count. Tier 1 is regex matching over the source of function, class, and method nodes -- fast, no external tool, no data-flow analysis.

  4. Run Tier 2 when it is available: better-code-review-graph security scan --engine semgrep --repo-root "<path>". Semgrep is an opt-in extra and is not installed by default.

    • When the CLI is missing the command returns {"error": ..., "engine": "semgrep"} with a non-zero exit.
    • Treat that as not run, never as clean. Report Tier 2 as unavailable instead of silently reporting Tier 1 numbers as the whole picture.
  5. Rank findings by reachability -- the step that makes this a graph sweep rather than a grep. For each tagged node, walk backwards toward the entry points:

    • better-code-review-graph query query --pattern callers_of --target "<node>" --repo-root "<path>"
    • Repeat on the callers, two or three hops, until you reach either an entry point (route handler, CLI command, worker, event consumer) or nothing.
    • A node with no callers is either dead code or an entry point itself. Distinguish the two before ranking: an unreferenced HTTP handler is the most exposed code in the repository, not the least.

Read the full file on GitHub · 107 lines

Changes

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.

  1. 1mo ago First seen · 107 lines · 37 tokens per session scan A 26b21d4dd3e9

Subscribe to this mod's changes

security-sweep is a skill published in the GitHub repository n24q02m/better-code-review-graph (67 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,666 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-08-30.

Related

Other skills, from other repositories

the-judge

Evidence-first pull request judge that reviews a PR and posts one consolidated GitHub review with inline comments via the gh CLI. Runs the repo's own deterministic checks first, researches current official docs before any claim about external libraries or APIs, then reviews correctness, security, structural quality…

tech-leads-club/agent-skills · 192 tokens

component-identification-sizing

Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking "how big is each module?", "what components do I have?", "which service is too large?", "analyze codebase structure", "size my monolith", or planning where to start decomposing. Do NOT use…

tech-leads-club/agent-skills · 81 tokens

evolutionary-modular-architecture

Guides design and implementation of evolutionary modular-monolith platforms with DDD (strategic + tactical), flat-by-aggregate organization, an Anti-Corruption Layer for vendor independence, a transactional outbox for events, smart resilience (backoff with jitter, circuit breakers, idempotency), and a polished…

tech-leads-club/agent-skills · 208 tokens

nestjs-modular-monolith

Specialist in designing and implementing scalable modular monolith architectures using NestJS with DDD, Clean Architecture, and CQRS patterns. Use when building modular monolith backends, designing bounded contexts, creating domain modules, implementing event-driven module communication, or when user mentions "modular…

tech-leads-club/agent-skills · 131 tokens

best-practices

Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities". Do NOT use for accessibility (use web-accessibility), SEO (use seo), performance (use…

tech-leads-club/agent-skills · 85 tokens

rails-dev

Opinionated Rails conventions: rich models, concerns, CRUD-everything, state-as-records, minimal dependencies, Minitest with fixtures. Load this skill BEFORE any code-level thinking, not only before editing a file. It is required the moment a task touches Rails code in ANY way: designing or even just discussing a data…

tech-leads-club/agent-skills · 199 tokens