Skip to content
Back to skills

Specs

ASecurity

> **Parent Brief:** `docs/briefs/2026-03-26-bugfix-workflow-skill.md` > **Status:** Complete > **Date:** 2026-03-26 > **Estimated scope:** 1 session / 1 file / ~150 lines ---

  • 15 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
developmentgo

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add maksutovic/joycraft --skill specs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Specs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Specs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/maksutovic-specs-d790834b/badge)](https://www.skillsdirectory.com/skills/maksutovic-specs-d790834b)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Create Bug Fix Skill — Atomic Spec

> **Parent Brief:** `docs/briefs/2026-03-26-bugfix-workflow-skill.md`
> **Status:** Complete
> **Date:** 2026-03-26
> **Estimated scope:** 1 session / 1 file / ~150 lines

---

## What

Create `src/skills/joycraft-bugfix.md` — a new Joycraft skill that provides a structured bug fix workflow: Triage → Diagnose → Discuss → Spec → Hand Off. The skill guides the agent through reproducing the bug, identifying the root cause, discussing findings with the user, writing a focused spec, and handing off for implementation in a fresh session.

## Why

Without this skill, users encountering bugs either misuse `/joycraft-new-feature` (too heavy) or get no structured guidance at all. The agent already recognized this gap by abandoning the new-feature workflow when asked to fix a bug.

## Acceptance Criteria

- [ ] `src/skills/joycraft-bugfix.md` exists with valid frontmatter (name: `joycraft-bugfix`, description)
- [ ] Skill defines 5 phases: Triage, Diagnose, Discuss, Spec, Hand Off
- [ ] Phase 1 (Triage) instructs the agent to reproduce the bug — get the error, symptom, or unexpected behavior
- [ ] Phase 2 (Diagnose) instructs the agent to read relevant code, identify root cause, and trace the failure
- [ ] Phase 3 (Discuss) instructs the agent to present findings to the user and get alignment before writing code
- [ ] Phase 4 (Spec) instructs the agent to write a bug fix spec to `docs/specs/YYYY-MM-DD-bugfix-name.md` using a lighter template (no Vision, no Approach with rejected alternative, but keeps AC, test plan, affected files, edge cases)
- [ ] Phase 5 (Hand Off) instructs the agent to recommend a fresh session for implementation
- [ ] Skill includes a guard clause: if the request is clearly a new feature (not a bug), redirect to `/joycraft-new-feature`
- [ ] Embedded bug fix spec template includes: What (what's broken), Why (root cause), Fix (what the fix is), Acceptance Criteria, Test Plan, Constraints, Affected Files, Edge Cases
- [ ] Test plan section in the embedded template enforces test-first discipline (write failing tests, then fix)
- [ ] Build passes (`pnpm build`)
- [ ] Typecheck passes (`pnpm typecheck`)

## Test Plan

| Acceptance Criterion | Test | Type |
|---------------------|------|------|
| File exists with valid frontmatter | Check `src/skills/joycraft-bugfix.md` exists, parse frontmatter for `name` and `description` fields | unit |
| Contains 5 phases | Grep for Phase 1-5 headers or Triage/Diagnose/Discuss/Spec/Hand Off sections | unit |
| Embedded spec template has required sections | Grep for What, Why, Fix, Acceptance Criteria, Test Plan, Affected Files | unit |
| Guard clause present | Grep for redirect to `/joycraft-new-feature` | unit |
| Build passes | `pnpm build` | build |
| Typecheck passes | `pnpm typecheck` | build |

**Execution order:**
1. Write the skill file
2. Run `pnpm build && pnpm typecheck` to confirm no regressions

**Smoke test:** `pnpm typecheck` — skill files are static markdown, build/typecheck confirms nothing broke.

## Constraints

- MUST: Follow the same frontmatter format as `src/skills/joycraft-new-feature.md`
- MUST: Be self-contained — no imports or references to other files at runtime
- MUST: Keep the embedded spec template lighter than the feature spec template
- MUST NOT: Include an interview phase — bugs don't need interviews, they need reproduction
- MUST NOT: Include a feature brief phase — bugs go straight from diagnosis to spec

## Affected Files

| Action | File | What Changes |
|--------|------|-------------|
| Create | `src/skills/joycraft-bugfix.md` | New skill file with full bug fix workflow |

## Edge Cases

| Scenario | Expected Behavior |
|----------|------------------|
| User reports something that's clearly a feature request | Skill redirects to `/joycraft-new-feature` |
| Bug is trivial (one-line fix) | Still write a spec — discipline matters, but the spec will be short |
| Bug spans multiple files/systems | Spec's Affected Files section captures all of them; consider suggesting decomposition if truly large |
| User can't reproduce the bug | Triage phase should guide gathering more info (logs, env, steps to reproduce) |

Files in this skill

  • 2026-03-23-agents-md-support.md2.9 KB
  • 2026-03-23-assess-skill.md3.9 KB
  • 2026-03-23-init-cli.md4.9 KB
  • 2026-03-23-stack-detection.md3.5 KB
  • 2026-03-23-upgrade-apply-skill.md2.8 KB
  • 2026-03-23-upgrade-cli.md3.7 KB
  • 2026-03-23-workflow-skills.md4.3 KB
  • 2026-03-24-autofix-workflow-templates.md3 KB
  • 2026-03-24-context-documents.md2.7 KB
  • 2026-03-24-github-app-registration.md1.9 KB
  • 2026-03-24-hook-generation.md3 KB
  • 2026-03-24-init-autofix-command.md3.4 KB
  • 2026-03-24-permission-generation.md2.6 KB
  • 2026-03-24-risk-interview.md2.8 KB
  • 2026-03-24-risk-tiers.md2.5 KB
  • 2026-03-24-scenario-templates.md2.7 KB
  • 2026-03-24-skill-namespacing.md2.5 KB
  • 2026-03-25-acknowledge-existing-tools.md3.3 KB
  • 2026-03-25-add-fact-skill.md4.2 KB
  • 2026-03-25-add-troubleshooting-template.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.