Claude-skill-registry implement-and-test
Implement feature with interleaved testing
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/implement-and-test" ~/.claude/skills/majiayu000-claude-skill-registry-implement-and-test && rm -rf "$T"
manifest:
skills/data/implement-and-test/SKILL.mdsource content
Implement Feature with Interleaved Testing
Implement the current feature by following the spec, with interleaved testing after each user story.
User arguments: $ARGUMENTS
Instructions for Claude
You MUST follow these steps:
-
Get current feature number from branch:
BRANCH=$(git rev-parse --abbrev-ref HEAD) NUM=$(echo "$BRANCH" | grep -oE 'alg-([0-9]+)' | grep -oE '[0-9]+') -
Read context files:
- Read
- User stories, requirements, acceptance criteria (REQUIRED)specs/alg-${NUM}-*/spec.md - Check if
exists - Implementation patterns, files to modify (OPTIONAL)specs/alg-${NUM}-*/research.md
- Read
-
Create a todo list with all user stories from the spec (P1 first, then P2, P3)
-
For each user story, follow this interleaved pattern:
- Mark the todo as in_progress
- Implement the functionality (follow research.md patterns if present, otherwise existing codebase patterns)
- Commit implementation:
git commit -m "feat(scope): description ALG-${NUM}" - Write unit tests for the implemented functionality
- Write integration tests if needed (multi-component, database, API, or e2e)
- Run tests:
npm test --workspaces --if-present - Fix any failing tests before proceeding
- Commit tests:
git commit -m "test(scope): description ALG-${NUM}" - Mark the todo as completed
-
Final verification:
- Run:
npm run type-check --workspaces --if-present - Run:
npm test --workspaces --if-present - Ensure all checks pass
- Run:
CRITICAL: Do NOT batch all implementation then all tests. Interleave them - implement one story, test it, commit, then move to the next.
Commit Conventions
Follow Conventional Commits:
Types:
feat, fix, test, refactor, perf, docs, chore, ci, build
Examples:
git commit -m "feat(search): add semantic search service ALG-27" git commit -m "test(search): add semantic search tests ALG-27" git commit -m "fix(api): handle null response from Tidal ALG-27"
When to Write Integration Tests
Write integration tests when the user story involves:
- Database operations (TypeORM entities, queries)
- External API calls (Tidal, Qdrant, etc.)
- Multi-service coordination
- GraphQL resolver chains
- End-to-end user flows