/alamops-skills:break-fixfrom alamops-skills
Runs adversarial end-to-end bug hunts on running apps, then reproduces, root-causes, fixes defects, and writes failing regression tests. Use for QA sweeps, chaos testing, or 'break my app' requests.
Ships in alamops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alamops/skills --plugin alamops-skillsTwo jobs, in order. Break it: drive the running app until it does something it shouldn't. Fix it: for each real defect, find the actual cause, encode it as a failing e2e test, fix it, and watch the test go green.
The regression test is not paperwork at the end — it's how you prove the bug was real and that the fix addresses it. A test written after a fix, that has never once failed, guards nothing.
The instinct when handed an app is to use it correctly: fill the form with plausible data, click the buttons in order, admire the success toast. That path is the one the developers walked a hundred times while building it. It is already green.
Bugs live where the implied contract of the UI is violated — where a user did something the code never imagined. So your job is to be a bad user, deliberately and systematically. Not random flailing (that finds little and wastes tokens), but targeted violation of the assumptions you can see the code making.
Two things make a hunt productive rather than performative:
parseInt(req.query.page) with no guard, you now know exactly what to type in the URL. When a form validates on the client, go around it.Unhandled promise rejection and the network tab shows a 500 is a bug that shipped. Most of what you'll find lives in the console, the network panel, and the server's stderr — not the viewport.Present this at the start and keep it current — a hunt is long and the user should see where you are:
Break-fix progress — <app / surface>
- [ ] Phase 0 Scope & safety confirmed (target env, accounts, off-limits actions)
- [ ] Phase 1 Recon (app running, e2e harness found, surface map, soft spots)
- [ ] Phase 2 Hunt (N surfaces attacked, M anomalies logged)
- [ ] Phase 3 Triage (reproduced, deduped, classified) — X confirmed bugs
- [ ] Phase 4 Root cause per bug
- [ ] Phase 5 Regression tests written & observed failing (red)
- [ ] Phase 6 Fixes applied, tests green, full suite clean
- [ ] Phase 7 Report written (docs/bug-hunts/<date>-<slug>.md)
Short, one pass, then move. Ask only what you can't determine yourself:
git log tells you what's freshest and therefore least battle-tested.If the user says "just go," proceed with the safest reading — local environment, don't press anything that looks irreversible — and state those assumptions in the report.
You need three things before attacking: a running app, a place to put the eventual test, and a map of where to aim.
Get it running. Find the dev command, required services (db, queue, cache), env vars, and seed data — README, package.json scripts, Makefile, compose files, .env.example. Start it as a background process and wait for readiness (poll the port or health endpoint). Capture the server's stdout/stderr to a file you can grep later; server-side stack traces are among your best evidence and they scroll away if you don't.
Find the e2e harness. Playwright, Cypress, Detox, Puppeteer, supertest-against-a-live-server — whatever exists, the regression tests you write in Phase 5 belong in it, using its fixtures and conventions. Read references/e2e-harnesses.md for detection cues, the run recipe per framework, and what to do when there is no harness at all. Do this now, not in Phase 5: if there's no harness, you want to know before you've found six bugs with nowhere to put their tests.
Drive the app. Prefer the repo's own e2e tooling in headed or debug mode — it shares selectors and auth setup with the tests you'll write. Browser-automation tools (e.g. a Chrome MCP) are a fine alternative for exploration, especially for messy interactions like real double-clicks, tab switching, and back-button abuse. Whichever you use, the test still lands in the repo's harness.
Map the surface, then find the soft spots. List routes/screens, forms and their fields, state-changing actions, roles, and anything asynchronous. Then spend a focused pass in the code looking for assumptions to violate — this is what turns a random walk into a hunt:
params/query/body with no bounds.useEffect/lifecycle code that assumes data is loaded, arrays are non-empty, or an object is non-null.index as a React key, storing derived state, or caching across navigations.git log --since on the scoped area) — new code is under-exercised code.Record each soft spot as a hypothesis with a file:line anchor and the attack that would prove it. Attacks derived from a specific assumption hit far more often than generic fuzzing.
Now break it. Work surface by surface so your report is organized and your repros stay clean.
Rather than working down a flat checklist, run each surface past these personas. They generalize better than any enumeration, because each one embodies a class of assumption:
| Persona | What they do | Assumption they break |
|---|---|---|
| The impatient one | Double- and triple-clicks submit, hits Back the instant a spinner appears, refreshes mid-transaction, mashes Enter | One click = one request; the flow completes |
| The confused one | Wrong order, skips steps, deep-links into step 3 of a wizard, uses Back as Undo, bookmarks a modal | Users arrive through the front door, in order |
| The clipboard | Pastes 12KB of text, emoji-only names, HTML, a leading =, a phone number with spaces into a number field | Input resembles what the placeholder suggests |
| The polyglot | RTL text, CJK, combining diacritics, zero-width characters, O'Brien-Smith, a 40-char single word | Text is short, LTR, ASCII, and word-wraps |
| The multitasker | Two tabs on one record, edits both, logs out in one and keeps clicking in the other | One session, one tab, one writer |
| The commuter | Goes offline mid-request, slow 3G, a request that never resolves, one that 500s | The network is fast and always answers |
| The nosy one | Edits IDs in the URL, replays API calls with their own session against their other account's resources, removes required params | The client is the only caller and it behaves |
| The extremist | 0, -1, 999999999, empty list, exactly one item, 10k items, year 1900 and 2999, 23:59 on a DST boundary | Data lands in the comfortable middle |
references/attack-playbook.md expands each of these into concrete, ready-to-use payloads and step sequences organized by surface (forms, navigation, auth/session and approvals, concurrency, lists/data, uploads, network failure, time/locale, direct API, background work with restarts and a second instance). Read it when you start attacking a surface — it's the working reference, and it carries the specific strings and sequences you don't want to reinvent.
Before and during every attack, keep these open, because most failures never reach the screen:
undefined in the path, requests that never complete.undefined is not a function, warnings about connections or transactions.Don't hold findings in your head across a long hunt — write each one down the moment you see it, with enough detail to reproduce it later from cold. Minimum: the surface, the exact steps, what you expected, what happened, and the evidence (console excerpt, response body/status, server trace, screenshot or trace file path). A finding you can't reproduce tomorrow will be dropped in triage, and that's wasted work.
When something breaks, immediately probe the neighborhood. A bug is usually an instance of a class: if one form accepts a 12KB name, try its siblings; if one endpoint doesn't check ownership, check the others on the same resource. Finding the class is worth far more than finding the instance, and it changes what the fix has to cover.
Raw anomalies aren't bugs yet. For each one:
Reproduce from a clean state. Fresh session, seeded data, the recorded steps and nothing else. If it reproduces, it's confirmed. If it only reproduces sometimes, that's also a finding — intermittent means a race, and races are among the most valuable bugs you'll find — but say plainly that it's intermittent and note the hit rate.
Classify it, because not everything weird is a defect:
Dedupe and generalize. Five symptoms from one missing guard is one bug with five manifestations — report it that way, since it gets one fix and one root cause. Conversely, if the same attack works on four different endpoints, that's one class with four sites, and the fix has to cover all four.
Assign severity by consequence, not by how dramatic the failure looked: critical (data loss/corruption, cross-account exposure, flow completely broken), high (a real user hits it on a normal path, or it silently produces wrong data), medium (needs an unusual sequence but is genuinely reachable), low (contrived, cosmetic, or self-inflicted).
Then check in with the user. Present the confirmed list — severity, one-line description, repro — and say which you propose to fix now. Proceed with the obvious ones without waiting; pause for anything whose fix is architectural, changes product behavior, or is bigger than the hunt itself. The point of the gate is to avoid a surprise refactor, not to make the user approve every line.
For each bug you're fixing, find the actual defect before touching anything. Follow the evidence from the symptom inward: the stack trace's deepest frame in your code, the request that failed and the handler that served it, the state that was wrong and the write that made it wrong. Read the surrounding code until you can state the cause in one sentence.
Then ask two questions that determine whether the fix will hold:
data[0], the cause may be an API that returns null where the type says array. Fixing the outer layer leaves every other caller exposed.Write the cause into the bug record with file:line anchors before you write any code. If a bug resists explanation, say so and fix nothing — a speculative fix on a misunderstood cause usually moves the symptom rather than removing it.
Write the e2e test before the fix, and run it against the unfixed code.
This ordering is the whole value of the phase. A test written after a fix has never demonstrated that it can detect the bug, so it may be asserting something that was always true — a green check that guards nothing. Watching it fail first is the only proof you have that it will catch a regression.
checkout does not create duplicate orders on double-submit), not after the feature.references/e2e-harnesses.md for per-framework idioms.sleep. A flaky regression test gets skipped within a month and the bug comes back.Record the red output — it goes in the report as evidence the test does its job.
Apply the smallest change that removes the cause identified in Phase 4, matching the conventions of the code around it. Resist bundling refactors into a bug fix — they make the diff hard to review and blur what actually fixed the problem.
Before you write it, read the sections of references/build-rules.md (next to this file) for what the fix touches: Always, plus trust, data, external, concurrency, state or platform. A fix that adds a retry without a cap, or a new path without the guard, is the next bug report. After you write it, run that file's self-check on the files you changed.
Then close the loop, in this order:
python3 scripts/quality_gates.py suite <junit-or-json-report> --scan-tests <test-dir> does this from the runner's report (scripts/ sits next to this file). A suite that passes without running hasn't checked anything.-1 may still accept -0.5.If several bugs share a cause, one fix may turn several tests green at once — that's a good sign your root cause was real, and worth noting in the report.
Fixed, partial, or not fixed: say which, with evidence. A bug is fixed when its regression test went red on the unfixed code and green after, the manual repro no longer works, and the sibling sites from Phase 4 are covered. If any of that is missing, it's partial: say what remains. Never round partial up to fixed. A false "fixed" gets rediscovered, and the second discovery costs trust as well as time.
Commit each bug's test-plus-fix together, so the history shows the failing case alongside its remedy.
Save the hunt to docs/bug-hunts/<YYYY-MM-DD>-<slug>.md (create the folder if missing) and summarize it in chat. Use this structure:
# Bug hunt — <app / surface> — <YYYY-MM-DD>
| Field | Value |
| --- | --- |
| Target | <base URL, environment> |
| Commit | <SHA> |
| Scope | <surfaces attacked> |
| Harness | <e2e framework + command> |
| Result | <N confirmed> (<critical/high/medium/low>) · <M fixed> · <K deferred> |
## Summary
<2–4 sentences: what was attacked, what broke, what got fixed.>
## Confirmed bugs
### BUG-1 [severity] <one-line title>
- **Surface:** <route / screen / endpoint>
- **Repro:** <numbered steps from a clean state>
- **Expected / Actual:** <…> / <…>
- **Evidence:** <console excerpt, status code, server trace, artifact path>
- **Root cause:** <one sentence> — `path/file.ts:LINE`
- **Also affects:** <sibling call sites, or "none found">
- **Fix:** <what changed> — `path/file.ts:LINE`
- **Status:** fixed / partial (<what remains>) / not fixed (<why>)
- **Regression test:** `e2e/<file>:<test name>` — failed before the fix on its assertion (<the failure line>), passes after
- **Paths into the protected action, after the fix:** <each one, and the check it passes through> (security and data-integrity bugs)
## Not fixed (and why)
<Deferred bugs, with severity and the reason: needs a product decision, out of scope, needs infra.>
## Nits & observations
<Non-defects worth knowing. One line each.>
## Attacked without finding anything
<Surfaces and attack classes that came back clean — this is what tells the reader
how much of the app the hunt actually covered.>
## Suite status
<Command run, pass/fail counts, anything still failing.>
The "attacked without finding anything" section matters more than it looks: without it, a report with three bugs is indistinguishable from a hunt that only tried three things. Coverage is what makes the result interpretable.
A hunt parallelizes well if the agents don't share mutable state. If sub-agents are available and the surface is large, give each one a distinct surface and its own test account and data, and have it return anomaly records rather than fixes. You keep triage, root cause, and fixing — those need the whole picture, and parallel agents editing the same code collide.
The hazard to respect: two hunters against one app instance will corrupt each other's repros (one deletes the record the other is mid-edit on), and you'll spend the savings chasing phantom intermittency. Separate accounts are the minimum; separate instances are better. If you can't isolate them, hunt sequentially — a clean serial hunt beats a fast, unreproducible one.
These phases are the backbone, not a ritual. A user pointing at one just-shipped form wants a focused hunt on that form, not a full-app sweep — collapse recon and skip the fan-out. A user who says "just find bugs, don't fix anything" gets Phases 0–3 and a report. A user who hands you a known bug and asks for a regression test starts at Phase 4.
A user who hands you review findings or bug reports to fix also starts at Phase 4, once per finding, and the finding's scenario is the repro:
What shouldn't bend: attacks derived from what the code actually assumes, findings backed by a deterministic repro, root cause before fix, a test observed failing for the bug before it's trusted to guard anything, and a fix that is itself attacked before it's called done.
15 skills in this plugin
/appstore-review(alamops) Use whenever the user wants their iOS app checked against Apple's App Store Review Guidelines and submission requirements, or asks if Apple will reject something. Triggers — "will Apple reject this?", pre-submission audit, App Store readiness, pre-flight before TestFlight or App Store Connect upload, ITMS upload errors, rule compliance (3.1.1, 4.8, 5.1.1, 2.5.19…), iPhone Duo / foldable readiness, Xcode/SDK minimums and deadlines, or whether a change is allowed (subs moved off IAP to Stripe or a web link, tracking SDKs, sending user data to an AI API, remote feature flags, social login, permissions, privacy manifest, ATT, account deletion, age rating). Native Swift, React Native, Expo, Flutter, Capacitor, Unity. Fetches the live guidelines and Apple Developer News as exact text, then returns findings keyed by guideline number with severity, file:line evidence and fixes, plus upcoming deadlines. Read-only. Not for general code review, implementing features, or store-listing ASO (use appstore-seo)./appstore-seo(alamops) App Store Optimization (ASO) for the iOS App Store and Google Play — audit, write and rewrite store listings to rank and convert. Triggers — "/appstore-seo", app store SEO/ASO, "improve my app store ranking", "nobody finds my app", keyword research, writing app name / subtitle / keyword field / short & full description / promotional text / release notes / screenshot captions, auditing a listing from an App Store ID or store link, competitor teardowns, localizing a listing, store A/B tests (PPO, Play experiments), custom product pages and their keywords, creative briefs for screenshots, iPhone Duo sets and the new product page header / search result assets, pre-launch metadata, and **Apple Ads keyword and campaign planning** (Brand/Generic/Competitor/Discovery, negatives, Search Terms). Pulls live listings and competitors from Apple's public endpoints, then emits character-validated fields saved under `docs/appstore/`. Not for App Review compliance (use `appstore-review`) and not for website SEO./business-review(alamops) Analyzes a product/business from its public-facing materials (landing, pricing, onboarding, docs, app/UI, screenshots), separates real value from claimed value, generates 5–8 concrete buyer personas, ranks them across abundance / pain / urgency / WTP / retention / strategic leverage, recommends a primary ICP plus secondary and weak-fit segments, pressure-tests positioning and pricing against alternatives, and proposes messaging, landing-page, onboarding, demo, and product-experience improvements. Saves Markdown artifacts under `docs/` (personas, ICP analysis, positioning, product-experience). Read-only on source; prefers strategic clarity over flattery. Use when asked to analyze a business/product, generate personas, find or rank an ICP, pressure-test positioning or pricing, review a landing page or onboarding, or get a buyer-side strategic critique./code-review(alamops) Performs a thorough, read-only code review of any change source — a pull request, a git diff, uncommitted edits, recent commits, or code just produced in the conversation — and re-reviews a fix round, scoring each earlier finding fixed / partial / not fixed. Flags bugs; security and trust-boundary gaps (tenant isolation, authz, approvals bound to the wrong version, untrusted input driving privileged state, atomicity, retry safety, RLS self-recursion); reliability under the real deployment (two instances, crashes mid-step, network calls inside transactions, unbounded retries); code that is written and tested but never wired into production; PR-body and doc claims the code doesn't back; tests that cannot fail; performance, config and schema drift; and blast-radius gaps — checked against the repo's own rules and specs. Returns findings with severity, file:line, a failure scenario and a fix; never edits code. Use for any code review, PR review, re-review, diff review, or critique of recent changes./create-tasks(alamops) Senior Technical PM that turns a PRD, brief, ticket, or conversation into a small set of deep, end-to-end dev/QA tasks. Performs mandatory deep repo-context analysis (entry points, data models, utilities, API patterns, sibling code paths) before drafting, asks one structured pass of clarifying questions, then writes each task with problem, business rules, technical goals, dependencies, file paths, related existing code, data model, API specs, non-functional requirements, implementation guide, error handling, blast radius, testing, acceptance criteria, QA steps, and design specs. Layer-prefixed titles (`[Full-Stack]`, `[Backend+DB+Tests]`, `[Frontend+Backend+Tests]`, `[DevOps]`). No time, effort, or staffing estimates. Saves an INDEX plus one task file under `docs/tasks/<feature-slug>/`; read-only on source code. Use when asked to create, draft, scaffold, or break down dev/QA tasks, engineering tickets, sprint tasks, or implementation tickets from a PRD, spec, or feature description./execute-plan(alamops) Executes only the coding work of an approved implementation plan, with parallel sub-agents that never collide. Cuts a branch and records the base SHA, checks no two tasks in a wave own the same file, gives each task's agent a self-contained brief with a no-TODO completeness clause, holds wave barriers, isolates unavoidable shared files in worktrees, routes reported remainder into the next wave, and commits a checkpoint per wave. Use when the user hands over a plan (`docs/plans/<slug>.md`, a `write-plan` output, or a task breakdown with file ownership) and limits the job to writing code — just the code and I'll review and test it myself, only run the coding waves, fan these tasks out with no tests — or asks for this skill by name. A plain "execute this plan" with no such limit belongs to `implement`, which carries the plan through review and tests to green. Phase 4 of `implement`, runnable alone. Not for writing the plan (write-plan) or a single pinpointed edit.Other plugins' skills for the same job