.claude/skills/init-repo/SKILL.md
git initしてリポジトリを作成し、初期コミットと開発体制を整えるスキル。新しいプロジェクトを始めたい、リポジトリを作りたい、git initしたい、開発環境をセットアップしたいときに使う。'新しいプロジェクト作って'、'リポジトリ初期化して'、'開発始めたい'といった発言でもトリガーする。
npx skillsauth add peintangos/langgraph-tutorial-ts init-repoInstall 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.
Arguments: $ARGUMENTS
対話を通じてユーザーの意図を汲み取り、新しい git リポジトリを作成して開発をすぐに始められる状態にする。
以下の情報を対話で集める。$ARGUMENTS に含まれている情報は再度聞かない。
推測できるものは推測して確認を取る形にし、質問攻めにしない。
関連する項目はまとめて聞く。
| 項目 | 例 |
|---|---|
| プロジェクト名 | my-app |
| 一行の説明 | "家計簿管理のCLIツール" |
| 主要言語 / スタック | TypeScript + Node.js, Python, Rust, Go など |
| 項目 | デフォルト | 補足 |
|---|---|---|
| ディレクトリの場所 | カレントディレクトリ直下に {プロジェクト名}/ | 既存ディレクトリでも可 |
| .gitignore テンプレート | 言語から自動判定 | GitHub の gitignore テンプレートを使用 |
| ライセンス | MIT | なしも選択可 |
| パッケージマネージャ初期化 | 言語から自動判定(npm, pip, cargo など) | スキップも可 |
| 初期ディレクトリ構造 | 言語の慣例に従う | 例: src/, tests/ |
| GitHub リモート作成 | 作成する | gh repo create を使用 |
| リポジトリの公開範囲 | private | public / private / internal |
ヒアリングのコツ:
ヒアリング結果に基づいて以下を実行する。
mkdir -p {path}
cd {path}
git init
既存ディレクトリを指定された場合は mkdir をスキップ。
既に .git/ がある場合はユーザーに確認を取ってから続行する。
言語・スタックに適した .gitignore を生成する。
GitHub の公式テンプレート(https://github.com/github/gitignore)の内容をベースにする。
よく使われる追加パターン(.env, .DS_Store, エディタ設定など)も含める。
最小限の README を生成する:
# {プロジェクト名}
{説明}
## Getting Started
TODO
## License
{ライセンス名}
凝った README は不要。あとからユーザーが育てる前提。
ユーザーが選択したライセンスのフルテキストを生成する。
年号とコピーライトホルダーは git config の user.name から取得する。
「なし」を選択した場合はスキップ。
言語に応じて適切な初期化コマンドを実行する:
| 言語 | コマンド |
|---|---|
| Node.js / TypeScript | npm init -y → description と name を上書き |
| Python | pyproject.toml を生成(PEP 621 準拠) |
| Rust | cargo init (既に Cargo.toml がなければ) |
| Go | go mod init {module-path} |
| その他 | スキップし、ユーザーに手動セットアップを促す |
TypeScript を選択した場合は tsconfig.json も生成する。
言語の慣例に沿った最小限のディレクトリを作成する。
空ディレクトリには .gitkeep を置く。
例(TypeScript):
src/
tests/
例(Python):
src/{package_name}/
__init__.py
tests/
必要以上にディレクトリを作らない。ユーザーが成長させる前提。
git add -A
git commit -m "Initial commit"
ユーザーがリモート作成を希望した場合のみ実行する。
gh repo create {name} --{visibility} --source=. --push
gh コマンドが使えない場合はインストール手順を案内する。
認証が通っていない場合は gh auth login の実行を促す。
作成後、リポジトリ URL を表示する。
完了後、以下を簡潔に報告する:
create-react-app や next init のようなフレームワーク固有の scaffolding ツールがある場合は、そちらを使うことを提案してもよい。ただしユーザーが明示的にシンプルなセットアップを望んでいる場合はこのスキルで進めるtesting
Run tests and return a summary. Test logs are contained within the forked context; only the summary is returned to the main context.
testing
Review testing strategy and guidelines
testing
Create a new feature specification and update progress.md and roadmap.md
documentation
Interactively adapt the Ralph Matsuo template to the current repository by filling project docs, rules, roadmap, and ralph.toml in one setup pass