mcpField
H
here-be-git

here-be-git

github.com/intellectronica開発298528 回インストール27 週間前に更新
リポジトリ

here-be-git について

here-be-git は Git リポジトリを初期化し、必要に応じてエージェント向けのコミット手順や .gitignore を設定するスキルです。設定ファイルの作成からコミットまでを案内します。

主な機能

  1. 01Git リポジトリの初期化
  2. 02AGENTS.md へのコミット手順追加
  3. 03指定パターンでの .gitignore 作成
  4. 04生成した設定ファイルのコミット

活用シーン

  1. 01ディレクトリで Git 管理を始める場面
  2. 02エージェントのコミット規則を設定する場面
  3. 03言語や IDE の除外パターンを追加する場面

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/intellectronica/agent-skills --skill here-be-git

インストール後、Claude Code で/here-be-gitを入力して読み込まれたか確認します。

詳細

Here Be Git

エージェントのワークフロー向けのオプション設定を含めて、Git リポジトリを初期化します。

ワークフロー

ステップ 1:Git リポジトリを初期化する

現在の作業ディレクトリで git init を実行します。リポジトリが初期化されたことをユーザーに伝えます。

ステップ 2:エージェントのコミット指示

ユーザーに次のように尋ねます。

タスクの完了時に、エージェントが必ずコミットするよう指示を追加しますか?

ユーザーが同意した場合:

  1. 現在のディレクトリに AGENTS.md が存在するか確認します
  2. 存在する場合は、コミット指示を追記します
  3. 存在しない場合は、コミット指示を記載したファイルを作成します

追加するコミット指示:

## Git Workflow — CRITICAL, MANDATORY, NO EXCEPTIONS

> **THIS IS NOT OPTIONAL.** Every agent operating in this repository MUST follow this workflow after every change, no matter how small. There are ZERO exceptions to this rule. Skipping a commit is never acceptable. If you have made any change to any file, you MUST commit before moving on.

### Rules

1. **ALWAYS commit your changes immediately after completing a task or reaching any logical stopping point.** Do not defer. Do not batch. Do not skip.
2. **ALWAYS commit before ending your session.** The working directory MUST be clean (all changes committed) when you finish. Leaving uncommitted changes is a failure state.
3. **Use clear, descriptive commit messages** that explain what was done and why.
4. **If in doubt, commit.** It is always better to have one commit too many than one too few.

### To be absolutely clear

- "I'll commit later" — **No. Commit now.**
- "It's just a small change" — **Commit it.**
- "I'm about to make another change" — **Commit the current one first.**
- "The user didn't ask me to commit" — **Irrelevant. Commit anyway.**

AGENTS.md の作成または更新後、適切なメッセージを付けてコミットします。

ステップ 3:Gitignore の設定

ユーザーに次のように尋ねます。

.gitignore を作成しますか?作成する場合は、どの種類やパターンを含めますか?(例:Node.js、Python、macOS、IDE のファイル、または特定のファイル/パターン)

ユーザーが種類やパターンを指定した場合:

  1. 入力に基づいて適切な .gitignore を生成します
  2. 一般的な種類については、標準的なパターンを含めます:
    • Node.js:node_modules/、dist/、.env、*.log など
    • Python:__pycache__/、*.pyc、.venv/、venv/、.env、*.egg-info/ など
    • macOS:.DS_Store、.AppleDouble、.LSOverride、._*
    • IDE ファイル:.idea/、.vscode/、*.swp、*.swo、*.sublime-*
  3. ユーザーが指定したファイルやパターンを含めます
  4. 適切なメッセージを付けて .gitignore をコミットします

ユーザーが希望しない場合は、このステップをスキップします。

注意事項

  • ディレクトリ内ですでに Git が初期化されている場合は、その旨をユーザーに伝え、ステップ 2 に進みます
  • 確認の質問には AskUserQuestion ツールを使用します
  • コミットはアトミックにし、内容が明確に伝わるメッセージを付けます

コメント