{
  "markdown": "# bug-hunt\n\nAn autonomous bug-hunting and unit-test-writing skill for AI coding agents. Supports [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [OpenCode](https://github.com/opencode-ai/opencode), [Cursor](https://cursor.sh), [Codex](https://openai.com/index/codex/), and [Gemini CLI](https://github.com/google-gemini/gemini-cli).\n\n> 一个自动持续补单测、找 bug 的 AI 编程智能体 skill，支持 Claude Code、OpenCode、Cursor、Codex、Gemini CLI。核心循环：写单测 → 发现 bug → 记录 → 继续写下一个测试，永不停歇。**只找 bug，不修复。**\n\n## Overview\n\nThis skill focuses on one activity: finding bugs by writing tests.\n\n1. **Write unit tests** — Add new tests to increase coverage, expose untested edge cases, and discover hidden bugs\n\nThe agent writes tests autonomously, recording every bug it finds — without attempting to fix anything. Multiple agents can run in parallel, each covering a different module.\n\n## Inspiration\n\nThis project is inspired by [karpathy/autoresearch](https://github.com/karpathy/autoresearch) - Andrej Karpathy's research on autonomous code improvement through systematic experimentation.\n\n## Installation\n\n### Quick Install (All Agents)\n\nInstall to any supported agent (Claude Code, Cursor, Codex, OpenCode, Gemini CLI, GitHub Copilot, and [40+ more](https://github.com/vercel-labs/skills#supported-agents)) using the [skills CLI](https://skills.sh):\n\n```bash\nnpx skills add gpBlockchain/bug-hunt\n```\n\nBrowse on the skills directory: [skills.sh](https://skills.sh)\n\n### Platform-specific Installation\n\nChoose the method for your coding agent below.\n\n#### Claude Code (via Plugin Marketplace)\n\nIn Claude Code, register the marketplace first:\n\n```bash\n/plugin marketplace add gpBlockchain/bug-hunt\n```\n\nThen install the plugin:\n\n```bash\n/plugin install bug-hunt@bug-hunt-dev\n```\n\n#### Claude Code (Manual)\n\nClone into your project and the skill is auto-discovered via `CLAUDE.md`:\n\n```bash\ngit clone https://github.com/gpBlockchain/bug-hunt.git\n```\n\nThen use the `/bug-hunt` slash command.\n\n#### Cursor\n\nIn Cursor Agent chat, install from marketplace:\n\n```text\n/add-plugin bug-hunt\n```\n\nOr search for \"bug-hunt\" in the plugin marketplace.\n\n#### Codex\n\nTell Codex:\n\n```\nFetch and follow instructions from https://raw.githubusercontent.com/gpBlockchain/bug-hunt/refs/heads/main/.codex/INSTALL.md\n```\n\n**Detailed docs:** [.codex/INSTALL.md](.codex/INSTALL.md)\n\n#### OpenCode\n\nAdd to your `opencode.json`:\n\n```json\n{\n  \"plugin\": [\"bug-hunt@git+https://github.com/gpBlockchain/bug-hunt.git\"]\n}\n```\n\nRestart OpenCode. **Detailed docs:** [.opencode/INSTALL.md](.opencode/INSTALL.md)\n\n#### Gemini CLI\n\n```bash\ngemini extensions install https://github.com/gpBlockchain/bug-hunt\n```\n\nTo update:\n\n```bash\ngemini extensions update bug-hunt\n```\n\n#### Verify Installation\n\nStart a new session in your chosen platform and ask: \"Tell me about bug-hunt\" or invoke it directly. The agent should recognize the skill and offer to start a bug-hunting run.\n\n#### Updating\n\n**Claude Code:**\n```bash\n/plugin update bug-hunt\n```\n\n**Codex:**\n```bash\ncd ~/.codex/bug-hunt && git pull\n```\n\n**OpenCode:** Restart OpenCode (auto-updates).\n\n**Gemini CLI:**\n```bash\ngemini extensions update bug-hunt\n```\n\n## How It Works\n\n1. **Setup**: Configure test commands, test framework, editable test scope, and safety timeouts. Runs code risk analysis to generate `risk-map.json`, then automatically performs codebase reconnaissance (`recon.md`) to detect the tech stack, entry points, and trust boundaries.\n2. **Loop**: The agent writes unit tests to find bugs — records every bug found and keeps going indefinitely. After each potential bug, a verification step (`verification.md`) filters out flaky tests and false positives, assigning a confidence score to every confirmed finding. Security-oriented test types (`injection`, `auth-bypass`, `idor`, etc.) are prioritized for high-risk entry points identified during recon.\n3. **Analysis**: View structured results, tests written, bugs found (with confidence scores), and coverage progress over time.\n4. **Evaluation** *(optional)*: Run `/bug-hunt --eval` to measure the skill's effectiveness against a controlled test fixture with planted bugs — reports detection rate, false positive rate, and efficiency.\n\n## Key Files\n\n| File | Purpose |\n|------|---------|\n| `SKILL.md` | Skill definition and workflow routing (OpenCode) |\n| `CLAUDE.md` | Skill definition and workflow routing (Claude Code) |\n| `.claude/commands/bug-hunt.md` | `/bug-hunt` slash command (Claude Code) |\n| `setup.md` | Interactive first-run configuration |\n| `loop.md` | Autonomous test-writing loop |\n| `analysis.md` | Result analysis and recommendations |\n| `recon.md` | Codebase reconnaissance: tech stack, entry points, trust boundaries |\n| `verification.md` | Bug verification and false-positive filtering |\n| `eval.md` | Self-test evaluation and effectiveness benchmarking |\n| `adaptive-strategy.md` | Self-learning test selection and fuzz testing strategy |\n| `analysis-engine.md` | Code risk scoring (6 dimensions including Security) |\n| `bug-hunt.toml` | Configuration (test commands, framework, scope) |\n| `bug-hunt-context.md` | Agent's knowledge base |\n| `recon-report.json` | Tech stack, entry points, trust boundaries (generated at setup) |\n| `llms.txt` | Short LLM-facing project summary |\n| `llms-full.txt` | Full LLM-facing reference |\n\n## Usage\n\n### Claude Code\n\nRun the `/bug-hunt` slash command from the Claude Code prompt:\n\n```\n/bug-hunt\n```\n\nOr for analysis of a previous run:\n\n```\n/bug-hunt analysis\n```\n\n### OpenCode\n\nInvoke the `bug-hunt` skill when you want to autonomously write unit tests and find bugs — using tests, linters, static analysis, or code review. The skill only finds bugs; it never modifies source code.\n\n### Codex / Gemini CLI / Cursor\n\nSimply ask the agent to \"run bug-hunt\" or \"find bugs in this codebase\" — the skill is automatically discovered and activated.\n",
  "bytes": 5863,
  "sha": "a074f2ee5e4ebd9eaf4366fab3d98cd95bfbc7b740804bb308e12d57588680a9",
  "repo_slug": "gpblockchain/bug-hunt",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_gpblockchain_bug_hunt_83672f5a/readme"
}