Back to Skills

spike-driven-dev

mpazaryna
Updated Yesterday
46 views
2
2
View on GitHub
Testingtestingapidesigndata

About

This Claude Skill guides developers through spike-driven development for validating technical approaches before full implementation. Use it when starting new features, testing architecture patterns, or integrating unfamiliar APIs to reduce risks. It emphasizes TDD, real data validation, and creating minimal proofs-of-concept to establish direction and feasibility.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/mpazaryna/claude-toolkit
Git CloneAlternative
git clone https://github.com/mpazaryna/claude-toolkit.git ~/.claude/skills/spike-driven-dev

Copy and paste this command in Claude Code to install this skill

Documentation

Spike-Driven Development

The Railroad Spike Principle

When building a railroad, the first spike establishes direction, validates the foundation, proves feasibility, and defines the repeatable pattern. In software, a spike ticket serves the same purpose: prove the approach works with ONE component before building everything.

Before building anything complex:

  1. Drive one spike (build one minimal component with TDD)
  2. Make sure it holds (test with real data, verify architecture)
  3. Then build the railroad (replicate pattern across full feature)

When to Use This Skill

Create a spike ticket when:

  • Starting a new feature with unfamiliar patterns
  • Integrating with external APIs or data sources
  • Testing architecture assumptions (e.g., model designs, framework capabilities)
  • Building something for the first time
  • The main ticket has >10 subtasks

For detailed decision criteria, see decision-criteria.md

Spike Workflow

1. Identify the Spike Need (15 minutes)

Ask these questions about the upcoming work:

  • Have I built this exact thing before?
  • Am I making assumptions about data structures or APIs?
  • Could failure require redesigning multiple components?
  • Is the main ticket complex with many subtasks?

If YES to any → Create a spike ticket first.

2. Define Spike Scope (30 minutes)

Keep it minimal:

  • Time-boxed: 4-8 hours maximum
  • Scope-limited: ONE file, ONE component, ONE feature
  • Test-driven: Write tests FIRST
  • Real data: Use production-like data, not mocks
  • Platform-tested: Verify on all targets (macOS + iOS)

Example scopes:

  • "Test SwiftData model with nested Codable + real JSON"
  • "Implement ONE API endpoint with authentication"
  • "Build ONE detail view with platform config pattern"

3. Execute with TDD (4-6 hours)

Follow this sequence strictly:

Step 1: Write Tests FIRST (1 hour)

func testModelCreation() { /* ... */ }
func testJSONDecoding() { /* ... */ }
func testRealDataLoading() { /* ... */ }

Run tests → ❌ FAIL (expected - code doesn't exist)

Step 2: Implement Minimal Code (1-2 hours)

  • Write minimum code to pass tests
  • Focus on architecture, not features Run tests → ✅ PASS

Step 3: Test with Real Data (1 hour)

  • Load actual production/external data
  • Test edge cases
  • Verify platform compatibility

Step 4: Document Findings (1 hour)

  • Note what worked / what didn't
  • Document pattern for replication
  • Update main ticket estimate if needed

For detailed TDD flow, see spike-patterns.md

4. Evaluate Outcome

Success: Tests pass, architecture validated → Close spike, proceed with main ticket using proven pattern

Partial Success: Tests pass but adjustments needed → Document findings, adjust main ticket, possibly create follow-up spike

Failure: Tests fail, approach flawed → Research alternatives, create new spike with different approach

All outcomes are wins - better to discover issues in 6 hours than 6 days.

5. Apply to Main Feature

Use the validated pattern to build the full feature with confidence:

  • Replicate the proven model/view structure
  • Use the same testing approach
  • Apply lessons learned from spike
  • Build 4-5x faster with validated architecture

Success Criteria Checklist

Every spike should validate:

  • Tests pass with real data
  • Architecture assumptions proven
  • Platform compatibility verified
  • Pattern documented for replication
  • No technical blockers discovered
  • Effort estimate confirmed/adjusted

Common Pitfalls to Avoid

Starting without a spike when using new patterns ❌ Skipping tests - defeats the purpose of validation ❌ Using mock data only - doesn't catch real-world issues ❌ Scope creep - building more than ONE component ❌ Fear of throwing away code - spikes are proofs, not production ❌ Open-ended exploration - must have clear success criteria

Examples and Templates

For concrete examples (exercise library, API integration, database migration): → See examples.md

For decision trees and risk analysis: → See decision-criteria.md

For spike characteristics and TDD patterns: → See spike-patterns.md

Key Takeaways

  1. Never skip spikes for unfamiliar territory - architectural failures are expensive
  2. Write tests FIRST - tests guide implementation and ensure testability
  3. Use real data immediately - mock data hides real-world issues
  4. Time-box strictly - spikes prove feasibility, not perfection
  5. Document findings - the pattern must be replicable for the main ticket

The time spent on a spike is time saved (10x) on the main feature.

GitHub Repository

mpazaryna/claude-toolkit
Path: generated-skills/spike-driven-dev
agentic-frameworkagentic-workflowclaude-code

Related Skills

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

Algorithmic Art Generation

Meta

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

View skill