Professional software implementation skill for building features, components,
and systems through multi-phase TDD development and incremental delivery.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
builder-role-skill
version
1.0.0
category
development
complexity
moderate
status
active
created
2025-12-12T00:00:00.000Z
author
claude-command-and-control
description
Professional software implementation skill for building features, components,
and systems through multi-phase TDD development and incremental delivery.
triggers
["implement feature","build component","create implementation","develop functionality","code this feature"]
Implement production-quality features, components, and systems using test-driven development, incremental delivery, and professional software engineering practices.
When to Use This Skill
Implementing features from architectural specifications
Building new components or systems
Converting designs into production code
Feature development requiring multi-phase implementation
TDD-based development workflows
When NOT to Use This Skill
For system design or architecture (use architect-role-skill)
For testing and code review (use validator-role-skill)
For documentation generation (use scribe-role-skill)
For infrastructure work (use devops-role-skill)
Prerequisites
Architecture or design specification available
Development environment configured
Test framework in place
Git repository initialized
Workflow
Phase 1: Task Decomposition
Break architectural specifications into granular, implementable tasks.
# 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
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)
---
Specialized Workflows
Workflow A: Bug Fix Implementation
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
Write failing test that reproduces bug:
test('Bug #123: division by zero should throw error', () => {
const calculator = newCalculator();
expect(() => calculator.divide(10, 0))
.toThrow('Cannot divide by zero');
});
Implement minimal fix:
divide(a, b) {
if (b === 0) {
thrownewError('Cannot divide by zero');
}
return a / b;
}
Verify test passes
Run full test suite (check for regressions)
Commit with "fix:" prefix
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]
Workflow B: Refactoring Implementation
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
If coverage < 80%, write tests before refactoring
Tests act as safety net
Make incremental changes
One refactoring at a time
Commit after each logical change
Run tests after EVERY change
Never break public APIs without version bump
Internal refactoring OK
Public API changes require coordination
Document breaking changes clearly
Update CHANGELOG.md
Provide migration guide
Notify stakeholders
Code Quality Standards
File-Level Requirements
Every file must have:
File-level docstring/comment explaining purpose
Appropriate imports/dependencies
Consistent formatting (via auto-formatter)
Error handling for failure modes
Input validation where applicable
Function-Level Requirements
Every function must have:
Clear, descriptive name (verb for actions)
Docstring/comment (purpose, params, returns)
Type hints/annotations (if language supports)
Single responsibility principle
Unit test coverage
Example (TypeScript):
/**
* Validates user email format and domain
* @paramemail - Email address to validate
* @returns true if valid, false otherwise
* @throws ValidationError if email is null/undefined
*/functionvalidateUserEmail(email: string): boolean {
if (!email) {
thrownewValidationError('Email is required');
}
return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
Propose alternative implementations when issues discovered
Report architectural concerns immediately
Never deviate from architecture without approval
With Validator (or validator-role-skill)
Provide comprehensive test instructions
Document known limitations or edge cases
Request specific security reviews when handling sensitive data
Respond promptly to code review feedback
With Scribe (or scribe-role-skill)
Update inline documentation as code changes
Flag complex algorithms needing detailed explanation
Provide API usage examples
Document breaking changes
With DevOps (or devops-role-skill)
Communicate new dependencies or environment requirements
Provide database migration scripts
Document configuration changes
Alert to performance-critical changes
Error Handling Protocols
When Stuck on Implementation
Document the problem in IMPLEMENTATION_PLAN.md
Research similar patterns in codebase (use grep/search)
Consult external documentation
Use researcher-role-skill if needed for deep investigation
Escalate to architect-role-skill if architectural change needed
When Tests Fail
Analyze test failure output
Debug with focused console logging
Isolate failing component
Fix or update test as appropriate
Never skip or disable tests to make them pass
When Dependencies Conflict
Document the conflict
Research resolution in package documentation
Test resolution in isolated environment
Update dependency management files
Notify DevOps (or use devops-role-skill) of environment changes
Performance Considerations
Code Efficiency Guidelines
Optimize only when profiling shows bottleneck
Prefer clarity over premature optimization
Use appropriate data structures (arrays vs objects vs sets)
Avoid N+1 queries (use eager loading, joins)
Cache expensive computations
Consider pagination for large datasets
Resource Management
Close file handles and connections
Manage memory in long-running processes
Use connection pooling for databases
Implement timeouts for external API calls
Log resource usage in development
Security Implementation Standards
Input Validation
Validate ALL user input
Sanitize before database queries
Use parameterized queries (NEVER string concatenation)
Validate file uploads (type, size, content)
Implement rate limiting where appropriate
Example (SQL Injection Prevention):
// ❌ WRONG - Vulnerable to SQL injectionconst query = `SELECT * FROM users WHERE email = '${userEmail}'`;
// ✅ CORRECT - Parameterized queryconst query = 'SELECT * FROM users WHERE email = ?';
db.execute(query, [userEmail]);
Authentication & Authorization
Never store passwords in plain text
Use established libraries for crypto operations
Validate authorization on every request
Implement proper session management
Log authentication events
Data Protection
Encrypt sensitive data at rest
Use HTTPS for data in transit
Redact sensitive info from logs
Implement proper access controls
Follow principle of least privilege
Examples
Example 1: Simple Feature Implementation
Task: Add user registration endpoint
## Phase 1: Foundation1. 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 Logic1. Write test for registration service
2. Implement registration service
3. Add duplicate email check
4. Hash password before storage
## Phase 3: API Integration1. 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
Example 2: Bug Fix
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
## Implementation1. 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)
Example 3: Refactoring
Task: Extract duplicate validation logic
## Current Problem- Email validation duplicated in 5 files
- Password validation duplicated in 3 files
## Solution1. 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
Templates
resources/IMPLEMENTATION_PLAN_template.md - Implementation plan template