Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Spec Workflow

ASecurity

仕様駆動開発(SDD)ワークフローを自動発動で強制。Subtask開始時にAC確認、TDD実行、完了時にACチェックを実施。スコープ外実装を禁止。Use when implementing features, creating new functionality, or when "実装して", "作成して", "開発して" keywords appear.

416 stars
0 votes
0 copies
5 views
Added 2/7/2026
developmenttypescriptci/cd

Security Analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned 2/12/2026

$npx -y skills add aiskillstore/marketplace --skill spec-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spec Workflow?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Spec Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-spec-workflow/badge)](https://www.skillsdirectory.com/skills/aiskillstore-spec-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: spec-workflow
description: 仕様駆動開発(SDD)ワークフローを自動発動で強制。Subtask開始時にAC確認、TDD実行、完了時にACチェックを実施。スコープ外実装を禁止。Use when implementing features, creating new functionality, or when "実装して", "作成して", "開発して" keywords appear.
---

# Spec-Driven Development Workflow Skill

仕様駆動開発(SDD)の**下流工程(実装)** を担当するスキルです。
EPIC → Story → Subtaskの3階層構造に基づいた開発を行います。

> **Note**: 仕様策定(上流工程)は `/spec` Skill で行います。
> 連携フロー: `/spec`(仕様策定)→ `spec-workflow`(実装)

## 発動条件

以下のキーワード・コンテキストで自動発動:

- 実装して、作成して、開発して
- 新機能実装
- Subtask開始、Story開始
- EPIC、Story、Subtaskへの言及

## 基本原則

### 1. 仕様ファースト(必須)

実装前に必ず以下を確認:

1. `specs/{epic-id}/{story-id}/{subtask-id}.md` を読み込む
2. ユーザーストーリーを確認
3. ACを理解
4. ユーザーに「このACで進めますか?」と確認

### 2. TDD厳守(必須)

```
🔴 Red   : ACからテストケースを導出 → 失敗するテストを書く
🟢 Green : テストを通す最小限の実装
🔵 Refactor : テストを保ちながらコード改善
```

### EARS記法対応

ACがEARS記法で記述されている場合、テストケース導出を効率化:

```typescript
// EARS記法のAC例:
// WHEN ユーザーがログインを試行する際
// GIVEN 有効なメールとパスワードを入力した場合
// THEN システムはJWTトークンを発行する
// AND ダッシュボードにリダイレクトする

// テストケースへの変換:
describe('ログイン', () => {
  it('有効な認証情報でJWTトークンが発行される', () => {
    // GIVEN: 前提条件をセットアップ
    const credentials = { email: 'valid@example.com', password: 'validPass' };

    // WHEN: トリガーを実行
    const result = login(credentials);

    // THEN: 期待結果を検証
    expect(result.token).toBeDefined();
  });

  it('成功時にダッシュボードへリダイレクトする', () => {
    // AND条件のテスト
  });
});
```

### 3. スコープ管理(必須)

- ACに記載のある機能のみ実装
- スコープ外は「提案のみ」で実装しない
- 不明点はユーザーに確認

## ワークフロー詳細

### Phase 1: Subtask開始時(必須フロー)

```typescript
// 1. Subtaskファイルを読み込む
const subtaskFile = await read(`specs/{epic-id}/{story-id}/{subtask-id}.md`)

// 2. ACを確認
const acceptanceCriteria = parseAC(subtaskFile)

// 3. ユーザーストーリーを確認
const userStory = parseUserStory(subtaskFile)

// 4. ユーザーに確認
await ask(`以下のACで実装を進めます。よろしいですか?
${acceptanceCriteria.map(ac => `- ${ac}`).join('\n')}`)

// 5. テストケースを導出
const testCases = deriveTestCases(acceptanceCriteria)
```

### Phase 2: TDD実装

```typescript
// 🔴 Red: テストを先に書く
describe(subtaskTitle, () => {
  acceptanceCriteria.forEach(ac => {
    it(ac, async () => {
      // ACからテストケースを導出
    })
  })
})

// テストが失敗することを確認
await runTests() // Expected: FAIL

// 🟢 Green: 最小限の実装
// ACを満たす最小限のコードを実装
await runTests() // Expected: PASS

// 🔵 Refactor: コード改善
// テストを保ちながら改善
await runTests() // Expected: PASS
```

### Phase 3: 完了時(必須フロー)

```typescript
// 1. AC全項目をチェック
acceptanceCriteria.forEach(ac => {
  console.log(`✅ ${ac}`)
})

// 2. テストが全て通過していることを確認
await runTests() // All tests pass

// 3. ステータス更新
await updateSubtaskFile({
  status: 'completed',
  completed_at: new Date().toISOString()
})

// 4. 親Storyの確認
if (allSubtasksCompleted(storyId)) {
  await updateStoryFile({ status: 'completed' })
}

// 5. 次のSubtaskを提示
console.log(`次のSubtask: ${getNextSubtask()}`)
```

## スコープ判断

### スコープ内(実装OK)

- ACに明記されている機能
- ACを達成するために必須の技術的実装
- ユーザーストーリーの価値を実現する機能

### スコープ外(提案のみ)

- ACに記載のない「ついでに」の改善
- 将来必要になる「かもしれない」機能
- 他のSubtask/Storyで対応すべき機能

### スコープ外対応フロー

```typescript
if (isOutOfScope(request)) {
  const response = `
  ご依頼いただいた「${request}」は、現在のSubtaskのACに含まれていません。

  現在のAC:
  ${currentAC.map(ac => `- ${ac}`).join('\n')}

  対応案:
  1. 現在のSubtaskでは実装しない
  2. 別のSubtaskとして提案

  どちらを選択しますか?`

  await ask(response)
}
```

## テストファイル配置

```
specs/{epic-id}/{story-id}/{subtask-id}.md  # Subtask定義
{feature}/
├── service.ts         # 実装ファイル
└── __dev__/
    └── service.test.ts  # テストファイル(Colocation)
```

## 禁止事項

- ❌ ACなしでの実装開始
- ❌ テストなしでの実装(TDD違反)
- ❌ スコープ外の「ついでに」実装
- ❌ 複数機能の同時実装(1 Subtask = 1機能)
- ❌ ユーザー確認なしの仕様変更
- ❌ 完了確認なしのステータス更新

## エラー対応

### ACが曖昧な場合

```typescript
if (isACAmbiguous(ac)) {
  await ask(`
  以下のACが曖昧なため、実装を開始できません。

  曖昧なAC: ${ac}

  以下のように明確化することを提案します:
  「${suggestedAC}」

  この明確化で進めてよいですか?
  `)
}
```

### テストが通らない場合

```typescript
if (testsFailed) {
  // 実装を修正(Green達成まで)
  // テスト自体の問題なら修正
  // ACの解釈に問題があればユーザーに確認
}
```

## ブランチ・PR連携

本Skillは `/branch` と `/pr` を自動的に呼び出します。

### 連携フロー

```
spec-workflow 開始
    │
    ├─ Subtaskファイル読み込み
    │
    ├─ AC確認・ユーザー承認
    │       │
    │       └─ 承認後 → /branch 発火
    │          ブランチ: impl/{subtask-id}-{description}
    │
    ├─ TDD実装
    │   - 🔴 Red: テスト作成
    │   - 🟢 Green: 最小実装
    │   - 🔵 Refactor: 改善
    │
    ├─ AC全項目チェック
    │
    └─ 完了時 → /pr 発火
        PR: 実装レビュー用
```

### /branch 呼び出し

AC確認・承認後に自動発火:

```
Claude: 以下のACで実装を進めます。よろしいですか?
        - AC1: ...
        - AC2: ...

ユーザー: OK

Claude: 実装用ブランチを作成します。

        ブランチ名: impl/001-01-01-user-auth
        ベース: main

        作成してよいですか?
```

### /pr 呼び出し

AC全項目チェック完了後に自動発火:

```
Claude: 全てのACを満たしました。

        ✅ AC1: 有効な認証情報でログイン成功
        ✅ AC2: 無効な認証情報でエラー表示
        ✅ AC3: MFAコード検証

        PRを作成しますか?
        タイトル: impl: ユーザー認証機能の実装

        ## Summary
        - 001-01-01 を実装
        - ログイン/ログアウト機能

        ## AC確認
        - [x] AC1
        - [x] AC2
        - [x] AC3
```

---

## 参照ドキュメント

- [SPEC_FORMAT.md](../../../.ai/SPEC_FORMAT.md) - 仕様フォーマット定義
- [WORKFLOW.md](../../../.ai/WORKFLOW.md) - ワークフロー詳細

---

## 関連Skill

- **/branch**: ブランチ作成(本Skillから自動呼び出し)
- **/pr**: PR作成(本Skillから自動呼び出し)
- **/spec**: 仕様策定(本Skillの上流工程)

### 全体連携フロー

```
/spec(仕様策定)
    ├─ /branch 発火(spec/*)
    ├─ ファイル生成
    └─ /pr 発火(仕様レビュー)
        ↓ マージ後
spec-workflow(実装)← 本Skill
    ├─ /branch 発火(impl/*)
    ├─ TDD実装
    └─ /pr 発火(実装レビュー)
```

## 使用例

### 例1: 新規Subtask実装

```
ユーザー: 「001-01-01の設定要件Subtaskを実装して」

[自動] spec-workflow Skill発動
[自動] specs/001-environment-setup/001-01-common-config/001-01-01-config-requirements.md を読み込み

Claude: 「以下のACで実装を進めます。よろしいですか?
- 設定ファイル配置方針が明確に決定されていること
- ESLint、Prettier、TypeScriptの設定内容が仕様として確定していること
- package.jsonスクリプトの統一方針が決定されていること」

ユーザー: 「OK」

Claude: 「🔴 Red: テストケースを導出します...」
(以下、TDDサイクル)
```

### 例2: スコープ外リクエスト

```
ユーザー: 「ついでにCI/CDも設定して」

Claude: 「ご依頼いただいた「CI/CD設定」は、現在のSubtaskのACに含まれていません。

現在のAC:
- 設定ファイル配置方針が明確に決定されていること
- ESLint、Prettier、TypeScriptの設定内容が仕様として確定していること

対応案:
1. 現在のSubtaskでは実装しない(推奨)
2. 新規Subtaskとして定義する

どちらを選択しますか?」
```

Attribution

aiskillstoreaiskillstore
View sourceSee grades on GitHubMore from aiskillstore →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

285172 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10341 votes
View all in development →