bug-hunt-all
Skill2 starsChanged 35 days agoMITView on GitHub
Hunt for bugs across every top-level feature section in docs/APP_FEATURES.md using Playwright. Sequential, resumable, one master index at the end. Does not fix bugs.
- Reads credentials
- Commits and pushes
In this repository75 other files it gives its agents.
- acceptance-criteriaSkill
- architect-guideSkill
- architect-reviewSkill
- audit-fixerSkill
- avo-admin-expertSkill
- backend-services-expertSkill
- bug-hunt-fixSkill
- bug-huntSkill
- build-feature-remoteSkill
- build-featureSkill
- codeSkill
- component-testSkill
- controller-expertSkill
- create-qa-documentSkill
- debugSkill
- devops-expertSkill
- execute-qaSkill
- feature-qaSkill
- fix-bug-indexSkill
- fix-honeybadgerSkill
- fix-spec-bugsSkill
- fix-system-testSkill
- frontend-expertSkill
- frontend-reviewSkill
- full-qa-fixSkill
- full-qaSkill
- full-reviewSkill
- green-ciSkill
- group-issuesSkill
- honeybadger-auditSkill
- ideateSkill
- impact-assessmentSkill
- improveSkill
- merge-mainSkill
- model-expertSkill
- model-testSkill
- native-bug-hunt-fixSkill
- native-bug-huntSkill
- page-speedSkill
- plan-questionsSkill
- planSkill
- plan-system-testsSkill
- policy-testSkill
- prdSkill
- prd-worktreeSkill
- product-questionSkill
- product-question-tldrSkill
- qa-branchSkill
- qa-testerSkill
- refactor-sweepSkill
- resolve-honeybadgerSkill
- resolve-issueSkill
- resolve-issuesSkill
- review-acceptance-criteriaSkill
- review-fixesSkill
- review-railsSkill
- rspec-test-expertSkill
- scale-reviewSkill
- service-testSkill
- settle-pr-reviewSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 6 are distinctive, and 22 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 14
If $ARGUMENTS is empty: start a new sweep — create a fresh session directory.
- Very specific: line 15
If $ARGUMENTS is a path to an existing docs/bug-reports/full-app-sweep-* directory: resume that sweep — pick up where it stopped.
- Very specific: line 21
When a /bug-hunt invocation returns:
- Very specific: line 24
Update your TaskList to mark that section done, refresh the MASTER_INDEX rollup row for that section, then immediately invoke /bug-hunt for …
- Very specific: line 25
Only after the TaskList shows every non-skipped section completed do you write the final MASTER_INDEX rollup and stop.
- Very specific: line 32
Read docs/APP_FEATURES.md (repo-relative).
- Very specific: line 57
Use grep -nE '^## [0-9]+\.' docs/APP_FEATURES.md to locate boundaries quickly.
- Very specific: line 66
Create it. (Do not create per-section subdirs yet — /bug-hunt creates its own when it finds its first bug.)
- Very specific: line 69
Verify the path exists and matches docs/bug-reports/full-app-sweep-*.
- Very specific: line 70
Use it as the session dir.
- Very specific: line 111
Read the current MASTER_INDEX.md (the one you just wrote, OR the existing one when resuming).
- Distinctive: line 120
Read its severity counts (parse the summary table at the top of the sub-INDEX)
- Very specific: line 121
Update the MASTER_INDEX row to status: done with those counts
- Distinctive: line 122
Do NOT include it in the TaskList — there is nothing left to do
- Very specific: line 126
Create one task per non-skipped, not-yet-completed section using TaskCreate.
- Very specific: line 134
Do these once, before the loop — /bug-hunt re-checks them, but doing them up front lets you fail fast and gives the child something to …
- Very specific: line 145
If not 200, start bin/dev in the background (it reads PORT= from .env) and wait until the curl returns 200 (10–15s typical).
- Very specific: line 206
If /bug-hunt errors or stops abnormally (crash, can't reach the app, child reports "diff empty" — shouldn't happen here since we're in Mode …
- Distinctive: line 212
Leave the working tree dirty for the user.
- Very specific: line 216
Only after every task is completed:
- Very specific: line 220
Add Date finished: YYYY-MM-DD HH:MM near the top
- Distinctive: line 258
If a section has a sub-INDEX.md but the user wants to re-hunt it, they should delete that subdirectory before resuming.
- Very specific: line 262
DO NOT FIX BUGS: Only find and document them.
- Distinctive: line 265
Process sections in numeric order: Do not reorder by severity or guesswork.
- Very specific: line 267
One section = one
/bug-huntinvocation: Do not split or merge sections. - Very specific: line 270
Keep MASTER_INDEX.md edits idempotent: Update the existing row in place rather than appending.
- Very specific: line 276
Write or read MASTER_INDEX.md skeleton (preserve skip markers on resume)
- Distinctive: line 282
After last task: write rollup, close browser, print recap
≈ “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.
Files
Bug Hunt All Command
You are tasked with running /bug-hunt against every top-level section of docs/APP_FEATURES.md and aggregating the results into a single, resumable session. You do NOT fix bugs. You orchestrate per-section hunts and produce a master index.
Argument
$ARGUMENTS
- If
$ARGUMENTSis empty: start a new sweep — create a fresh session directory. - If
$ARGUMENTSis a path to an existingdocs/bug-reports/full-app-sweep-*directory: resume that sweep — pick up where it stopped.
CRITICAL: You Are The Orchestrator
You will invoke /bug-hunt via the Skill tool once per non-skipped section. That child skill's instructions look like a complete end-to-end task (cleanup, final report, etc.) — they are not the end of YOUR task. They are one iteration of a loop.
When a /bug-hunt invocation returns:
- DO NOT stop, summarize, or report completion.
- DO NOT treat its final cleanup step as the end of the batch.
- Update your TaskList to mark that section done, refresh the MASTER_INDEX rollup row for that section, then immediately invoke
/bug-huntfor the next pending section in the same response. - Only after the TaskList shows every non-skipped section completed do you write the final MASTER_INDEX rollup and stop.
The single most common failure mode of this skill is stopping after the first section. Guard against it by checking the TaskList every time control returns to you: if there are any pending section tasks, the next thing you do is invoke /bug-hunt on the next one — no exceptions, no asking the user.
Phase 1: Parse docs/APP_FEATURES.md
Step 1: Read the catalog
Read docs/APP_FEATURES.md (repo-relative). The file is organized as:
## 1. Client Management
### 1.1 Subsection
- Feature bullet
- Feature bullet
### 1.2 Subsection
- ...
---
## 2. Appointments & Scheduling
...Step 2: Extract sections
Build an ordered list of top-level sections. For each ## N. Title heading:
number— the integerN(zero-padded toNNfor filenames)title— the full heading text afterN.(e.g.,Client Management,BioPsychoSocial Assessment (BPS))slug— kebab-case slug from the title (e.g.,client-management,biopsychosocial-assessment-bps). Strip parentheses, ampersands, slashes; collapse whitespace to single hyphens; lowercase.body— everything between this heading and the next##heading (the subsections + bullets). Keep verbatim — it is what you pass to/bug-huntas feature context.
Use grep -nE '^## [0-9]+\.' docs/APP_FEATURES.md to locate boundaries quickly. Parse every top-level section of docs/APP_FEATURES.md — do not hardcode a section count.
Phase 2: Session Setup
Step 3: Choose the session directory
New sweep ($ARGUMENTS empty):
- Generate a timestamp
YYYYMMDD-HHMMSSfrom local time. - Session dir:
docs/bug-reports/full-app-sweep-{YYYYMMDD-HHMMSS}/ - Create it. (Do not create per-section subdirs yet —
/bug-huntcreates its own when it finds its first bug.)
Resume ($ARGUMENTS is a path):
- Verify the path exists and matches
docs/bug-reports/full-app-sweep-*. If not, abort with a clear error. - Use it as the session dir. Do not regenerate
MASTER_INDEX.mdfrom scratch — preserve user edits (skip markers especially).
Step 4: Write the skeleton MASTER_INDEX.md (new sweep only)
Path: <session-dir>/MASTER_INDEX.md. Use this template — keep section lines on their own line so the user can pre-add [SKIP] markers before running:
# Full App Bug Sweep
**Date started:** YYYY-MM-DD HH:MM
**Source:** docs/APP_FEATURES.md
**Base URL:** [the $BASE_URL used for this sweep]
This sweep runs `/bug-hunt` against each top-level section of `docs/APP_FEATURES.md`. Each section gets its own subdirectory with its own `INDEX.md` and `BUG-*.md` files. Open any section's `INDEX.md` to feed it to `/fix-bug-index`.
To skip a section, add `[SKIP]` to its line below before (re-)running this skill. Strikethrough (`~~...~~`) also works.
## Progress
| # | Section | Status | Crit | High | Med | Low | Total | Subdir |
|---|---------|--------|------|------|-----|-----|-------|--------|
| 01 | Client Management | pending | – | – | – | – | – | [01-client-management/](01-client-management/INDEX.md) |
| 02 | Appointments & Scheduling | pending | – | – | – | – | – | [02-appointments-scheduling/](02-appointments-scheduling/INDEX.md) |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| NN | Last Section | pending | – | – | – | – | – | [nn-last-section/](nn-last-section/INDEX.md) |
## Sections
- [01. Client Management](01-client-management/INDEX.md)
- [02. Appointments & Scheduling](02-appointments-scheduling/INDEX.md)
- ...
- [NN. Last Section](nn-last-section/INDEX.md)
## Rollup
_Filled in after the sweep completes._Populate every row from the parsed section list — do not abbreviate with .... The Subdir column links are pre-populated even though the directories don't exist yet; they will exist after /bug-hunt runs for that section.
Step 5: Apply skip markers
Read the current MASTER_INDEX.md (the one you just wrote, OR the existing one when resuming). For each section row, a section is SKIPPED if its row contains any of:
[SKIP](case-insensitive)<!-- skip -->(case-insensitive)~~strikethrough~~wrapping any part of the row
Record the skip reason as the raw marker text. Skipped sections do not get hunted and do not appear in the TaskList.
Step 6: Detect already-completed sections (resume only)
For each section, check whether <session-dir>/{NN}-{slug}/INDEX.md already exists. If it does, treat that section as already completed:
- Read its severity counts (parse the summary table at the top of the sub-INDEX)
- Update the MASTER_INDEX row to
status: donewith those counts - Do NOT include it in the TaskList — there is nothing left to do
Phase 3: Create the TaskList
Create one task per non-skipped, not-yet-completed section using TaskCreate. Task title format: Bug-hunt section NN: <title>. Order = section number ascending.
The TaskList is your loop state. It is the only reliable way to know what's left when control returns from a child /bug-hunt call.
Print a one-paragraph plan to the user: total sections, count to hunt, count skipped, count already done. Do not ask the user to confirm. Proceed directly to Phase 4.
Phase 4: Pre-flight Once (Shared Setup)
Do these once, before the loop — /bug-hunt re-checks them, but doing them up front lets you fail fast and gives the child something to share.
Step 7: Base URL and dev server
This checkout may be the main repo (default port) or a /build-feature worktree with its own
server and database (PORT= in .env). Resolve the URL first, then check the server —
and pass $BASE_URL down to each /bug-hunt child so the whole sweep stays on one app.
BASE_URL="$(bin/dev-url)" # $PORT > PORT= in .env > 3000
curl -sk -o /dev/null -w "%{http_code}" "$BASE_URL" 2>/dev/null || echo "not running"If not 200, start bin/dev in the background (it reads PORT= from .env) and wait until the curl returns 200 (10–15s typical).
Step 8: Browser
Resize for staff/admin (most sections):
mcp__playwright__browser_resize(width: 1280, height: 800)Client Portal sections (13, parts of 11.4) require mobile (375x667). /bug-hunt will resize as needed per its viewport strategy — you do not need to switch ahead of time.
Step 9: Authenticate once
Navigate to $BASE_URL, request a magic link for admin@example.com (full access covers nearly all sections), pull the link from tail -100 log/development.log | grep -A5 "magic_link", and navigate to it. Verify you land on the dashboard.
Most sections work as admin. Two exceptions where the child should switch user:
- 13. Client Portal — needs a client-side session. The child can re-auth via portal verification token from the dev logs.
- 9. Supervision — supervisor role (
supervisor@example.com) is more representative.
/bug-hunt is allowed to re-authenticate as a different user if needed. Do not block on this.
Phase 5: The Hunt Loop
Step 10: For each pending task
- Pick the first task with status
pending. Mark itin_progressvia TaskUpdate. Build the
$ARGUMENTSfor/bug-hunt. This MUST include theOutput dir:override so the child writes into the master session dir instead of a fresh timestamped sibling, and theBase URL:override so the child hunts the same server this sweep resolved in Step 7:Section NN: <Title> Output dir: docs/bug-reports/full-app-sweep-<TS>/<NN>-<slug>/ Base URL: <the $BASE_URL resolved in Step 7> Features in this section (from docs/APP_FEATURES.md): <verbatim body of the section: ### subsections and bullet lists>Pass that block as the argument to the Skill tool when invoking
/bug-hunt. The child skill honors bothOutput dir:andBase URL:— confirm it wrote into the expected subdir after it returns.- When
/bug-huntreturns: a. Read<session-dir>/<NN>-<slug>/INDEX.mdif it exists (the child only creates it if it found at least one bug). If it does not exist, treat the section as zero bugs found. b. Parse the severity counts from the sub-INDEX summary table. If zero bugs, write a stub sub-INDEX at<session-dir>/<NN>-<slug>/INDEX.mdwith body:
Creating the stub matters: it makes resume detection work correctly and gives the master INDEX a valid link. c. Update the MASTER_INDEX row for this section: set status to# Bug Hunt Summary: <Title> **Date:** <ISO> **Result:** No bugs found. | Severity | Count | |----------|-------| | Critical | 0 | | High | 0 | | Medium | 0 | | Low | 0 | | **Total** | **0** |done, fill in the severity columns. d. Mark the taskcompletedvia TaskUpdate. e. Anti-stop check — see the checklist at the end of this file. If any task remainspending, immediately go back to substep 1. Do NOT pause, summarize, or hand back to the user. - If
/bug-hunterrors or stops abnormally (crash, can't reach the app, child reports "diff empty" — shouldn't happen here since we're in Mode A, but defend against it):- Mark the section's MASTER_INDEX row as
errorand record a one-line reason in the row's notes column (you may add aNotescolumn to the table if useful). - Mark the task
completed(it is done from the loop's perspective; the outcome is justerror). - Continue with the next pending task.
- Mark the section's MASTER_INDEX row as
Step 11: Do not commit
Leave the working tree dirty for the user. Do not run git add, git commit, git stash, git reset, or git push. Read-only git commands are fine.
Phase 6: Final Rollup
Only after every task is completed:
Step 12: Write the rollup
Update <session-dir>/MASTER_INDEX.md:
- Add
**Date finished:** YYYY-MM-DD HH:MMnear the top - Fill in the
## Rollupsection with:
## Rollup
| Severity | Count |
|----------|-------|
| Critical | X |
| High | X |
| Medium | X |
| Low | X |
| **Total** | **X** |
**Sections hunted:** X
**Sections skipped:** Y (see [SKIP] markers above)
**Sections with errors:** Z
**Sections with zero bugs:** W
To fix bugs from a single section, run:
`/fix-bug-index docs/bug-reports/full-app-sweep-<TS>/<NN>-<slug>/INDEX.md`
To process every section's bugs sequentially, run `/fix-bug-index` against each sub-INDEX in turn. There is no flat master index of individual bugs by design — keeping per-section scope makes review and triage tractable.Step 13: Close the browser
mcp__playwright__browser_close.
Step 14: Final message to the user
Two lines:
Sweep done. Hunted: X | Skipped: Y | Errors: Z | Bugs found: <total>Master index: docs/bug-reports/full-app-sweep-<TS>/MASTER_INDEX.md (nothing committed)
Resumability Notes
- The master session dir is the source of truth for progress. If the conversation crashes or is interrupted, the user re-invokes
/bug-hunt-all <path-to-session-dir>and you pick up. - TaskList state is NOT persisted across conversations. On resume you rebuild it from the disk: any section whose sub-INDEX.md exists counts as completed; everything else (minus skips) goes back into pending.
- Skip markers added between runs are honored — re-read MASTER_INDEX.md fresh on each resume.
- If a section has a sub-INDEX.md but the user wants to re-hunt it, they should delete that subdirectory before resuming.
Important Guidelines
- DO NOT FIX BUGS. Only find and document them. The user runs
/fix-bug-indexafterward. - Do not commit, stage, stash, push. The user reviews manually.
- Respect skip markers exactly as
/fix-bug-indexdefines them:[SKIP],<!-- skip -->,~~strikethrough~~. - Process sections in numeric order. Do not reorder by severity or guesswork.
- Pass
Output dir:in every/bug-huntinvocation. Otherwise the child writes to a sibling timestamped dir and the master index links break. - One section = one
/bug-huntinvocation. Do not split or merge sections. The catalog is the contract. - Don't pre-read the section's app code yourself. That's the child's job. Your job is dispatch + rollup. Reading the catalog body is enough.
- Don't replay authentication unless the child explicitly fails because the session expired. The child shares the parent's browser session.
- Keep MASTER_INDEX.md edits idempotent. Update the existing row in place rather than appending; the user may resume mid-sweep and stale duplicate rows would break parsing.
Execution Flow
- Parse
docs/APP_FEATURES.md→ ordered list of 30 sections - Decide new vs. resume from
$ARGUMENTS - Write or read MASTER_INDEX.md skeleton (preserve skip markers on resume)
- Detect already-completed sections from existing sub-INDEX.md files
- Apply skip markers
- TaskCreate one task per non-skipped, not-yet-done section
- Print plan, do shared pre-flight (server, browser, auth)
- Loop: while any task is
pending, pick next, invoke/bug-huntwithOutput dir:override, update MASTER_INDEX row from sub-INDEX, mark completed, immediately continue - After last task: write rollup, close browser, print recap
Anti-stop checklist (after every /bug-hunt invocation returns)
- Did the sub-INDEX exist? If not, did I write a zero-bugs stub?
- Did I update the MASTER_INDEX row with the new counts and status?
- Did I mark the current task
completed? - Are there any
pendingtasks left? - If yes → invoke
/bug-huntfor the next one right now. Do not stop, do not write rollup, do not ask the user. - If no → write rollup, close browser, print recap.
Begin by reading docs/APP_FEATURES.md and parsing the section list.
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
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.

