Feature init

From schuettc/claude-code-plugins · View interactive version

Feature init is an AI agent skill from the GitHub repository schuettc/claude-code-plugins. Initialize feature-workflow for a project, or refresh CI files with --update. Creates docs/features/, .feature-workflow.yml, and optional GitHub Actions review setup.

How to use this skill

Skill file

Initialize Feature Workflow

You are executing the FEATURE INIT workflow — either a one-time setup for a new project, or an update that refreshes CI files in an existing project.

Modes

If the user said /feature-init --update or asked to "update" / "refresh" the CI files, jump to Step 3: Run Init Script with --update and skip the config gathering.

Workspace mode (`/feature-init --workspace`)

If the user invokes /feature-init --workspace (or asks to "set up a multi-repo workspace"), scaffold a workspace repo instead of a single-project init:

  1. Ask for the GitHub org and the member repos (each as dir=owner/repo). If they're unsure, list the org's repos with gh repo list <org>.
  2. Run the scaffolder:

```bash

python3 "${CLAUDE_PLUGIN_ROOT}/skills/feature-init/scripts/init.py" . --workspace \

--org <org> \

--member <dir>=<owner/repo> [--member <dir>=<owner/repo> ...]

```

  1. Tell the user to run ./scripts/clone-members.sh to pull the members in, then launch Claude from the workspace directory — every member is then in-tree, so cross-repo edits don't prompt.

The workspace is identified by its .feature-workspace.yml manifest, not its name. Single-repo features live in each member's docs/features/; cross-repo work is an epic in the workspace docs/features/. See docs/designs/2026-06-08-multi-repo-workspace.md for the full model.

Step 1: Check for Existing Setup

Check if .feature-workflow.yml exists in the project root. If it does, read it and show the current config:

"Feature workflow is already configured:

Branch prefix: <prefix>
Target branch: <target>
Reviewer:      <reviewer>

Would you like to (a) change settings, (b) refresh CI files from the latest templates (--update), or (c) do nothing?"

Step 2: Gather Configuration

$ARGUMENTS

If arguments were provided, parse them as <branch-prefix> <target-branch> (e.g., /feature-init feat/ main).

If no arguments, ask the user:

  1. Branch prefix — what prefix do feature branches use?
  1. Target branch — what branch do feature PRs merge into?
  1. External reviewer — which AI reviewer should review PRs via GitHub Actions?
  1. API key (only if reviewer is gemini, codex, or oci) — the API key for the chosen reviewer.

Step 3: Run Init Script

Init mode

python3 "${CLAUDE_PLUGIN_ROOT}/skills/feature-init/scripts/init.py" . \
  --prefix "<prefix>" \
  --target "<target>" \
  --reviewer "<reviewer>" \
  --api-key "<api-key>"

The script creates:

Update mode

python3 "${CLAUDE_PLUGIN_ROOT}/skills/feature-init/scripts/init.py" . --update

The script reads the existing reviewer from .feature-workflow.yml and refreshes only:

It does not touch .feature-workflow.yml, the API key secret, docs/features/, or any feature documents. After it finishes, commit and push the refreshed files to the default branch so the new workflow is live.

--update overwrites the workflow YAML unconditionally. If you've customized .github/workflows/feature-review.yml locally, those edits will be replaced by the current template. Diff before committing if you have local customizations.

When to run --update: any time you upgrade the feature-workflow plugin. The workflow template carries bug fixes (e.g., v9.7.3 added a concurrency: block that prevents duplicate review comments) that only reach your project via this refresh. Plugin upgrade alone does NOT propagate to your .github/.

Step 4: Confirm

## Feature Workflow Initialized

Config: .feature-workflow.yml
  Branch prefix: <prefix>
  Target branch: <target>
  Reviewer:      <reviewer>

Feature branches will be named: <prefix><feature-id>
PRs will target: <target>

### CI Review Setup (if reviewer configured)
- Workflow: .github/workflows/feature-review.yml
- API secret: GOOGLE_API_KEY or OPENAI_API_KEY (uploaded)
- IMPORTANT: Commit and push the .github/ files to your default branch
  before creating your first feature PR.

### Next Steps
- `/feature-capture` to create your first feature
- Edit .feature-workflow.yml anytime to change settings
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.