agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
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.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill bug-fix-protocol --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bug-fix-protocolContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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. 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.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…