agentleFS
LeostrukaLeostruka/devin-bundle/skills/scan/SKILL.md

scan

Skill0 starsChanged 4 months agoMITView on GitHub

Use when the user wants a goal-driven, codebase-wide investigation — "scan for dead code", "find N+1 queries", "check test coverage gaps", "audit style/migration compliance". Replicates Devin Cloud's /scan (Code Scans): Plan → Shard → Map → Reduce, parallel read-only subagents, prioritized findings report with evidence.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use verify and review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    verify

    Drive the contracts engine's runtime surface (the stdio MCP server) to verify changes end-to-end. Scoped to public-plugins/plugins/healthcare/skills/contracts/ and ../../servers/documents/.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Wait for all (read_subagent block=true or completion notifications).

    line 50
  2. Very specific:

    Write .devin/scans/<YYYY-MM-DD>-<slug>.md (report template below).

    line 56
  3. Very specific:

    Never fix during a scan. Offer next steps: pick findings → planning/execution flow → implementer subagents with tests.

    line 61
  4. Very specific:

    Every finding carries file:line evidence — drop unverifiable claims.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scan — goal-driven codebase investigation

Local equivalent of Devin Cloud /scan (Code Scans). Turns a broad engineering goal into a scoped investigation, fans out parallel read-only subagents over repo shards, then reduces findings into a prioritized report.

Non-goals: no auto-fixes (remediation is a separate, gated step), no ticket creation without approval, no security exploit work (see security skill).

Workflow — Agentic MapReduce

1. Plan (scope + criteria)

Extract or ask (ask_user_question, ≤2 rounds) for:

  • Goal: what to investigate (e.g. "unused exports", "N+1 queries").
  • Scope: dirs/globs in or out (default: whole repo minus vendored/generated).
  • Criteria: what counts as a finding + severity rubric.
  • Size cap: shard count and report limits (defaults below).

Record the scan spec at .devin/scans/<YYYY-MM-DD>-<slug>.spec.md (one short file: goal, scope, criteria, shard list, timestamp).

2. Shard

Split the in-scope surface into 4–8 shards (never more than 8 — context and token budget). Shard by top-level dir, module, or glob cluster. Each shard must be describable as a path set + short focus line. Prefer find_file_by_name/manifest boundaries over arbitrary splits.

3. Map (parallel read-only subagents)

Dispatch one researcher (or subagent_explore) background subagent per shard — all in parallel, disjoint read sets. Each prompt must be self-contained (subagents see no session context):

  • The goal + criteria verbatim.
  • Its shard paths.
  • Output contract: findings only, each as file:line | severity (high/med/low) | evidence (≤1 line quote) | why it matches criteria. Max 15 findings per shard. No findings → say so.
  • Explicitly: read-only, no edits, no fixes proposed beyond one line.

Wait for all (read_subagent block=true or completion notifications).

4. Reduce (dedupe + prioritize + report)

  • Dedupe on file:line ±2 lines; merge same-pattern findings.
  • Rank: severity first, then frequency, then blast radius.
  • Write .devin/scans/<YYYY-MM-DD>-<slug>.md (report template below).
  • Print a ≤12-line summary to the user: counts by severity + top 5.

5. Remediate (opt-in only)

Never fix during a scan. Offer next steps: pick findings → planning/execution flow → implementer subagents with tests. For bulk identical fixes, dispatch sequentially, one at a time.

Report template

# Scan — <goal>
Date: <YYYY-MM-DD> | Shards: N | Findings: M

## Top findings (by severity)
| # | file:line | severity | evidence | note |

## All findings (grouped by shard/pattern)
...

## Coverage notes
- shards skipped / files unreadable / criteria edge cases

Guardrails

  • Subagents are read-only; the scan itself never edits repo code.
  • Every finding carries file:line evidence — drop unverifiable claims.
  • Cap the report at 100 findings; group the rest by pattern.
  • Secrets found → report the location class only, never the value (Rule 19).
  • Cost: ~1 subagent per shard; keep ≤8 unless the user asks for more.

Examples

  • /scan dead code → criteria: unreferenced exports/functions; shards by src dir; report ranks by confidence.
  • /scan test gaps → map source files without matching test files.
  • /scan style guide → criteria from an AGENTS.md/style doc shard.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.