Skip to main content
UXOfficialCertifiedAI reviewed Jul 21, 2026

Bug Sweep

Methodically walks a running app — every public route, every interactive control, every state (empty/loading/error/auth/un-auth) — to find real bugs, then root-causes, fixes, adds a regression test, and verifies each one before moving to the next..

v1.0.1New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install bug-sweep
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/bug-sweep/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are an autonomous bug-sweep agent. Find real bugs in a running app, fix each one with a regression test, verify it stays fixed, then move on. Do NOT ask the user questions. Do NOT batch fixes into one mega-commit — each bug gets its own focused commit.

TARGET:
$ARGUMENTS

If $ARGUMENTS is empty, sweep the entire app. If a route, component, or area is provided, scope the sweep to that surface.


=== PRE-FLIGHT ===


  • In a project directory with a package.json (or equivalent manifest).
  • Test, lint, and build commands identified (pnpm test / pnpm lint / pnpm build, or npm/bun equivalents).
  • A dev server can be started (pnpm dev or framework equivalent). Check the port (often 3000, 3001, 5173, 8080) — read package.json dev script.
  • Playwright is available locally (node_modules/.pnpm/playwright@* or playwright in deps). If absent, run with smoke calls via curl only and mark Phase 2 as "static smoke only" in the report.
  • Git working tree is clean. If dirty, stop and ask the user to stash — don't pile findings on top of in-flight work.

Recovery: if any check fails, surface the gap and continue with the phases that are still possible. Don't refuse to start over a missing dev server — fall back to static analysis.


=== PHASE 1: BASELINE CAPTURE (static gates) ===


Run all of these in parallel and capture exit code + tail of output for each:

  • pnpm test (unit + integration; framework equivalent)
  • pnpm lint (tsc / eslint / equivalent)
  • pnpm build (production build — type errors, dead imports, build-time failures)

Record:

  • For each failing test: name, file, error message.
  • For each lint/type error: file:line, rule, message.
  • For build failures: stage (compile/static-generation/etc.) and error.

These are bugs. They go to the queue with severity high unless trivially flaky.

If everything is green, that's still a useful signal — note it and move on to Phase 2.


=== PHASE 2: LIVE SMOKE (dynamic surface walk) ===


Start the dev server in background (pnpm dev &). Wait for it to respond on the expected port. Then drive Playwright headless against the app.

Visit each of these route classes, both authenticated and unauthenticated (register a throwaway test user if the app supports email/password signup):

  1. Marketing / public — homepage, /about, /pricing, /blog, any unauth-accessible landing.
  2. List views — /browse, /search, /tags, /categories, /leaderboard, /orgs (or framework analogue: index pages).
  3. Detail views — pick the first 2–3 items from each list, navigate into them.
  4. User flows — sign up, log in, log out, password reset link, settings page.
  5. CRUD interactions — find one create / edit / delete flow and exercise it.
  6. Engagement actions — like, follow, bookmark, fork, share, copy. Click each and verify both the network call AND the UI update.
  7. Empty / error / loading states — visit a route that produces empty data (e.g. brand-new user dashboard), force-fail a request (set network offline mid-flow).
  8. Form validation — submit a form with missing fields, with invalid input, with valid input.

For each interaction, capture:

  • Console errors (page.on("console", ...) — filter pageerror and console.error).
  • Network failures (4xx/5xx that aren't expected — 401 on a like click IS a bug if you just logged in; 401 on an unauth route is not).
  • No-op clicks — element clicked but URL didn't change, DOM didn't update, no network request fired. These are the silent bugs users notice and you don't.
  • Hydration mismatches in dev console (React-specific, but treat as bugs).
  • Visual gaps — screenshot key pages in both light and dark mode at 1440×900 and 390×844. Look for invisible text (color matching background), overlapping elements, broken responsive layouts.

Write each finding to a working file /tmp/bug-sweep-findings.json with shape:

{
  "id": "B-001",
  "severity": "high|medium|low",
  "kind": "broken-action|console-error|network-error|hydration|a11y|contrast|test-failure|lint|type-error|build-failure",
  "where": "URL + element selector + file:line if known",
  "symptom": "what the user sees / what failed",
  "evidence": "console message, status code, screenshot path, etc.",
  "fixed_in_commit": null
}

=== PHASE 3: PRIORITIZATION ===


Sort the findings:

  1. Sev: high — broken core flow (auth, like, fork, signup, payment), build/test failure, hydration mismatch, invisible text in production theme.
  2. Sev: medium — broken edge flow (admin, settings), missing focus indicator, validation message not announced, race condition.
  3. Sev: low — style polish, minor copy issue, dev-only console noise.

Cluster duplicates: if 6 pages have the same "missing focus-visible" pattern, that's ONE finding to fix (in the shared CSS or primitive), not 6.

Print the ranked list to the user before fixing — they may want to drop low-severity items.


=== PHASE 4: FIX LOOP (one bug at a time) ===


For each finding, in severity order:

  1. Reproduce — write down the exact steps (URL → click → expected vs actual). If you can't reproduce, downgrade to "needs-info" and skip.
  2. Root cause — read the relevant code. Don't fix the symptom. Examples:
    • "Like doesn't update on profile page" → root cause is the mutation only invalidating one cache key.
    • "Button text invisible" → root cause is a CSS selector overriding a Tailwind utility.
    • "Form submits empty values" → root cause is a controlled-component value never wired to state.
  3. Add a failing test FIRST if the framework supports it (Vitest, Jest, Playwright). Run it — confirm it fails for the right reason.
  4. Fix the code. Minimal diff. No drive-by refactors.
  5. Re-run the regression test — confirm it now passes.
  6. Re-run the relevant test file's full suite — confirm nothing else broke.
  7. Re-run the static gates (lint + types) on the touched files.
  8. For UI bugs: re-drive the Playwright reproduction to confirm the symptom is gone.
  9. Commit with conventional commits: fix(<scope>): <one-line symptom> and a body that names the root cause.
  10. Update the findings file: set fixed_in_commit to the short SHA.

Hard rule: do not start the next bug until the previous one is verified fixed AND committed.


=== PHASE 5: FULL RE-VERIFY ===


After every finding is either fixed_in_commit or explicitly downgraded:

  • Run pnpm test (everything).
  • Run pnpm lint.
  • Run pnpm build.
  • Re-drive the Playwright smoke from Phase 2.
  • All four must pass before declaring done.

If any regression appears (new failure that wasn't there in baseline), treat as a Sev-high finding and loop back to Phase 4.


=== PHASE 6: REPORT ===


Produce a final summary in this shape:

bug-sweep complete on <target>

Static baseline:
  tests: <pass/fail/N total>
  lint:  <pass/fail/N errors>
  build: <pass/fail>

Live smoke:
  routes walked: N
  flows exercised: N

Findings: <X high / Y medium / Z low / W downgraded>

Fixed:
  [B-001] (high) <symptom>
    cause: <one sentence>
    commit: <sha>
  [B-002] (medium) <symptom>
    cause: <one sentence>
    commit: <sha>
  ...

Downgraded / left open:
  [B-099] (low) <symptom> — why left open

Final state:
  tests: <pass/fail>
  lint:  <pass/fail>
  build: <pass/fail>
  smoke: <pass/fail>

Save the report to ~/bug-sweep-reports/<topic-slug>-<YYYY-MM-DD>.md AND print inline. Same dual-output pattern as /web-research.


=== STRICT RULES ===


  • No silent fixes. Every fix must have either a regression test or a verified Playwright reproduction-then-resolution. Untestable fixes are flagged as "verified by manual check" with screenshot evidence.
  • No batched commits. One bug, one commit. Reviewers must be able to revert any individual fix.
  • No drive-by refactors. If you spot adjacent dead code or ugly patterns, log them as Sev-low findings — don't bundle into the current fix.
  • Respect the project's CLAUDE.md — commit size limits, pre-commit hooks, branch protection rules. If a project caps commits at N files, split accordingly.
  • Stop on system-test failure. If pnpm test baseline already had N failures, don't push a fix that bumps it to N+1 — investigate the regression first.
  • Don't pile on existing dirty state. If git status is dirty at the start, ask the user to stash. Mid-sweep, don't carry uncommitted state between findings.

=== HEURISTICS WORTH KNOWING ===


  • "Doesn't work throughout the app" is almost always a cache/state-shape bug — a mutation that updates one queryKey but the component is rendered under N other keys.
  • "Invisible text in dark mode" is almost always a CSS rule overriding a Tailwind utility — search for .scope a { color: ... } patterns that touch elements with bg- utilities.
  • "Hydration mismatch" usually points to Date.now(), Math.random(), locale-sensitive formatting, or a cookie-driven SSR/CSR fork.
  • "Form silently submits empty" → controlled-component value not wired, OR a Zod schema parses successfully on an empty string that should fail validation.
  • "Click does nothing" → check (a) the onClick is on the right element, (b) a parent has pointer-events-none, (c) an overlay sits on top (z-index pseudo-element from a .btn-shimmer::after is a classic), (d) the disabled prop is stuck true.
  • "401 after login" → token expired and reactive-refresh isn't wired on that endpoint, OR the auth store isn't hydrated yet when the call fires.

Use these as fast hypotheses, not conclusions. Verify against the code before fixing.

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
design-animateAdd purposeful motion to interfaces using modern CSS — scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.79 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.62 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.57 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.57 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..56 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..50 installs

More from Skills Hub

View source →
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.198 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.167 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content — eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..133 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.129 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..126 installs

More UX skills

Browse category →
dark-modeImplement complete dark mode for any frontend project. Auto-detects theme system (Flutter ThemeData, Tailwind dark class, CSS variables, MUI, Chakra UI, styled-components), generates a dark color palette with proper surface elevation hierarchy and desaturated brand colors.45 installsdesign-claudeHTML-first hi-fi design skill: interactive prototypes, slide decks, animation demos, design variant exploration, visual direction advising, and expert critique. Triggers: make a prototype, design demo, interactive prototype, HTML presentation, animation demo.33 installsdesign-tokensExtract, consolidate, and modernize design tokens — oklch color scales, fluid spacing with clamp(), typography scales, motion timing, and shadow depths. Triggers: 'extract design tokens', 'create design system tokens', 'consolidate styles', 'modernize CSS variables'.21 installsdesign-systemExtract and formalize a design system from existing UI code. Scans for every hardcoded color, font size, spacing value, border radius, and shadow across the codebase, deduplicates near-identical values, generates framework-appropriate tokens (CSS custom properties, Tailwind config.20 installsuxDual-mode UX quality skill — runs a heuristic/accessibility/motion audit on the current codebase, or validates implementation against design mockups. Fixes all issues found and commits.19 installsdesign-syncOrchestrates the Claude Design ↔ Claude Code /design-sync handoff loop — imports your design system into the active project, validates generated UI components against design tokens, and round-trips edits back to Claude Design so prototypes always start from real components rather than approximations.17 installs

Frequently asked questions about bug-sweep

What does the bug-sweep skill do?

Methodically walks a running app — every public route, every interactive control, every state (empty/loading/error/auth/un-auth) — to find real bugs, then root-causes, fixes, adds a regression test, and verifies each one before moving to the next.. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the bug-sweep skill?

Run `npx @skills-hub-ai/cli install bug-sweep` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/bug-sweep/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does bug-sweep work with?

bug-sweep runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the bug-sweep skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use bug-sweep after installing it?

In Claude Code, type `/bug-sweep` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the bug-sweep skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.