SDD Implementation Guidelines

VerifiedSafe

This skill guides AI coding tools through a structured implementation workflow for features approved under the SDD (Specification-Driven Development) process. It enforces Test-Driven Development (TDD) cycles, SOLID principles, and security best practices by loading context from specification documents and executing step-by-step implementation tasks.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#sdd#implementation#tdd#solid-principles#best-practices

Recommended for

Automated summary

Implementation guidelines for the SDD workflow, incorporating TDD, SOLID principles, and best practices.

Strengths

  • Clear TDD cycle (Red-Green-Refactor)
  • Direct integration of SOLID principles with concrete examples
  • Automatic task status verification via sdd-status MCP tool
  • Step-by-step structure suitable for formal projects

Limitations

  • Requires SDD workflow to be set up (specification and design documents)
  • May be too rigid for simple or exploratory changes
  • Depends on the sdd-status MCP tool which is non-standard
When to use it

When implementing features in a project following the SDD process, with TDD methodology and high quality requirements.

When not to use it

For rapid prototyping, urgent fixes, or changes that do not require full formal tests.

Security analysis

Safe
Quality score92/100

The skill provides guidelines for coding practices, TDD, SOLID principles, and security checklists. It does not instruct execution of dangerous commands like curl|sh, rm -rf, or exfiltration of secrets. No obfuscated payloads or disabling safety features. The content is purely advisory and educational, posing no execution risk.

No concerns found

How this analysis is made

Examples

Implement user authentication feature
/sdd-implement user-authentication
Implement payment module feature
/sdd-implement payment-module
Implement API endpoint feature
/sdd-implement api-endpoint

name: sdd-implement description: Implementation guidelines for SDD workflow. Use when implementing features, applying TDD, checking security, or ensuring code quality. Invoked via /sdd-implement <feature-name>.

SDD Implementation Guidelines

Execute implementation following TDD methodology, SOLID principles, and security best practices.

Prerequisites

Before implementing:

  1. Tasks must be approved (use sdd-status to verify)
  2. Review tasks in .spec/specs/{feature}/tasks.md
  3. Understand the design in .spec/specs/{feature}/design.md

Implementation Workflow

Step 1: Load Context

  1. Use sdd-status MCP tool to verify all phases approved
  2. Read the tasks document for current implementation
  3. Identify the next task to implement

Step 2: Execute TDD Cycle

For each task:

┌─────────────────────────────────────────────────────────────┐
│  1. RED: Write Failing Test                                 │
│     - Define expected behavior                              │
│     - Run test, confirm it FAILS                           │
│                                                             │
│  2. GREEN: Write Minimal Code                               │
│     - Just enough to pass the test                         │
│     - No extra features                                     │
│     - Run test, confirm it PASSES                          │
│                                                             │
│  3. REFACTOR: Improve Code                                  │
│     - Clean up without changing behavior                    │
│     - Run tests, confirm still PASSING                     │
│                                                             │
│  REPEAT for each test case                                  │
└─────────────────────────────────────────────────────────────┘

Step 3: Apply SOLID Principles

S - Single Responsibility Principle

// GOOD: One class, one job
class UserValidator {
  validate(user: User): ValidationResult { ... }
}

class UserRepository {
  save(user: User): Promise<void> { ... }
}

// BAD: Class doing too much
class UserManager {
  validate(user: User) { ... }
  save(user: User) { ... }
  sendEmail(user: User) { ... }
  generateReport() { ... }
}

O - Open/Closed Principle

// GOOD: Open for extension, closed for modification
interface PaymentProcessor {
  process(amount: number): Promise<Result>;
}

class StripeProcessor implements PaymentProcessor { ... }
class PayPalProcessor implements PaymentProcessor { ... }

// BAD: Modifying existing code for new payment types
class PaymentService {
  process(type: string, amount: number) {
    if (type === 'stripe') { ... }
    else if (type === 'paypal') { ... }
    // Adding new type requires modifying this class
  }
}

L - Liskov Substitution Principle

// GOOD: Subtypes are substitutable
class Bird {
  move(): void { /* fly or walk */ }
}

class Sparrow extends Bird {
  move(): void { this.fly(); }
}

class Penguin extends Bird {
  move(): void { this.walk(); }
}

// BAD: Subtype breaks expected behavior
class Bird {
  fly(): void { ... }
}

class Penguin extends Bird {
  fly(): void { throw new Error("Can't fly!"); }
}

I - Interface Segregation Principle

// GOOD: Specific interfaces
interface Readable {
  read(): Data;
}

interface Writable {
  write(data: Data): void;
}

class FileHandler implements Readable, Writable { ... }
class ReadOnlyFile implements Readable { ... }

// BAD: Fat interface forcing unnecessary implementation
interface FileOperations {
  read(): Data;
  write(data: Data): void;
  delete(): void;
  execute(): void;
}

D - Dependency Inversion Principle

// GOOD: Depend on abstractions
interface IUserRepository {
  findById(id: string): Promise<User>;
}

class UserService {
  constructor(private repo: IUserRepository) {}
}

// BAD: Depend on concrete implementations
class UserService {
  private repo = new PostgresUserRepository();
}

Step 4: Security Checklist (OWASP Top 10)

Before marking implementation complete, verify:

1. Broken Access Control

  • [ ] Enforce access control on every request
  • [ ] Deny by default
  • [ ] Validate user owns the resource

2. Cryptographic Failures

  • [ ] Use strong encryption (AES-256, RSA-2048+)
  • [ ] Never store passwords in plain text (use bcrypt/argon2)
  • [ ] Use HTTPS for all communications

3. Injection

  • [ ] Use parameterized queries for database
  • [ ] Validate and sanitize all user inputs
  • [ ] Escape output in templates

4. Insecure Design

  • [ ] Apply threat modeling
  • [ ] Implement defense in depth
  • [ ] Fail securely

5. Security Misconfiguration

  • [ ] Remove default credentials
  • [ ] Disable unnecessary features
  • [ ] Keep dependencies updated

6. Vulnerable Components

  • [ ] Use dependency audit tools (e.g., npm audit, pip-audit, cargo audit, snyk)
  • [ ] Update vulnerable packages
  • [ ] Remove unused dependencies

7. Authentication Failures

  • [ ] Implement proper session management
  • [ ] Use MFA where appropriate
  • [ ] Implement account lockout

8. Software Integrity

  • [ ] Verify package integrity
  • [ ] Use lockfiles (e.g., package-lock.json, Cargo.lock, poetry.lock, go.sum)
  • [ ] Sign commits if required

9. Logging & Monitoring

  • [ ] Log security events
  • [ ] Don't log sensitive data
  • [ ] Implement alerting

10. SSRF (Server-Side Request Forgery)

  • [ ] Validate and sanitize URLs
  • [ ] Use allowlists for external calls
  • [ ] Disable redirects or validate them

Step 5: Code Quality Standards

Naming

// GOOD
const userEmail = user.email;
function calculateTotalPrice(items: Item[]): number { ... }

// BAD
const e = user.email;
function calc(i: any): any { ... }

Comments

// GOOD: Explain WHY, not WHAT
// Use retry because the external API has rate limits
const result = await retryWithBackoff(fetchData);

// BAD: Obvious comments
// Get the user
const user = getUser(id);

Error Handling

// GOOD: Specific, informative errors
class UserNotFoundError extends Error {
  constructor(userId: string) {
    super(`User with ID ${userId} not found`);
    this.name = 'UserNotFoundError';
  }
}

// BAD: Generic errors
throw new Error('Error');

Step 6: Update Task Status

After implementing each task:

  1. Mark task as complete in tasks.md
  2. Verify test coverage >= 80%
  3. Run sdd-quality-check MCP tool on new code

MCP Tool Integration

| Tool | When to Use | |------|-------------| | sdd-status | Check all phases approved before implementing | | sdd-spec-impl | Execute specific tasks with TDD | | sdd-quality-check | Validate code quality after implementation |

Definition of Done

  • [ ] All acceptance criteria met
  • [ ] All tests pass
  • [ ] Code coverage >= 80%
  • [ ] No lint/type errors
  • [ ] Security checklist verified
  • [ ] SOLID principles applied
  • [ ] Code self-documenting or commented where needed

Steering Document References

Apply these steering documents during implementation:

| Document | Purpose | Key Application | |----------|---------|-----------------| | .spec/steering/tdd-guideline.md | Test-Driven Development | Follow Red-Green-Refactor cycle for all code | | .spec/steering/principles.md | SOLID, DRY, KISS, YAGNI | Apply SOLID principles, keep code simple and focused | | .spec/steering/owasp-top10-check.md | Security checklist | Verify all OWASP Top 10 security requirements before completion |

Critical Implementation Rules:

  1. TDD First: Never write production code without a failing test
  2. SOLID Always: Apply all five principles (SRP, OCP, LSP, ISP, DIP)
  3. Security Required: Complete OWASP checklist before marking done

Common Anti-Patterns to Avoid

| Anti-Pattern | Problem | Solution | |--------------|---------|----------| | God Class | Class does too much | Split by responsibility | | Feature Envy | Method uses another class's data extensively | Move method to that class | | Primitive Obsession | Using primitives for domain concepts | Create value objects | | Magic Numbers | Unexplained numeric literals | Use named constants | | Deep Nesting | Multiple levels of if/loops | Extract methods, early returns | | Long Methods | Methods doing too much | Split into smaller methods |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/sdd-implementation-guidelines-mmh8qpwa/download' --output '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md.part' && mv '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md.part' '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites

Before implementing:

  1. Tasks must be approved (use sdd-status to verify)
  2. Review tasks in .spec/specs/{feature}/tasks.md
  3. Understand the design in .spec/specs/{feature}/design.md

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md' && test -s '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/sdd-implement' && cp -R '.skill-downloads/sdd-implementation-guidelines-mmh8qpwa' '.claude/skills/sdd-implement'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/sdd-implementation-guidelines-mmh8qpwa'

openskills read 'sdd-implementation-guidelines-mmh8qpwa'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/sdd-implementation-guidelines-mmh8qpwa/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills