Claude-skill-registry gitignore-checker
コミット前に .gitignore に追加すべきファイルをチェックする。「gitignore チェック」「コミット前チェック」「機密ファイル確認」「.gitignore 確認」「追加すべきファイル」「無視すべきファイル」「gitignore 推奨」などで起動。機密情報や不要なファイルがコミットされないように確認。
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/gitignore-checker" ~/.claude/skills/majiayu000-claude-skill-registry-gitignore-checker && rm -rf "$T"
manifest:
skills/data/gitignore-checker/SKILL.mdsource content
Gitignore Checker
コミット前に .gitignore に追加すべきファイルをチェックします。
ワークフロー
1. 現在のステージング状態を確認
git status --porcelain
2. チェック対象ファイルの分析
以下のカテゴリでファイルをチェック:
機密ファイル(必須で .gitignore に追加)
| パターン | 説明 |
|---|---|
| 環境変数ファイル |
, | 秘密鍵 |
| 認証情報 |
| シークレットファイル |
| Rails シークレット |
| AWS 認証情報 |
一般的に無視すべきファイル
| パターン | 説明 |
|---|---|
| npm パッケージ |
| 依存パッケージ |
| macOS システムファイル |
| Windows サムネイル |
| ログファイル |
, | 一時ファイル |
, | ビルド成果物 |
| テストカバレッジ |
IDE 設定ファイル
| パターン | 説明 |
|---|---|
| JetBrains IDE |
| Visual Studio Code(settings.json は除く) |
, | Vim スワップファイル |
, | Eclipse |
3. 既存の .gitignore を確認
cat .gitignore 2>/dev/null || echo "(.gitignore が存在しません)"
4. 結果報告
## .gitignore チェック結果 ### ⚠️ 機密ファイル(コミット禁止) | ファイル | 状態 | 推奨アクション | |----------|------|----------------| | .env | ステージ済 | git reset HEAD .env && .gitignore に追加 | | credentials.json | 未追跡 | .gitignore に追加 | ### 💡 推奨: .gitignore に追加 | パターン | 理由 | |----------|------| | node_modules/ | npm パッケージ(リポジトリに含める必要なし) | | .DS_Store | macOS システムファイル | ### ✅ 問題なし 機密ファイルは検出されませんでした。
5. 修正提案(機密ファイルがある場合)
# ステージから削除 git reset HEAD {ファイル名} # .gitignore に追加 echo "{パターン}" >> .gitignore
重要な注意事項
- ✅ コミット前に必ず実行を推奨
- ✅ 機密ファイルは絶対にコミットしない
- ✅ 検出されたファイルは即座に .gitignore に追加
- ❌ 一度コミットした機密情報は履歴に残る(git filter-branch が必要)