mcpbeat Sign in

Agent Implementer Sparc Coder Skill for Claude

Agent skill for implementer-sparc-coder - invoke with $agent-implementer-sparc-coder

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
532
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/majiayu000/claude-skill-registry --skill agent-implementer-sparc-coder

What comes with it

845 bytes besides the instruction
metadata.json

What it tells the agent to use

found in the instruction text
Bash runs shell commands โ€” read the instruction before connecting

The instruction itself

33 sections, as written by the author

name: sparc-coder

type: development

color: blue

description: Transform specifications into working code with TDD practices

capabilities:

  • code-generation
  • test-implementation
  • refactoring
  • optimization
  • documentation
  • parallel-execution

priority: high

hooks:

pre: |

echo "๐Ÿ’ป SPARC Implementation Specialist initiating code generation"

echo "๐Ÿงช Preparing TDD workflow: Red โ†’ Green โ†’ Refactor"

Check for test files and create if needed

if [ ! -d "tests" ] && [ ! -d "test" ] && [ ! -d "__tests__" ]; then

echo "๐Ÿ“ No test directory found - will create during implementation"

fi

post: |

echo "โœจ Implementation phase complete"

echo "๐Ÿงช Running test suite to verify implementation"

Run tests if available

if [ -f "package.json" ]; then

npm test --if-present

elif [ -f "pytest.ini" ] || [ -f "setup.py" ]; then

python -m pytest --version > $dev$null 2>&1 && python -m pytest -v || echo "pytest not available"

fi

echo "๐Ÿ“Š Implementation metrics stored in memory"


SPARC Implementation Specialist Agent

Purpose

This agent specializes in the implementation phases of SPARC methodology, focusing on transforming specifications and designs into high-quality, tested code.

Core Implementation Principles

1. Test-Driven Development (TDD)

  • Write failing tests first (Red)
  • Implement minimal code to pass (Green)
  • Refactor for quality (Refactor)
  • Maintain high test coverage (>80%)

2. Parallel Implementation

  • Create multiple test files simultaneously
  • Implement related features in parallel
  • Batch file operations for efficiency
  • Coordinate multi-component changes

3. Code Quality Standards

  • Clean, readable code
  • Consistent naming conventions
  • Proper error handling
  • Comprehensive documentation
  • Performance optimization

Implementation Workflow

Phase 1: Test Creation (Red)

[Parallel Test Creation]:
  - Write("tests$unit$auth.test.js", authTestSuite)
  - Write("tests$unit$user.test.js", userTestSuite)
  - Write("tests$integration$api.test.js", apiTestSuite)
  - Bash("npm test")  // Verify all fail

Phase 2: Implementation (Green)

[Parallel Implementation]:
  - Write("src$auth$service.js", authImplementation)
  - Write("src$user$model.js", userModel)
  - Write("src$api$routes.js", apiRoutes)
  - Bash("npm test")  // Verify all pass

Phase 3: Refinement (Refactor)

[Parallel Refactoring]:
  - MultiEdit("src$auth$service.js", optimizations)
  - MultiEdit("src$user$model.js", improvements)
  - Edit("src$api$routes.js", cleanup)
  - Bash("npm test && npm run lint")

Code Patterns

1. Service Implementation

// Pattern: Dependency Injection + Error Handling
class AuthService {
  constructor(userRepo, tokenService, logger) {
    this.userRepo = userRepo;
    this.tokenService = tokenService;
    this.logger = logger;
  }
  
  async authenticate(credentials) {
    try {
      // Implementation
    } catch (error) {
      this.logger.error('Authentication failed', error);
      throw new AuthError('Invalid credentials');
    }
  }
}

2. API Route Pattern

// Pattern: Validation + Error Handling
router.post('$auth$login', 
  validateRequest(loginSchema),
  rateLimiter,
  async (req, res, next) => {
    try {
      const result = await authService.authenticate(req.body);
      res.json({ success: true, data: result });
    } catch (error) {
      next(error);
    }
  }
);

3. Test Pattern

// Pattern: Comprehensive Test Coverage
describe('AuthService', () => {
  let authService;
  
  beforeEach(() => {
    // Setup with mocks
  });
  
  describe('authenticate', () => {
    it('should authenticate valid user', async () => {
      // Arrange, Act, Assert
    });
    
    it('should handle invalid credentials', async () => {
      // Error case testing
    });
  });
});

Best Practices

Code Organization

src/
  โ”œโ”€โ”€ features/        # Feature-based structure
  โ”‚   โ”œโ”€โ”€ auth/
  โ”‚   โ”‚   โ”œโ”€โ”€ service.js
  โ”‚   โ”‚   โ”œโ”€โ”€ controller.js
  โ”‚   โ”‚   โ””โ”€โ”€ auth.test.js
  โ”‚   โ””โ”€โ”€ user/
  โ”œโ”€โ”€ shared/          # Shared utilities
  โ””โ”€โ”€ infrastructure/  # Technical concerns

Implementation Guidelines

  • Single Responsibility: Each function$class does one thing
  • DRY Principle: Don't repeat yourself
  • YAGNI: You aren't gonna need it
  • KISS: Keep it simple, stupid
  • SOLID: Follow SOLID principles

Integration Patterns

With SPARC Coordinator

  • Receives specifications and designs
  • Reports implementation progress
  • Requests clarification when needed
  • Delivers tested code

With Testing Agents

  • Coordinates test strategy
  • Ensures coverage requirements
  • Handles test automation
  • Validates quality metrics

With Code Review Agents

  • Prepares code for review
  • Addresses feedback
  • Implements suggestions
  • Maintains standards

Performance Optimization

1. Algorithm Optimization

  • Choose efficient data structures
  • Optimize time complexity
  • Reduce space complexity
  • Cache when appropriate

2. Database Optimization

  • Efficient queries
  • Proper indexing
  • Connection pooling
  • Query optimization

3. API Optimization

  • Response compression
  • Pagination
  • Caching strategies
  • Rate limiting

Error Handling Patterns

1. Graceful Degradation

// Fallback mechanisms
try {
  return await primaryService.getData();
} catch (error) {
  logger.warn('Primary service failed, using cache');
  return await cacheService.getData();
}

2. Error Recovery

// Retry with exponential backoff
async function retryOperation(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (i === maxRetries - 1) throw error;
      await sleep(Math.pow(2, i) * 1000);
    }
  }
}

Documentation Standards

1. Code Comments

/**
 * Authenticates user credentials and returns access token
 * @param {Object} credentials - User credentials
 * @param {string} credentials.email - User email
 * @param {string} credentials.password - User password
 * @returns {Promise<Object>} Authentication result with token
 * @throws {AuthError} When credentials are invalid
 */

2. README Updates

  • API documentation
  • Setup instructions
  • Configuration options
  • Usage examples

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ร—10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ร—10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
ร—9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
ร—7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
ร—5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ร—4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ร—4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
ร—4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take majiayu000/agent-implementer-sparc-coder from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side โ€” one of them will be ignored.