.agents/skills/bugfix/SKILL.md
End-to-end bugfix workflow — analyze environment (local Docker or cloud production), collect evidence, prepare bug report, plan fix, apply appropriate engineer role, implement and verify the fix.
npx skillsauth add avav25/ai-assets bugfixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
End-to-end workflow for investigating, diagnosing, and fixing bugs. Orchestrates environment analysis (analyze-local skill or analyze-prod skill), evidence collection, bug report preparation, fix planning, and implementation by the appropriate engineering role.
Gather the bug description from the user:
If the user provides partial information, extract what you can and fill gaps during analysis. For P1/P2 — skip detailed intake and proceed immediately to Step 2.
Based on the environment, delegate to the appropriate analysis follow-up skill:
| Environment | follow-up skill | When to use |
|---|---|---|
| Local Docker / Docker Compose | analyze-local skill | Bug observed in local dev environment |
| Cloud production (GKE/AKS/EKS, managed DB) | analyze-prod skill | Bug observed in production or staging |
| Code-only (no infra) | Skip to Step 3 | Bug is in application logic, no environment analysis needed |
Run the follow-up skill. It will:
sre-engineer role or devops-engineer role)If the follow-up skill resolves the issue (e.g., container restart, config fix) — skip to Step 8.
If the root cause is in application code — continue to Step 3 with the collected evidence.
Determine the affected service's tech stack and apply the appropriate engineering role:
AGENTS.md — tech stack declarationpackage.json, pom.xml, requirements.txt, go.mod, etc.Role assignment:
| Stack Signal | Role |
|---|---|
| Next.js, React, TypeScript, .tsx files | frontend-engineer role |
| Spring Boot, Java, .java files | java-engineer role |
| FastAPI, Python, .py files | python-engineer role |
| Terraform, Dockerfile, Helm, CI/CD | devops-engineer role |
| ML model, training pipeline, inference | ml-engineer role |
| Multiple stacks affected | Apply all relevant roles |
| Unknown / general | software-engineer role |
Announce the applied role(s) to the user.
Gather all evidence into a structured collection. Combine data from Step 2 (environment analysis) with code-level investigation:
<evidence_checklist>
Use the applied role's debugging methodology to trace the bug:
git log -n 20 --oneline) for potential regressionsCompile findings into a structured bug report. Present to the user for review:
## Bug Report
### Summary
[One sentence: what is broken]
### Severity: [P1 | P2 | P3 | P4]
### Environment
- **Type**: [local | production]
- **Service**: [name]
- **Stack**: [detected] | **Role**: [applied]
### Expected Behavior
[What should happen]
### Actual Behavior
[What actually happens — include error messages]
### Steps to Reproduce
1. [step]
2. [step]
3. [observed error]
### Evidence
- **Stack trace**: [snippet or reference]
- **Logs**: [relevant entries]
- **Metrics**: [if applicable]
- **Affected code**: [file:line references]
### Root Cause Analysis
[Technical explanation of why the bug occurs]
### Affected Components
- [file/module 1] — [how it's affected]
- [file/module 2] — [how it's affected]
Wait for user confirmation before proceeding to fix.
Create an ordered fix plan following the applied role's guidelines:
Present the plan:
## Fix Plan
### Root Cause
[What caused the bug — one sentence]
### Changes
1. [file] — [what to change and why]
2. [file] — [what to change and why]
...
### Tests
1. [test file] — [test that reproduces and verifies the fix]
2. [test file] — [regression test for edge cases]
### Risk Assessment
- **Blast radius**: [which features could be affected by this change]
- **Rollback**: [how to revert if the fix causes issues]
Wait for user approval before implementing.
Execute the approved plan step by step.
For each change:
Then write tests:
Rules:
analyze-local skill or analyze-prod skill) to collect itBefore declaring the bug fixed, perform a thorough self-review. Do NOT skip this step.
Code review checklist:
If the self-review reveals any remaining issues — fix them before proceeding. Do not declare the bug fixed with known remaining problems.
Verify the bug is resolved in the appropriate environment:
For local bugs:
analyze-local skill (optional)analyze-local skill to collect environment stateFor production bugs:
analyze-prod skill to confirm resolutionVerification checklist:
If any check fails — fix and re-verify. Do NOT declare the bug fixed until every checkbox passes.
Present the completed bugfix:
analyze-local skill, analyze-prod skill (environment diagnostics — launch as specialized skills when more data is needed)run-tests skill (verify fix), pre-commit skill (quality gate), create-pr skill (submit fix)code-review skill (review fix), test-strategy skill (test strategy), worktree-isolation skill (branch isolation)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.