Agent skill
branch
ブランチ作成Skill。仕様策定用(spec/*)または実装用(impl/*)のブランチを作成。/spec や spec-workflow から呼び出される。
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/clionegohan/branch
SKILL.md
/branch Skill - ブランチ作成
SDDワークフローにおけるブランチ作成を担当するSkill。 仕様策定・実装それぞれのフェーズで適切なブランチを作成します。
発動条件
/branchコマンドで明示的に呼び出し/specSkill から自動呼び出し(仕様策定開始時)spec-workflowSkill から自動呼び出し(実装開始時)
ブランチ命名規則
仕様策定用
spec/{action-id}-{short-description}
例: spec/001-01-01-user-auth
実装用
impl/{action-id}-{short-description}
例: impl/001-01-01-user-auth
ワークフロー
┌─────────────────────────────────────────────────┐
│ 1. コンテキスト確認 │
│ - 呼び出し元を判定(spec or impl) │
│ - アクションIDを取得 │
│ │
│ 2. ブランチ名生成 │
│ - 命名規則に従って生成 │
│ - 重複チェック │
│ │
│ 3. ユーザー確認 │
│ 「ブランチ '{name}' を作成しますか?」 │
│ │
│ 4. ブランチ作成 │
│ git checkout -b {branch-name} │
│ │
│ 5. 完了通知 │
│ 「ブランチ '{name}' を作成しました」 │
└─────────────────────────────────────────────────┘
パラメータ
| パラメータ | 必須 | 説明 | 例 |
|---|---|---|---|
| type | Yes | ブランチタイプ | spec or impl |
| action-id | Yes | アクションID | 001-01-01 |
| description | No | 短い説明(省略時は自動生成) | user-auth |
使用例
直接呼び出し
ユーザー: /branch spec 001-01-01 user-auth
Claude: ブランチ 'spec/001-01-01-user-auth' を作成しますか?
ベースブランチ: main
ユーザー: OK
Claude: ✅ ブランチ 'spec/001-01-01-user-auth' を作成しました
現在のブランチ: spec/001-01-01-user-auth
/spec からの自動呼び出し
[/spec Skill 内部]
→ ファイル生成前に /branch を発火
→ type: spec, action-id: 生成するアクションID
spec-workflow からの自動呼び出し
[spec-workflow Skill 内部]
→ 実装開始前に /branch を発火
→ type: impl, action-id: 実装するアクションID
実行コマンド
# 現在のブランチを確認
git branch --show-current
# mainブランチが最新か確認
git fetch origin main
# ブランチ作成
git checkout -b {branch-name}
# 作成確認
git branch --show-current
エラーハンドリング
ブランチ名が既に存在する場合
Claude: ブランチ 'spec/001-01-01-user-auth' は既に存在します。
対応案:
1. 既存ブランチに切り替える
2. 別の名前で作成する(例: spec/001-01-01-user-auth-v2)
3. 既存ブランチを削除して新規作成
どれを選択しますか?
未コミットの変更がある場合
Claude: 未コミットの変更があります。
対応案:
1. 変更をスタッシュしてブランチ作成
2. 変更をコミットしてからブランチ作成
3. 変更を破棄してブランチ作成(非推奨)
どれを選択しますか?
禁止事項
- ユーザー確認なしのブランチ作成
- 命名規則に従わないブランチ名
- mainブランチへの直接コミット誘導
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?