.claude/skills/builder-role-skill/SKILL.md
Professional software implementation skill for building features, components, and systems through multi-phase TDD development and incremental delivery.
npx skillsauth add enuno/claude-command-and-control builder-role-skillInstall 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.
Implement production-quality features, components, and systems using test-driven development, incremental delivery, and professional software engineering practices.
Break architectural specifications into granular, implementable tasks.
Step 1.1: Load Planning Documents
Read context files:
- DEVELOPMENT_PLAN.md (or equivalent)
- ARCHITECTURE.md (design specifications)
- TODO.md (task backlog)
- MULTI_AGENT_PLAN.md (if multi-agent workflow)
Step 1.2: Create Implementation Plan
Generate IMPLEMENTATION_PLAN.md with structured task breakdown:
# Implementation Plan: [Feature Name]
## Architecture Reference
- Source: [Document] Section [X]
- Components: [List components to build]
- Dependencies: [External/internal dependencies]
## Phase Breakdown
### Phase 1: Foundation
- [ ] Task 1.1: [Specific task]
- [ ] Task 1.2: [Specific task]
- [ ] Task 1.3: Write unit tests for foundation
### Phase 2: Business Logic
- [ ] Task 2.1: [Specific task]
- [ ] Task 2.2: [Specific task]
- [ ] Task 2.3: Write service tests
### Phase 3: Integration
- [ ] Task 3.1: [Specific task]
- [ ] Task 3.2: Write integration tests
- [ ] Task 3.3: Full test suite validation
## Completion Criteria
- All tests passing (coverage >= 80%)
- Code linted with zero errors
- Documentation updated
- Peer review approved
Step 1.3: Validate Plan
For each task in the implementation plan, follow the RED-GREEN-REFACTOR cycle:
Step 2.1: RED - Write Failing Test
// Example: test/user-service.test.js
describe('UserService', () => {
test('createUser should validate email format', async () => {
const userService = new UserService();
await expect(userService.createUser({
email: 'invalid-email',
name: 'John Doe'
})).rejects.toThrow('Invalid email format');
});
});
Run test to confirm it fails:
npm test -- --testPathPattern=user-service
# Expected: FAIL - Test should fail initially
Step 2.2: GREEN - Write Minimal Implementation
// Example: src/services/user-service.js
class UserService {
async createUser(userData) {
// Minimal code to make test pass
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(userData.email)) {
throw new Error('Invalid email format');
}
// ... rest of implementation
}
}
Run test to confirm it passes:
npm test -- --testPathPattern=user-service
# Expected: PASS - Test should now pass
Step 2.3: REFACTOR - Improve Code Quality
// utils/validators.js
export const isValidEmail = (email) => {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
};
// Refactored service
import { isValidEmail } from '../utils/validators.js';
class UserService {
async createUser(userData) {
if (!isValidEmail(userData.email)) {
throw new Error('Invalid email format');
}
// ... rest of implementation
}
}
npm run lint # Fix linting issues
npm run format # Auto-format code
npm test
# Expected: All tests still pass after refactoring
Step 2.4: Commit Progress
git add .
git commit -m "feat(user): add email validation to user creation
- Implement email format validation
- Add unit tests for validation
- Extract reusable validator utility
Tests: 12 passing, coverage 85%
Refs: #[issue-number]"
After completing all tasks in a phase:
Step 3.1: Run Full Test Suite
# Run all tests
npm test
# Check coverage
npm run coverage
# Ensure coverage >= 80%
# Run linter
npm run lint
# Zero errors required
Step 3.2: Update Progress Tracking
Mark phase complete in planning documents:
IMPLEMENTATION_PLAN.md - Check off phase tasksTODO.md - Update task statusMULTI_AGENT_PLAN.md - Update coordination status (if applicable)Step 3.3: Create Phase Commit
git add .
git commit -m "feat([feature-name]): Complete Phase [N] - [Phase Name]
Phase [N] Summary:
- ✅ Task 1 completed
- ✅ Task 2 completed
- ✅ Task 3 completed
Tests: [X] passing, coverage [Y%]
Phase: [N] of [Total]
Next: Phase [N+1]"
After all phases complete:
Step 4.1: Integration Testing
# Merge feature branch to develop
git checkout develop
git merge --no-ff feature/[feature-name]
# Run full test suite including integration tests
npm run test:integration
# Verify all tests pass
Step 4.2: Create Pull Request
gh pr create \
--title "feat: [Feature Name]" \
--body-file PR_DESCRIPTION.md \
--label "ready-for-review"
PR Description Template:
## Feature: [Name]
### Summary
[1-2 sentence description]
### Implementation Details
- Component 1: [Description]
- Component 2: [Description]
### Test Coverage
- Unit tests: [X] tests, [Y%] coverage
- Integration tests: [Z] scenarios
### Breaking Changes
- [None / List breaking changes]
### Migration Guide
[If breaking changes, provide migration steps]
### Checklist
- [ ] All tests passing
- [ ] Coverage >= 80%
- [ ] Linting passes
- [ ] Documentation updated
- [ ] No known bugs
Step 4.3: Handoff to Validator
If using multi-agent workflow, create handoff document:
---
TO: Validator Agent (or use validator-role-skill)
FEATURE: [Feature Name]
PR: #[PR number]
IMPLEMENTATION_PLAN: IMPLEMENTATION_PLAN.md
TEST_COVERAGE: [X%]
IMPLEMENTATION_NOTES:
- [Key implementation detail 1]
- [Any concerns or trade-offs]
- [Areas needing special attention]
VALIDATION_REQUESTS:
- [ ] Unit test review
- [ ] Integration test verification
- [ ] Code quality assessment
- [ ] Security review (if handling sensitive data)
---
When to Use: Fixing defects in existing code
Step A.1: Bug Analysis
# Bug Fix Plan: [Bug ID]
## Problem Description
[What is broken, symptoms, reproduction steps]
## Root Cause Analysis
[Why it's broken - technical explanation]
## Proposed Solution
[How to fix it - specific approach]
## Affected Components
[List files/modules requiring changes]
## Regression Risk
[What could potentially break]
## Testing Strategy
[How to verify fix + prevent regression]
Step A.2: Test-Driven Fix
test('Bug #123: division by zero should throw error', () => {
const calculator = new Calculator();
expect(() => calculator.divide(10, 0))
.toThrow('Cannot divide by zero');
});
divide(a, b) {
if (b === 0) {
throw new Error('Cannot divide by zero');
}
return a / b;
}
Step A.3: Verification
# Run affected component tests
npm test -- --testPathPattern=[component]
# Run full suite
npm test
# Manual verification if UI/UX involved
[Steps to manually verify fix]
When to Use: Improving code structure without changing behavior
Step B.1: Refactoring Justification
# Refactoring Proposal: [Component Name]
## Current Problems
- [Problem 1: e.g., Code duplication]
- [Problem 2: e.g., Poor naming]
- [Problem 3: e.g., High complexity]
## Proposed Improvements
- [Improvement 1: Extract common logic]
- [Improvement 2: Rename variables for clarity]
- [Improvement 3: Split large function]
## Risk Assessment
- Breaking changes: [Yes/No]
- Current test coverage: [X%]
- Effort estimate: [Hours]
- Architect approval required: [Yes/No]
Step B.2: Safety-First Refactoring
Ensure comprehensive test coverage FIRST
Make incremental changes
Never break public APIs without version bump
Document breaking changes clearly
Every file must have:
Every function must have:
Example (TypeScript):
/**
* Validates user email format and domain
* @param email - Email address to validate
* @returns true if valid, false otherwise
* @throws ValidationError if email is null/undefined
*/
function validateUserEmail(email: string): boolean {
if (!email) {
throw new ValidationError('Email is required');
}
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
Every class must have:
Use Conventional Commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Formatting, missing semi-colons, etc.refactor: Code restructuringtest: Adding/updating testschore: Maintenance tasksExample:
feat(auth): add JWT token refresh mechanism
- Implement refresh token endpoint
- Add token expiration validation
- Update authentication middleware
- Add unit tests for refresh flow
Tests: 45 passing, coverage 92%
Closes: #123
Example (SQL Injection Prevention):
// ❌ WRONG - Vulnerable to SQL injection
const query = `SELECT * FROM users WHERE email = '${userEmail}'`;
// ✅ CORRECT - Parameterized query
const query = 'SELECT * FROM users WHERE email = ?';
db.execute(query, [userEmail]);
Task: Add user registration endpoint
## Phase 1: Foundation
1. Write test for user model validation
2. Create user model with email, password fields
3. Add email format validation
4. Add password strength validation
## Phase 2: Business Logic
1. Write test for registration service
2. Implement registration service
3. Add duplicate email check
4. Hash password before storage
## Phase 3: API Integration
1. Write integration test for /register endpoint
2. Create POST /register endpoint
3. Add input validation middleware
4. Add error handling
Result: Feature complete in 3 phases with 95% test coverage
Task: Fix user login timeout issue
## Bug Analysis
- Problem: Login hangs after 30 seconds
- Root cause: Database query missing index on email column
- Solution: Add database index
## Implementation
1. Write test that times login query
2. Add migration script for index
3. Run migration
4. Verify test passes
5. Measure performance improvement (30s → 50ms)
Task: Extract duplicate validation logic
## Current Problem
- Email validation duplicated in 5 files
- Password validation duplicated in 3 files
## Solution
1. Ensure all 5 files have tests (add if missing)
2. Extract common validation to utils/validators.js
3. Update imports in all 5 files
4. Run tests after each file update
5. Remove old validation code
6. Final test run - all pass
Result: Code duplication eliminated, tests still pass
resources/IMPLEMENTATION_PLAN_template.md - Implementation plan templateresources/commit_message_guide.md - Commit message examplesresources/tdd_workflow.md - TDD cycle referencescripts/run_tests.sh - Test execution scriptscripts/validate_commit.py - Pre-commit validationscripts/phase_checker.sh - Phase completion validatorVersion: 1.0.0 Last Updated: December 12, 2025 Status: ✅ Active Maintained By: Claude Command and Control Project
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.