agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when fixing a reported bug end to end. Enforces a disciplined sequence — reproduce, write a failing test, fix minimally, verify, prevent recurrence — and blocks the common failure mode of patching symptoms. Trigger on "fix this bug", "users are reporting that", "this
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol -a windsurf -y
name: bug-fix-protocol description: Use when fixing a reported bug end to end. Enforces a disciplined sequence — reproduce, write a failing test, fix minimally, verify, prevent recurrence — and blocks the common failure mode of patching symptoms. Trigger on "fix this bug", "users are reporting that", "this regressed in the last release", "need a hotfix for". Do not use when the cause is still unknown — see the debugging skill. metadata: category: development version: 1.0.0 tags: [bugfix, testing, root-cause, process]
Turn a bug report into a merged fix without introducing a second bug. The protocol is deliberately rigid: it exists to prevent the two most common failures — fixing the symptom, and fixing the cause without proving it.
1. **Reproduce before reading code.** If you cannot reproduce it, the report is incomplete — go back for the missing detail. Do not guess. 2. **Write the failing test.** In the real test suite, at the right level. It must fail for the right reason, with a clear message. 3. **Find the cause.** Not the line where it crashed — the decision that made the crash possible. 4. **Fix minimally.** Change only what is required. Refactoring belongs in a separate commit. 5. **Verify.** New test passes; full suite passes; reproduce the original scenario manually and confirm it is gone. 6. **Look for siblings.** Grep for the same pattern elsewhere. A bug found once is usually present three times. 7. **Close the loop.** State in the PR: what broke, why, what changed, and what now prevents it.
**PR description that closes the loop:**
## What broke Users on annual plans were charged twice when upgrading mid-cycle. ## Why `ProrationCalculator` issued the invoice before checking whether the subscription already had a pending invoice for the same period. Under concurrent upgrade requests, both passed the check. ## Fix Added a unique constraint on (subscription_id, period_start) and made invoice creation idempotent on that key. The second request now returns the existing invoice rather than creating one. ## Prevention Regression test `test_concurrent_upgrade_creates_one_invoice` runs two upgrades in parallel and asserts a single invoice. Audited the other three call sites of `issue_invoice` — `RenewalJob` had the same gap and is fixed in the same commit.
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.