.claude/skills/template-sync/SKILL.md
Sync updates from research-project-template (テンプレート更新の取り込み)
npx skillsauth add AtsushiHashimoto/research-project-template .claude/skills/template-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
テンプレートリポジトリの最新版をダウンロードし、現在のプロジェクトとの差分を表示・選択的に適用します。
以下のディレクトリ・ファイルが同期対象です:
| パス | 同期方法 |
|------|---------|
| .claude/commands/ | 差分表示→選択適用 |
| .claude/skills/ | 差分表示→選択適用 |
| .claude/worktree-config.json | 差分表示→選択適用 |
| .devcontainer/ | 差分表示→選択適用 |
| scripts/ | 差分表示→選択適用 |
| .claude/CLAUDE.md | 差分表示のみ(自動上書きしない) |
TEMPLATE_REPO="https://github.com/AtsushiHashimoto/research-project-template"
TMP_DIR=$(mktemp -d)
git clone --depth 1 "$TEMPLATE_REPO" "$TMP_DIR/template" 2>/dev/null
同期対象の各ファイルについて、テンプレートの最新版とローカルファイルを比較します。
# 対象ディレクトリ
SYNC_TARGETS=(
".claude/commands"
".claude/skills"
".claude/worktree-config.json"
".devcontainer"
"scripts"
)
# 各ファイルのdiffを取得
for target in "${SYNC_TARGETS[@]}"; do
diff -rq "$TMP_DIR/template/$target" "$target" 2>/dev/null
done
ユーザーに差分を提示します:
## テンプレート更新の検出結果
### 新規ファイル(テンプレートにのみ存在)
- `.claude/commands/new-command.md`
### 変更されたファイル
- `.claude/commands/commit/merge.md` (テンプレート側で更新あり)
- `scripts/safe-remove-worktree.sh` (テンプレート側で更新あり)
### ローカルのみのファイル(テンプレートに存在しない)
- `.claude/commands/custom-command.md` (ローカル追加)
### CLAUDE.md の差分(参考表示のみ)
[diff表示]
ユーザーに各変更について適用するか確認します:
rm -rf "$TMP_DIR"
重要:
.claude/CLAUDE.md は絶対に自動上書きしない(プロジェクト固有の設定を含むため)install.sh と同じものを使用/template/contribute を使用data-ai
Set up data directories in a new worktree
testing
Safely remove a worktree after checking for important data
data-ai
Initialize worktree data protection configuration (run once in main repository)
research
Contribute improvements back to research-project-template (テンプレートへの改善PR)