patcher-overview
What it does
This skill guides an agent that repairs confirmed security issues with minimal code changes and then re-runs a check. It is for developers in the Decepticon security pipeline.
When to use it
- ✓When a security scanner has confirmed a bug and it needs a small, focused fix.
- ✓When you want a proposed fix tested again before it is marked as done.
- ✓When a fix caused a regression and needs to be reverted and tried again.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/plugins/patcher/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“We confirmed a SQL injection in our search page. Can you write the smallest fix and check that it works?”
5 new skills a week. 1 minute to read.
How it works
The agent reads the code around each bug, proposes a minimal change that uses a safe method, applies it, and reruns the proof of concept and tests before accepting it.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Patcher Skill
You fix validated findings and prove the fix holds. Minimal diffs, one
concern at a time, mandatory patch_verify before claiming done.
Iteration loop
while not patched and attempts < 3:
1. kg_query(kind="vulnerability", min_severity="medium")
→ pick validated=True, patched!=True
2. Read the function around (file, line)
3. Design minimal fix (validate / escape / parameterize / safe API)
4. patch_propose(vuln_id, diff, commit_message) → patch_id
5. Apply diff via Edit or bash patch
6. (optional) bash: run repo tests, abort on failure
7. patch_verify(patch_id, poc_command, success_patterns,
test_cmd=optional)
8. if status == "verified": done
elif status == "tests_failed": revert, retry
elif status == "regressed": revert, analyze, retry
attempts += 1
Diff style
- Unified diff. Use
git diff --no-coloroutput or write one by hand. - Minimal hunk. One concern. No formatting. No renames. No "while I'm here" cleanups. No new files (unless adding one regression test).
- Safe-API preference.
| Bug class | Preferred fix |
|---|---|
| SQL injection | Parameterized query / ORM.filter(), NOT escaping |
| Command injection | Arg-list subprocess, shell=False |
| Path traversal | os.path.realpath + prefix check |
| SSRF | Allowlist + resolve → check not private/loopback |
| Deserialization | Switch to safe loader (yaml.safe_load, JSON, etc.) |
| Broken auth | Move check to pre-hook, not inside handler |
| Reflected XSS | Framework auto-escape, remove Markup/safe |
- Add a regression test in the same diff when the repo has a test directory for the affected module. One test that exercises the fixed path is sufficient.
Commit message format
Conventional commits. Example:
fix(auth): use constant-time comparison in verify_hmac
Prevents timing side-channel recovery of the HMAC. CWE-208.
Decisive-completion rule
Only report "patched" after patch_verify.status == "verified". A
green test suite is NOT sufficient — the PoC must actually fail.
If all 3 attempts fail, STOP on the finding, record a note via
kg_add_node on the vuln (patch_attempts=3, last_failure=...) and
return to the orchestrator. Do not spiral.
FAQ
Does it rewrite whole files?
No. It works on one concern at a time, with minimal changes and no unrelated cleanups.
What is the preferred fix for SQL injection?
Use a parameterized query or an ORM filter instead of escaping the input by hand.
What happens if a test fails?
The agent reverts the change, analyzes the result, and retries, up to three attempts.
Details
Original description by the author
Stage 4 patch generation playbook. Minimal diffs for validated findings with mandatory patch_verify. Load at patcher-agent startup.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13900
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.