コミット前に .gitignore に追加すべきファイルをチェックする。「gitignore チェック」「コミット前チェック」「機密ファイル確認」「.gitignore 確認」「追加すべきファイル」「無視すべきファイル」「gitignore 推奨」などで起動。機密情報や不要なファイルがコミットされないように確認。
Detects sensitive files and common artifacts that should be gitignored before committing. Triggers on commands like "gitignore check" or "commit pre-check" to prevent secrets and build files from being committed.
/plugin marketplace add shiiman/claude-code-plugins/plugin install shiiman-git@shiiman-claude-code-pluginsThis skill is limited to using the following tools:
コミット前に .gitignore に追加すべきファイルをチェックします。
git status --porcelain
以下のカテゴリでファイルをチェック:
| パターン | 説明 |
|---|---|
.env* | 環境変数ファイル |
*.pem, *.key | 秘密鍵 |
credentials.json | 認証情報 |
*.secret | シークレットファイル |
config/secrets.yml | Rails シークレット |
.aws/ | AWS 認証情報 |
| パターン | 説明 |
|---|---|
node_modules/ | npm パッケージ |
vendor/ | 依存パッケージ |
.DS_Store | macOS システムファイル |
Thumbs.db | Windows サムネイル |
*.log | ログファイル |
*.tmp, *.temp | 一時ファイル |
dist/, build/ | ビルド成果物 |
coverage/ | テストカバレッジ |
| パターン | 説明 |
|---|---|
.idea/ | JetBrains IDE |
.vscode/ | Visual Studio Code(settings.json は除く) |
*.swp, *.swo | Vim スワップファイル |
.project, .classpath | Eclipse |
cat .gitignore 2>/dev/null || echo "(.gitignore が存在しません)"
## .gitignore チェック結果
### ⚠️ 機密ファイル(コミット禁止)
| ファイル | 状態 | 推奨アクション |
|----------|------|----------------|
| .env | ステージ済 | git reset HEAD .env && .gitignore に追加 |
| credentials.json | 未追跡 | .gitignore に追加 |
### 💡 推奨: .gitignore に追加
| パターン | 理由 |
|----------|------|
| node_modules/ | npm パッケージ(リポジトリに含める必要なし) |
| .DS_Store | macOS システムファイル |
### ✅ 問題なし
機密ファイルは検出されませんでした。
# ステージから削除
git reset HEAD {ファイル名}
# .gitignore に追加
echo "{パターン}" >> .gitignore