From flow
Initializes FLOW projects by configuring workspace permissions, git excludes, installing bin stubs, setting skill autonomy levels, and committing changes. Run once after install or upgrade.
npx claudepluginhub benkruger/flowThis skill uses the workspace's default tool permissions.
```text
Starts new features: creates Git worktree from prompt-derived branch, upgrades dependencies, opens PR, initializes .flow-states JSON, configures workspace. Use /flow:flow-start <prompt>.
Executes Flow epics/tasks with flowctl tracking, git staging/commits, quality checks. Invoke via /flow-next:work with IDs like fn-1-add-oauth or spec files.
Sets up CWF environment: selects hook groups, detects external tools, bootstraps setup-contract and project config, enables optional Agent Teams, Codex integration, git hooks, capability and repo indexes.
Share bugs, ideas, or general feedback.
/flow:flow-prime
/flow:flow-prime --reprime
Run once after installing FLOW, and again after each FLOW upgrade. Configures workspace permissions, git excludes, installs the bin/* delegation stubs, and writes a version marker so /flow:flow-start knows the project is initialized.
--reprime skips all questions and reuses the existing .flow.json config. Use this for upgrades where you want the same autonomy and commit format — just new artifacts installed.
At the very start, output the following banner in your response (not via Bash) inside a fenced code block:
```text
──────────────────────────────────────────────────
FLOW v1.1.0 — Prime — STARTING
──────────────────────────────────────────────────
```
If --reprime was passed:
.flow.json from the project root.
/flow:flow-prime instead."skills and commit_format from the JSON.claude plugin list to check plugin state (needed for Step 4).FLOW has two independent axes for skills that support them:
Phase skills that commit (code, code-review, learning) have both axes. Phase skills that don't commit (start) only have continue. Utility skills (complete, abort) have a single mode value.
Ask the user how much autonomy FLOW should have using AskUserQuestion:
"How much autonomy should FLOW have?"
- Fully autonomous — "All skills auto for both commit and continue"
- Fully manual — "All skills manual for both commit and continue"
- Recommended — "Auto where safe, manual where judgment matters (default)"
- Customize — "Choose per skill and axis"
Fully autonomous — all auto:
{"flow-start": {"continue": "auto"}, "flow-plan": {"continue": "auto", "dag": "auto"}, "flow-code": {"commit": "auto", "continue": "auto"}, "flow-code-review": {"commit": "auto", "continue": "auto"}, "flow-learn": {"commit": "auto", "continue": "auto"}, "flow-complete": "auto", "flow-abort": "auto"}
Fully manual — all manual:
{"flow-start": {"continue": "manual"}, "flow-plan": {"continue": "manual", "dag": "auto"}, "flow-code": {"commit": "manual", "continue": "manual"}, "flow-code-review": {"commit": "manual", "continue": "manual"}, "flow-learn": {"commit": "manual", "continue": "manual"}, "flow-complete": "manual", "flow-abort": "manual"}
Recommended — safe defaults:
{"flow-start": {"continue": "manual"}, "flow-plan": {"continue": "auto", "dag": "auto"}, "flow-code": {"commit": "manual", "continue": "manual"}, "flow-code-review": {"commit": "auto", "continue": "auto"}, "flow-learn": {"commit": "auto", "continue": "auto"}, "flow-complete": "auto", "flow-abort": "auto"}
Customize — ask per skill, in this order: start, plan, code, code-review, learn, complete, abort. For each skill, ask about only the applicable axes. List the recommended option first with "(Recommended)" in the label:
For start (continue only), ask one AskUserQuestion:
"Continue mode for /flow:flow-start?"
- Manual (Recommended) — "Prompt before advancing"
- Auto — "Auto-advance to next phase"
For plan (continue and dag), ask two AskUserQuestions:
First question:
"Continue mode for /flow:flow-plan? (controls phase advancement to Code)"
- Auto (Recommended) — "Auto-advance to Code phase"
- Manual — "Prompt before advancing"
Second question:
"DAG mode for /flow:flow-plan? (complexity-aware decomposition via decompose plugin)"
- Auto (Recommended) — "Use DAG decomposition for complex features, skip for simple"
- Always — "Always use DAG decomposition"
- Never — "Skip DAG decomposition"
For code (commit and continue), ask two AskUserQuestions:
First question:
"Commit mode for /flow:flow-code? (controls per-task review before each commit)"
- Manual (Recommended) — "Require explicit approval"
- Auto — "Skip approval prompts"
Second question:
"Continue mode for /flow:flow-code? (controls phase advancement)"
- Manual (Recommended) — "Prompt before advancing"
- Auto — "Auto-advance to next phase"
For code-review (commit and continue), ask two AskUserQuestions:
First question:
"Commit mode for /flow:flow-code-review? (controls per-task review before each commit)"
- Auto (Recommended) — "Skip approval prompts"
- Manual — "Require explicit approval"
Second question:
"Continue mode for /flow:flow-code-review? (controls phase advancement)"
- Auto (Recommended) — "Auto-advance to next phase"
- Manual — "Prompt before advancing"
For learning (commit and continue), ask two AskUserQuestions:
First question:
"Commit mode for /flow:flow-learn? (controls per-task review before each commit)"
- Auto (Recommended) — "Skip approval prompts"
- Manual — "Require explicit approval"
Second question:
"Continue mode for /flow:flow-learn? (controls phase advancement)"
- Auto (Recommended) — "Auto-advance to next phase"
- Manual — "Prompt before advancing"
For complete and abort (single mode), ask one AskUserQuestion each:
"Mode for /flow:flow-?"
- Auto (Recommended) — "Skip confirmation prompt"
- Manual — "Require confirmation prompt"
Store the result as skills_dict for Step 3.
FLOW supports two commit message formats:
Ask the user which format to use with AskUserQuestion:
"What commit message format should FLOW use?"
- Title only — "Subject line + file list, no tl;dr section"
- Full format — "Subject + tl;dr + explanation + file list (detailed)"
Store the result as commit_format:
"title-only""full"Serialize skills_dict from Step 1 as a JSON string for the --skills-json argument.
Pass the commit_format value from Step 2 via --commit-format.
${CLAUDE_PLUGIN_ROOT}/bin/flow prime-setup <project_root> --skills-json '<skills_dict_json>' --commit-format <commit_format> --plugin-root ${CLAUDE_PLUGIN_ROOT}
The script handles everything in a single call:
.claude/settings.jsondefaultMode to acceptEdits (overrides existing values — FLOW requires this for state file writes without prompts).flow.json with version marker, config hash, skills config, and commit format.flow-states/, .worktrees/, .flow.json, .claude/cost/, and .claude/scheduled_tasks.lock to .git/info/exclude.git/hooks/pre-commit that blocks direct git commit during active FLOW features and requires commits to go through /flow:flow-commitflow launcher at ~/.local/bin/flow that delegates to the plugin cache, and warning if ~/.local/bin is not in PATHbin/format, bin/lint, bin/build, bin/test) into <project_root>/bin/ from the FLOW asset templates. Pre-existing bin/* scripts are never overwritten — the stubs only fill in the gaps so bin/flow ci always has something to call.Output JSON: {"status": "ok", "settings_merged": true, "exclude_updated": true, "version_marker": true, "hook_installed": true, "launcher_installed": true, "stubs_installed": ["format", "lint", "build", "test"]}
If the script returns an error, show the message and stop.
.flow.json stores two hashes: config_hash (permission structure) and setup_hash (entire prime_setup.rs file content), both 12-character hex digests. When the plugin version changes, /flow-start recomputes both hashes and compares against stored values. If both match, the version is auto-upgraded. If either mismatches, /flow-prime must be re-run.
After prime, the user is responsible for editing each bin/<tool> to point at their actual toolchain (cargo, pytest, go test, etc.). The default stubs exit 0 with a stderr reminder so a fresh prime never blocks CI.
All universal permissions written to .claude/settings.json for reference:
{
"permissions": {
"allow": [
"Bash(git add *)",
"Bash(git blame *)",
"Bash(git branch *)",
"Bash(git cat-file *)",
"Bash(git -C *)",
"Bash(git diff *)",
"Bash(git fetch *)",
"Bash(git for-each-ref *)",
"Bash(git grep *)",
"Bash(git log *)",
"Bash(git ls-files *)",
"Bash(git ls-tree *)",
"Bash(git merge *)",
"Bash(git pull *)",
"Bash(git push)",
"Bash(git push *)",
"Bash(git remote *)",
"Bash(git restore *)",
"Bash(git rev-list *)",
"Bash(git rev-parse *)",
"Bash(git rm *)",
"Bash(git show *)",
"Bash(git status)",
"Bash(git status *)",
"Bash(git symbolic-ref *)",
"Bash(git worktree *)",
"Bash(cd *)",
"Bash(pwd)",
"Bash(chmod +x *)",
"Bash(awk *)",
"Bash(bash -n *)",
"Bash(cat *)",
"Bash(cmp *)",
"Bash(command -v *)",
"Bash(cut *)",
"Bash(date)",
"Bash(date *)",
"Bash(diff *)",
"Bash(file *)",
"Bash(find *)",
"Bash(grep *)",
"Bash(head *)",
"Bash(id)",
"Bash(jq *)",
"Bash(ls *)",
"Bash(mkdir *)",
"Bash(mktemp)",
"Bash(mktemp *)",
"Bash(psql *)",
"Bash(rg *)",
"Bash(sed *)",
"Bash(shellcheck *)",
"Bash(sort *)",
"Bash(stat *)",
"Bash(tail *)",
"Bash(test -d *)",
"Bash(touch *)",
"Bash(tr *)",
"Bash(uname *)",
"Bash(uniq *)",
"Bash(wc *)",
"Bash(which *)",
"Bash(whoami)",
"Bash(gh pr create *)",
"Bash(gh pr edit *)",
"Bash(gh pr close *)",
"Bash(gh pr list *)",
"Bash(gh pr view *)",
"Bash(gh pr checks *)",
"Bash(gh pr merge *)",
"Bash(gh pr comment *)",
"Bash(gh pr diff *)",
"Bash(gh pr ready *)",
"Bash(gh pr reopen *)",
"Bash(gh pr review *)",
"Bash(gh pr status *)",
"Bash(gh issue *)",
"Bash(gh label *)",
"Bash(gh browse *)",
"Bash(gh search *)",
"Bash(gh status)",
"Bash(gh status *)",
"Bash(gh repo view *)",
"Bash(gh repo list *)",
"Bash(gh run list *)",
"Bash(gh run view *)",
"Bash(gh run watch *)",
"Bash(gh workflow list *)",
"Bash(gh workflow view *)",
"Bash(gh release list *)",
"Bash(gh release view *)",
"Bash(gh release create *)",
"Bash(gh -C *)",
"Bash(*bin/flow *)",
"Bash(rm .flow-*)",
"Bash(test -f *)",
"Bash(claude plugin list)",
"Bash(claude plugin marketplace add *)",
"Bash(claude plugin install *)",
"Bash(curl *)",
"Read(~/.claude/rules/*)",
"Read(~/.claude/projects/*/memory/*)",
"Read(//tmp/*.txt)",
"Read(//tmp/*.diff)",
"Read(//tmp/*.patch)",
"Read(//tmp/*.md)",
"Read(//tmp/*.json)",
"Agent(flow:ci-fixer)",
"Skill(decompose:decompose)"
],
"deny": [
"Bash(git rebase *)",
"Bash(git push --force *)",
"Bash(git push -f *)",
"Bash(git reset *)",
"Bash(git reset --hard *)",
"Bash(git stash *)",
"Bash(git checkout *)",
"Bash(git clean *)",
"Bash(git commit *)",
"Bash(git config *)",
"Bash(git branch -d *)",
"Bash(git branch -D *)",
"Bash(git symbolic-ref HEAD refs/*)",
"Bash(git -C * checkout *)",
"Bash(git -C * clean *)",
"Bash(git -C * commit *)",
"Bash(git -C * config *)",
"Bash(git -C * push --force*)",
"Bash(git -C * push -f*)",
"Bash(git -C * rebase *)",
"Bash(git -C * reset *)",
"Bash(git -C * stash *)",
"Bash(sed -i*)",
"Bash(sed * -i*)",
"Bash(gh pr merge * --admin*)",
"Bash(gh pr merge --admin*)",
"Bash(gh * --admin*)",
"Bash(gh --admin*)",
"Bash(gh auth login*)",
"Bash(gh auth logout*)",
"Bash(gh auth refresh*)",
"Bash(gh auth setup-git*)",
"Bash(gh auth switch*)",
"Bash(gh auth token*)",
"Bash(gh extension install *)",
"Bash(gh issue delete *)",
"Bash(gh issue lock *)",
"Bash(gh issue transfer *)",
"Bash(gh issue unlock *)",
"Bash(gh label clone *)",
"Bash(gh label delete *)",
"Bash(gh release delete *)",
"Bash(gh repo archive *)",
"Bash(gh repo delete *)",
"Bash(gh run cancel *)",
"Bash(gh run delete *)",
"Bash(gh secret *)",
"Bash(gh ssh-key *)",
"Bash(gh variable *)",
"Bash(cargo *)",
"Bash(rustc *)",
"Bash(go *)",
"Bash(bundle *)",
"Bash(rubocop *)",
"Bash(ruby *)",
"Bash(rails *)",
"Bash(xcodebuild *)",
"Bash(xcrun *)",
"Bash(swift *)",
"Bash(swiftlint *)",
"Bash(.venv/bin/*)",
"Bash(python3 -m pytest *)",
"Bash(pytest *)",
"Bash(python *)",
"Bash(python3 *)",
"Bash(python3.10 *)",
"Bash(python3.11 *)",
"Bash(python3.12 *)",
"Bash(python3.13 *)",
"Bash(pip *)",
"Bash(pip3 *)",
"Bash(ruff *)",
"Bash(pyenv *)",
"Bash(poetry *)",
"Bash(uv *)",
"Bash(npm *)",
"Bash(npx *)",
"Bash(yarn *)",
"Bash(pnpm *)",
"Bash(gradle *)",
"Bash(gradlew *)",
"Bash(./gradlew *)",
"Bash(mvn *)",
"Bash(./mvnw *)",
"Bash(mix *)",
"Bash(elixir *)",
"Bash(dotnet *)",
"Bash(* && *)",
"Bash(* ; *)",
"Bash(* | *)"
]
},
"defaultMode": "acceptEdits"
}
Run claude plugin list to check the current plugin state.
Decompose plugin (DAG planning):
If the output does not contain decompose-marketplace, add the marketplace source:
claude plugin marketplace add matt-k-wong/mkw-DAG-architect
If the output does not contain decompose, install it:
claude plugin install decompose@decompose-marketplace
If all plugins are already present, skip silently.
Check if the working tree has changes by running git status. If the output contains "working tree clean", skip to Done.
Otherwise, invoke /flow:flow-commit to commit and push the generated files (.claude/settings.json and any newly-installed bin/<tool> stubs).
Output the following banner in your response (not via Bash) inside a fenced code block:
```text
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ FLOW v1.1.0 — Prime — COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Report:
.claude/settings.json.flow.json (git-excluded).flow-states/, .worktrees/, .flow.json, .claude/cost/, and .claude/scheduled_tasks.lockgit commit, requires /flow:flow-commit~/.local/bin/flow — run flow tui from any primed projectstubs_installed from Step 3); remind the user to edit each one to wire it to their actual toolchainDisplay the skills configuration as a pipe-delimited markdown table with exactly this format (not a bullet list):
| Skill | Commit | Continue |
|-----------|--------|----------|
| start | — | manual |
| plan | — | auto |
| code | manual | manual |
| code-review | auto | auto |
| learning | auto | auto |
| complete | auto | — |
| abort | auto | — |
Use the actual values from skills_dict (Step 1). The table above is just an example. Show — for axes that don't apply to a skill. The table must use pipe | delimiters — never render as a bullet list.
Tell the user to start a new Claude Code session so the permissions take effect, then run /flow-start <feature name>.