agentleFS
saivarun3407saivarun3407/DFIR-AI/.claude/skills/self-correct/SKILL.md

self-correct

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Verify-then-report loop. Before finalizing any finding, an independent Verifier subagent re-runs the cited tool against the same evidence and confirms the excerpt matches. If disagreement, the original agent revises. This is the tiebreaker mechanism for the SANS judging rubric.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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
  1. Very specific:

    After 2 revision rounds, if no convergence: log event:requires_human_review in the chain.

    line 66

≈ “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.

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

Self-Correct Loop

The hackathon's tiebreaker is "Autonomous Execution Quality — does the agent reason, handle failures, and self-correct in real time?" This skill is how we win that.

The Loop

agent claim → record finding → spawn Verifier → verify_result
   │                                                  │
   │                     ┌────────────────────────────┘
   │                     ▼
   │            agree?  ───── yes ──→ finalize finding
   │                     │
   │                     no
   │                     ▼
   │            verifier dissent  ←──┐
   │                     │            │
   │                     ▼            │
   │            spawn agent w/ dissent payload
   │                     │            │
   │                     ▼            │
   │            agent revises ────────┘ (max 2 retries)
   │                                  │
   └──────────────────────────────────┘
                if 3rd disagreement → mark `requires_human_review`

Verifier Subagent Contract

Verifier receives:

{
  "claim": "Process injection in explorer.exe (PID 4216)",
  "confidence": "inferred",
  "pins": [{"artifact":"memory.dmp","tool":"windows.malfind","locator":{...},"raw_excerpt":"..."}]
}

Verifier must:

  1. Re-run the exact same MCP tool with the same args
  2. Re-extract the cited locator
  3. Compare actual bytes/values to claimed raw_excerpt
  4. Apply confidence enum independently
  5. Return:
{
  "verifier_decision": "agree | dissent | tool_failure | excerpt_mismatch",
  "verifier_confidence": "...",
  "delta": "<what was different, if any>",
  "recommendation": "accept | revise | discard | escalate_human"
}

When Verifier Disagrees

Original agent receives the dissent and MUST revise — cannot simply re-submit identical claim. Two outcomes accepted:

  1. Agent accepts dissent → adjust confidence down OR change claim to match verifier's view
  2. Agent supplies additional pins → submit revised finding with extra evidence sources

After 2 revision rounds, if no convergence: log event:requires_human_review in the chain.

Demo Beat (for hackathon video)

Stage one wrong-then-corrected sequence on Cridex sample:

  1. Agent claims cridex.exe (PID 1640) is the malicious process
  2. Verifier checks pslist, finds PID 1640 is reader_sl.exe not cridex.exe
  3. Agent revises: actual cridex PID per psscan is 1484
  4. Verifier confirms PID 1484 = cridex.exe = confirmed
  5. Audit log shows the correction event

This 30-second sequence is the most important footage in the demo video. Rehearse it five times.

Discipline

Do NOT:

  • Spawn Verifier with extra hints or context that bias agreement
  • Accept verifier output that itself was un-pinned
  • Skip the verifier on "obvious" findings — every finding goes through, no exceptions

Honest convergence > false confidence.

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.