salimhamed/claude-code-flow

wt-init

Generate a .worktreerc.yml config file for the current project by scanning for environment files, lock files, and dev tooling - use when setting up worktree workflows for a new project

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/salimhamed/claude-code-flow --skill wt-init

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Generate .worktreerc.yml

Scan the current project and generate a .worktreerc.yml with sensible defaults for the wt-create skill.

Steps

1. Check for Existing Config

Look for .worktreerc.yml or .worktreerc.yaml in the repository root.

If one exists, read it, show it to the user, and ask if they want to overwrite or update it. Stop if they decline.

2. Scan Project for Patterns

Copy Candidates

Use Glob to detect files that are typically gitignored but needed for development:

  • .env, .env.*
  • .direnv
  • .vscode/settings.json
  • .idea/

For each candidate found, verify it is actually gitignored:

bash
git check-ignore <file>

Only include files that are gitignored (exit code 0). Files tracked by git don't need to be copied.

Post-Create Hook Candidates

Use Glob to detect lock files and dev tooling:

File FoundSuggested Hook
uv.lock or pyproject.toml (with [tool.uv])uv sync
package-lock.jsonnpm ci
yarn.lockyarn install
pnpm-lock.yamlpnpm install
Gemfile.lockbundle install
.mise.toml or .tool-versionsmise install
.pre-commit-config.yamlpre-commit install

3. Present Findings to User

Show what was detected and proposed. Use AskUserQuestion to let the user confirm or adjust:

  • Which copy patterns to include
  • Which post-create hooks to include

4. Write .worktreerc.yml

Generate the file with the confirmed settings.

Example output:

yaml
worktree:
  copy:
    - .env
    - .env.local

  post_create:
    - uv sync
    - pre-commit install

Omit copy or post_create sections entirely if they would be empty.

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills