Skip to content
Back to skills

Gitignore Checker

ASecurity

コミット前に .gitignore に追加すべきファイルをチェックする。「gitignore チェック」「コミット前チェック」「機密ファイル確認」「.gitignore 確認」「追加すべきファイル」「無視すべきファイル」「gitignore 推奨」などで起動。機密情報や不要なファイルがコミットされないように確認。

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
developmentbashnoderailsawsgitsecurity

Works with

  • vscode
  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill gitignore-checker --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gitignore Checker?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gitignore Checker
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-gitignore-checker/badge)](https://www.skillsdirectory.com/skills/majiayu000-gitignore-checker)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gitignore-checker
description: コミット前に .gitignore に追加すべきファイルをチェックする。「gitignore チェック」「コミット前チェック」「機密ファイル確認」「.gitignore 確認」「追加すべきファイル」「無視すべきファイル」「gitignore 推奨」などで起動。機密情報や不要なファイルがコミットされないように確認。
allowed-tools: [Read, Bash, Glob, Grep]
context: fork
agent: shiiman-git:security-check
---

# Gitignore Checker

コミット前に .gitignore に追加すべきファイルをチェックします。

## ワークフロー

### 1. 現在のステージング状態を確認

```bash
git status --porcelain
```

### 2. チェック対象ファイルの分析

以下のカテゴリでファイルをチェック:

#### 機密ファイル(必須で .gitignore に追加)

| パターン | 説明 |
|----------|------|
| `.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/` | テストカバレッジ |

#### IDE 設定ファイル

| パターン | 説明 |
|----------|------|
| `.idea/` | JetBrains IDE |
| `.vscode/` | Visual Studio Code(settings.json は除く) |
| `*.swp`, `*.swo` | Vim スワップファイル |
| `.project`, `.classpath` | Eclipse |

### 3. 既存の .gitignore を確認

```bash
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. 修正提案(機密ファイルがある場合)

```bash
# ステージから削除
git reset HEAD {ファイル名}

# .gitignore に追加
echo "{パターン}" >> .gitignore
```

## 重要な注意事項

- ✅ コミット前に必ず実行を推奨
- ✅ 機密ファイルは絶対にコミットしない
- ✅ 検出されたファイルは即座に .gitignore に追加
- ❌ 一度コミットした機密情報は履歴に残る(git filter-branch が必要)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.