Claude Code slash command

Spec-Based Claude Code

Spec-driven development workflow implemented as custom slash commands.

140 stars 15 forksSlash commands Source

Install

From source
git clone https://github.com/papaoloba/spec-based-claude-code.git

From the README

Claude Code Spec-Driven Development Implementation Guide

Table of Contents
1. Overview
2. Benefits
3. Prerequisites
4. Quick Start
5. Installation
6. Command Reference
7. Workflow Example
8. Templates
9. Best Practices
10. Troubleshooting
11. Advanced Usage

Overview

This guide implements a spec-driven development workflow in Claude Code using custom slash commands. The workflow enforces a structured approach where specifications are created, reviewed, and approved before implementation begins.

Core Concept

Each feature is developed through four sequential phases:

1. Requirements - Define WHAT needs to be built
2. Design - Determine HOW it will be built
3. Tasks - Plan WHEN and in what order
4. Implementation - Execute the plan with progress tracking

File Structure

Benefits

- 🎯 Catch problems early - Identify and resolve requirement ambiguities before coding
- 🎮 Maintain control - Review and approve each phase before proceeding
- 🔄 Iterate safely - Modify specifications without losing conversation context
- 🧠 Keep AI focused - Separate planning from coding for better results
- 👥 Enable collaboration - Living documentation for team reviews
- 📚 Build knowledge - Document decisions and preserve context

Prerequisites

- Claude Code installed and configured
- Git repository initialized
- Basic understanding of markdown

Quick Start

Installation

Step 1: Create Directory Structure

Step 2: Create Spec Commands

/spec:new - Initialize New Specification

Create .claude/commands/spec/new.md:

/spec:requirements - Generate Requirements Template

Create .claude/commands/spec/requirements.md:

/spec:design - Generate Design Document

Create .claude/commands/spec/design.md:

/spec:tasks - Generate Task List

Create .claude/commands/spec/tasks.md:

/spec:approve -…
Read the full README on GitHub

How custom slash commands work

  • A slash command is a Markdown file. Put it in ~/.claude/commands (for you) or .claude/commands (for a project), and it becomes /file-name inside Claude Code. Claude Code now treats commands and skills the same way, so .claude/skills/name/SKILL.md also works.
  • Arguments you type after the command are passed in as $ARGUMENTS.
  • If the repo is a plugin marketplace, installing it from /plugin adds the commands for you.
Claude Code docs

Details

Language
TypeScript
Last updated
22 July 2025

FAQ

What is Spec-Based Claude Code?

Spec-driven development workflow implemented as custom slash commands. It is a slash command for Claude Code, from papaoloba/spec-based-claude-code on GitHub.

How do I install Spec-Based Claude Code?

Clone papaoloba/spec-based-claude-code from GitHub and follow the setup steps in its README.

Is Spec-Based Claude Code popular?

papaoloba/spec-based-claude-code has 140 GitHub stars and 15 forks, and is included in 1 curated Claude Code list. It was last updated on 22 July 2025.

More slash commands

Browse the most popular Claude Code mods, all slash commands, or the skills and MCP server directories.