AGENT SKILL

spec-driven

End-to-end pipeline from rough idea to merged pull request. Passing --quick forwards the flag to the spec-gen sub workflow.

License 许可
MIT
最近更新
2026-05-19
Stars
★ 27
Forks
5

01 前言 Front Matter

name
spec-driven
description
End-to-end pipeline from rough idea to merged pull request. Passing --quick forwards the flag to the spec-gen sub workflow.

02 资源文件 1

03 SKILL.md 正文

Spec Driven

Before starting the workflow, check if the current branch is the repo's default branch:

REMOTE_URL=$(git remote get-url origin 2>/dev/null || echo "")
if echo "$REMOTE_URL" | grep -qi 'github'; then
  DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>/dev/null)
else
  DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||')
fi
DEFAULT_BRANCH=${DEFAULT_BRANCH:-main}
CURRENT_BRANCH=$(git branch --show-current)

If CURRENT_BRANCH == DEFAULT_BRANCH:

  1. Determine a branch name automatically from the user's idea (e.g., feat/short-description or fix/short-description using conventional commit style).
  2. Create a worktree in .claude/worktrees/<branch_name> and switch your working directory to it:
    git worktree add .claude/worktrees/<branch_name> -b <branch_name>
    
    Then set your working directory to the worktree path (e.g., via the EnterWorktree tool or equivalent). Do not rely on cd — it does not persist across shell invocations in agent contexts.
  3. Proceed with the workflow from the worktree directory. All subsequent commands must run from the worktree path.

Run /fflow spec-driven with any arguments passed to this skill.

04 同仓库更多 Skills