Agent skill
fix-issue
Fix a GitHub issue using SDD workflow. Reads the issue, reproduces the bug with a failing test, then fixes it.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/fix-issue-common-member-nightrip
SKILL.md
Fix GitHub Issue #$ARGUMENTS
Follow the SDD workflow to fix this bug. Write a failing test first, then fix.
Step 1: Understand the Issue
gh issue view $ARGUMENTS
Read carefully and identify:
- What behavior is reported as broken?
- What is the expected behavior?
- Are there reproduction steps?
Step 2: Find the Root Cause
Search for relevant code:
- Find the relevant model/controller/view
- Read existing specs for this area
- Reproduce the issue mentally — understand WHY it's broken
Step 3: Write a Failing Test
Write a spec that reproduces the bug:
# Add to existing spec file, or create new one
bundle exec rspec <spec-file> --format documentation
The spec should FAIL with the current (buggy) code. If it passes, it's not testing the right thing.
For regression tests, add to the appropriate spec file:
spec/models/— model behavior bugsspec/requests/— HTTP/controller bugsspec/system/— user-facing UI bugs
Step 4: Fix the Bug
Implement the minimal fix:
- Fix ONLY what's needed to pass the test
- Don't refactor unrelated code
- Don't change behavior beyond what the test covers
- Follow existing patterns in the codebase
Step 5: Verify
# Run the regression test
bundle exec rspec <spec-file> --format documentation
# Run related specs
bundle exec rspec spec/models/<model>_spec.rb
# Run full test suite (ensure no regressions)
bundle exec rspec
# Auto-fix linting
bin/rubocop -a
# Security scan
bin/brakeman --no-pager
Step 6: Commit
Create a commit:
- Message format:
fix: <brief description of what was fixed> - Reference the issue in the PR description
Summarize what was changed and which tests were added.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?