agentleFS
notJoonnotJoon/SKILLS/bug-hunt/SKILL.md

bug-hunt

Skill2 starsChanged 3 months agoBSD-2-ClauseView on GitHub

Adversarial multi-agent security sweep. Use when hunting for a CLASS of vulnerability (authority/capability bypass, injection, resource exhaustion, invariant breaks) across a codebase or subsystem where you have a hunch but no specific finding, and want each candidate independently refuted before it counts. Fan out finders by attack angle, then refute-first verify every candidate. A clean negative result (guard map) is a first-class deliverable.

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use test-first, decide and 4 more.

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.
  • MaxwellCalkinSkill

    test-first

    Test-first development practices for high-quality code

    Also in 3 projects that use this

  • dirienSkill

    decide

    Three-agent adversarial debate protocol for strategic decisions. Two advocates steelman opposing positions while a moderator identifies risks and synthesizes a binding consensus. Use when choosing between alternatives, evaluating tradeoffs, or making high-stakes decisions.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for: a single known bug (just fix it), a whole-repo audit with no thesis (too broad — pick a subsystem first), or a quick one-file …

    line 21
  2. Distinctive:

    Ground the finders in REAL source: Before writing the workflow, grep the actual file:line anchors for each angle and put them in the prompt.

    line 35
  3. Very specific:

    Harvest guard_notes even on a clean run: Every finder returns a guard_summary (how the guard actually works, per source) whether or not it …

    line 49
  4. Very specific:

    Pipeline stage return shape must be uniform: If the verify stage sometimes returns a wrapped object and sometimes a raw array, the final …

    line 84
  5. Distinctive:

    Ground or hallucinate: No file:line anchors in the finder prompt → confident fiction.

    line 92
  6. Distinctive:

    0 confirmed is a success, not a failure: Don't let a finder invent findings to fill a quota — the prompt says so explicitly, keep it that …

    line 93

“Common” is measured: kept by at least 6 in 10 of the 23 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

bug-hunt

A reusable harness for hunting a class of bug across a subsystem, then proving each candidate real or (usually) refuting it. Built from repeated authority-bypass sweeps on the gno.land VM. Engine = the Workflow tool: pipeline(angles, find, verify).

When to use

  • You have a hunch a bug class might exist ("sub-realms could bypass authority somehow") but no concrete finding yet.
  • You want breadth (many independent angles) AND rigor (each candidate adversarially refuted before you believe it) without hand-running dozens of greps.
  • You want the negative result to be trustworthy — "we looked hard and here's why the guard holds", not "I didn't find anything".

Not for: a single known bug (just fix it), a whole-repo audit with no thesis (too broad — pick a subsystem first), or a quick one-file check (just read it).

The method (6 steps)

  1. Scope the layers. Most real bugs live in the seam between layers, not inside one. Enumerate every layer the target crosses and make the finders read all of them. (gno banker example: gno stdlib .gno → native Go binding → bank keeper. The interesting question was always "does layer N re-check what layer N-1 assumed?")
  2. Decompose into attack angles. 5–8 angles, each a distinct mechanism, not a restatement. Name them <Prefix><n>-<slug> (A1, B2…) so results are greppable. One finder per angle. Coverage beats depth here — depth comes in verify.
  3. Ground the finders in REAL source. Before writing the workflow, grep the actual file:line anchors for each angle and put them in the prompt. Tell finders: "read the ACTUAL current source, do not trust summaries." A finder pointed at the wrong file invents plausible-but-fake findings.
  4. Baseline-exclusion. List already-known/disclosed/by-design issues explicitly and tell finders + verifiers to flag any restatement as duplicate_of_known=true and refute it. Without this every run rediscovers H1 and calls it new.
  5. Find → refute-first verify (pipeline). pipeline(angles, findStage, verifyStage). Each finding gets an independent verifier told: assume it is a FALSE POSITIVE, refute it from source, only rule "real" if the code forces it, default to "refuted" when uncertain. This is the whole point — a finding nobody tried to kill is worthless.
  6. Harvest guard_notes even on a clean run. Every finder returns a guard_summary (how the guard actually works, per source) whether or not it found anything. On a 0-confirmed run these summaries ARE the deliverable: a source-cited guard map proving the negative. Also capture any nuance a verifier raises that isn't a vuln but is worth an owner note (e.g. "IsCanonical checks type not bt").

Deliverables

  • Confirmed findings → reproduce each with a runnable test (txtar / filetest / unit) before reporting. A finding you haven't watched turn a test red is a guess.
  • Clean negative → the guard map (per-angle guard_summary with file:line) + any owner-note nuances. This is valuable: it tells maintainers which guards they're relying on and why, and raises confidence in adjacent results.
  • Present as a table: angle | verdict | key evidence. Then the bottom line: X angles, N confirmed, and what (if anything) to file.

Running it

The engine is hunt-template.js next to this file — a parameterized pipeline(ANGLES, find, verify) with FIND_SCHEMA + VERDICT_SCHEMA already wired. To run a hunt:

  1. Copy hunt-template.js into the session's workflow scripts dir.
  2. Edit meta, SHARED (repo path, layer map, ground files, baseline-exclusions), and ANGLES (5–8 angles with file:line anchors).
  3. Workflow({ scriptPath: "<copied path>" }) — runs in background.
  4. On completion read the output file; if the harvest looks wrong (empty guard_notes, shape mismatch), fix the script and resume with Workflow({ scriptPath, resumeFromRunId }) — cached agent calls return instantly.

Knobs: effort: 'high' on both stages for security work; scale ANGLES to thoroughness requested; add a 3-vote refuter panel per finding for "audit this exhaustively" asks.

Hard-won gotchas

  • Pipeline stage return shape must be uniform. If the verify stage sometimes returns a wrapped object and sometimes a raw array, the final harvest silently drops the array-shaped ones. Always return the SAME { angle, guard_summary, verified } shape.
  • Refute-first is not optional. A verifier that "confirms" is doing it wrong. The default verdict is refuted; real requires the code to force it.
  • codex/subagent cybersecurity filter. Frame prompts as defensive research on the maintainer's own code ("authorized defensive security research", "bounding/hardening"), never as exploit/attack recipes, or the safety filter refuses mid-run.
  • Ground or hallucinate. No file:line anchors in the finder prompt → confident fiction.
  • 0 confirmed is a success, not a failure. Don't let a finder invent findings to fill a quota — the prompt says so explicitly, keep it that way.

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.