jpskill.com
🛠️ 開発・MCP コミュニティ

file-name-wizard

Audit all filename and naming conventions in the codebase against CLAUDE.md standards and common patterns. Use when user asks to check naming conventions, audit filenames, find naming inconsistencies, or validate file naming patterns.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o file-name-wizard.zip https://jpskill.com/download/18236.zip && unzip -o file-name-wizard.zip && rm file-name-wizard.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18236.zip -OutFile "$d\file-name-wizard.zip"; Expand-Archive "$d\file-name-wizard.zip" -DestinationPath $d -Force; ri "$d\file-name-wizard.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して file-name-wizard.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → file-name-wizard フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ファイル名と命名規則の監査

指示

コードベース内のすべてのファイル名と命名規則の体系的な監査を実施し、矛盾、アンチパターン、および命名標準の違反を特定します。

フェーズ 1: 発見と標準の抽出

ステップ 1: すべてのファイルを見つける

Glob を使用して、コードベース内のすべてのファイルを特定します。

  • ソースファイル (.ts, .tsx, .js, .jsx など)
  • 設定ファイル
  • ドキュメントファイル
  • テストファイル

監査対象のすべてのファイルの包括的な ToDo リストを作成します。

ステップ 2: 命名標準を抽出する

リポジトリ内のすべての CLAUDE.md ファイルを読み込みます。

  • ルートの CLAUDE.md (存在する場合)
  • ディレクトリ固有の CLAUDE.md ファイル

命名規則を抽出します。

  • ファイルの命名パターン (kebab-case, PascalCase など)
  • ディレクトリ構造のルール
  • コンポーネントの命名ルール
  • ユーティリティ/ヘルパーの命名ルール
  • テストファイルの命名ルール
  • 設定ファイルの命名ルール
  • 定数/enum ファイルの命名ルール

ステップ 3: 暗黙的なパターンを特定する

明示的な CLAUDE.md ルールがなくても、パターンを特定します。

  • 各ディレクトリで最も一般的な命名規則
  • グルーピングパターン (例: *.service.ts, *.controller.ts)
  • 組織パターン (例: components/, utils/, lib/)

フェーズ 2: 体系的なファイル監査

ToDo リスト内の各ファイルについて:

ステップ 1: ファイル名を分析する

  • 現在のファイル名は何ですか?
  • どの命名規則を使用していますか?
  • 記述的で明確ですか?
  • その目的/内容と一致していますか?

ステップ 2: 標準と照らし合わせる

以下と比較します。

  • このディレクトリの明示的な CLAUDE.md ルール
  • 同じディレクトリ内の暗黙的なパターン
  • ファイルタイプの一般的な命名規則
  • フレームワーク/言語のベストプラクティス

ステップ 3: 問題を特定する

命名規則の違反:

  • 間違ったケース (例: kebab-case にすべきなのに PascalCase)
  • 混合された規則 (例: userAuth.service.ts で camelCase とドット表記を混在)
  • ディレクトリパターンとの不整合

明確さの問題:

  • 曖昧な名前 (例: utils.ts, helpers.ts, stuff.ts)
  • 過度に冗長な名前
  • 誤解を招く名前 (内容が名前と一致しない)
  • コンテキストのない略語

アンチパターン:

  • 一時的な名前 (例: temp.ts, test.ts, new-*.ts, *-v2.ts)
  • 一般的な名前 (例: index2.ts, common.ts)
  • 古い名前 (例: old-*.ts, legacy-*.ts)
  • フィーチャーフラグ名 (例: *-new.ts, *-enhanced.ts)

組織上の問題:

  • 間違ったディレクトリにあるファイル
  • グルーピングサフィックスの欠落 (例: *.service.ts にすべき)
  • 兄弟ファイルとの不整合

ステップ 4: ファイルの内容を確認する

ファイルの内容を読み込んで検証します。

  • ファイル名は内容を正確に記述していますか?
  • 内部の内容に基づいて、より良い名前はありますか?
  • 内部に命名規則の違反 (クラス名など) はありますか?

ステップ 5: 調査結果を記録する

メモリに保存します。

File: path/to/filename.ts
Convention Used: camelCase
Should Be: kebab-case
Pattern: Violates directory convention
Issues:
- [Specific issue]
Suggested Name: [better-name.ts]
Severity: [HIGH|MEDIUM|LOW]

ステップ 6: ToDo を更新する

ToDo リストでファイルを監査済みとしてマークします。

フェーズ 3: パターン分析

すべてのファイルを監査した後:

ステップ 1: 体系的な問題を特定する

  • どのディレクトリに最も多くの矛盾がありますか?
  • どの命名パターンが最も違反されていますか?
  • 同様の違反のクラスターはありますか?

ステップ 2: 外れ値を見つける

  • どのパターンにも一致しないファイル
  • 一回限りの命名スキーム
  • 孤立したファイルタイプ

ステップ 3: 不足している標準を検出する

  • 明確な命名規則が欠けているディレクトリ
  • 確立されたパターンがないファイルタイプ
  • CLAUDE.md ドキュメントが必要な領域

フェーズ 4: レポートを生成する

.audits/naming-audit-[timestamp].md にレポートを作成します。


# ファイル名と命名規則の監査
**Date**: [timestamp]
**Files Audited**: X
**Issues Found**: Y

---

## 概要
- **重大な問題**: X (一貫性を阻害する)
- **優先度高**: Y (重大な違反)
- **優先度中**: Z (軽微な矛盾)
- **優先度低**: W (提案)

**最も問題のあるディレクトリ**: [path] (X 件の問題)

---

## 重大度別の問題

### CRITICAL: 規則違反

#### 一時的/移行ファイル名
- `src/services/auth-v2.ts` - 移行ファイルがまだ使用中
  - **違反**: バージョンサフィックスのルールなし
  - **提案**: `src/services/auth.ts` (古いものを置き換える)

- `src/utils/new-logger.ts` - 一時的な命名
  - **違反**: "new-" プレフィックスのルールなし
  - **提案**: `src/utils/logger.ts`

#### 間違ったケースの規則
- `src/components/UserProfile.tsx` - PascalCase
  - **ディレクトリ標準**: kebab-case
  - **提案**: `src/components/user-profile.tsx`

### HIGH: 一貫性の違反

#### ディレクトリパターンとの不整合
- `src/services/database.ts` - `*.service.ts` サフィックスの欠落
  - **パターン**: ディレクトリ内のすべてのファイルが `*.service.ts` を使用
  - **提案**: `src/services/database.service.ts`

#### 曖昧/一般的な名前
- `src/utils/helpers.ts` - 一般的すぎる
  - **内容**: 文字列操作関数
  - **提案**: `src/utils/string-helpers.ts`

### MEDIUM: 明確さの問題

#### 誤解を招く名前
- `src/lib/validator.ts` - 単一目的として命名
  - **内容**: 複数のバリデーターとフォーマッター
  - **提案**: 分割するか、`validators.ts` に名前を変更する

### LOW: 提案

#### 冗長な名前
- `src/components/user-authentication-form-component.tsx`
  - **冗長**: コンポーネントディレクトリ内の "component" サフィックス
  - **提案**: `src/components/user-auth-form.tsx`

---

## ディレクトリ別の問題

### src/services/ (12 件の問題)
- **パターン**: `*.service.ts` サフィックスを使用する必要がある
- **違反**:
  - `database.ts` (サフィックスの欠落)
  - `auth-helper.ts` (間違ったサフィックス)
  - `userService.ts` (間違ったケース)

### src/components/ (8 件の問題)
- **パターン**: サフィックスなしの kebab-case
- **違反**:
  - `UserProfile.tsx` (PascalCase)
  - `button-component.tsx` (冗長なサフィックス)

[すべてのディレクトリについて続行]

---

## パターン分析

### 最も一般的な違反
1. **混合ケースの規則** - 15 ファイル
2. **パターンサフィックスの欠落** - 12 ファイル
3. **一般的な名前** - 8 ファイル
4. **一時的な名前** - 5 ファイル

###

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Filename & Naming Convention Audit

Instructions

Perform systematic audit of all filenames and naming conventions in the codebase to identify inconsistencies, anti-patterns, and violations of naming standards.

Phase 1: Discovery & Standard Extraction

Step 1: Find All Files

Use Glob to identify all files in the codebase:

  • Source files (.ts, .tsx, .js, .jsx, etc.)
  • Config files
  • Documentation files
  • Test files

Create comprehensive todo list of all files to audit.

Step 2: Extract Naming Standards

Read all CLAUDE.md files in the repository:

  • Root CLAUDE.md if exists
  • Directory-specific CLAUDE.md files

Extract naming conventions:

  • File naming patterns (kebab-case, PascalCase, etc.)
  • Directory structure rules
  • Component naming rules
  • Utility/helper naming rules
  • Test file naming rules
  • Config file naming rules
  • Constant/enum file naming rules

Step 3: Identify Implicit Patterns

Even without explicit CLAUDE.md rules, identify patterns:

  • Most common naming convention in each directory
  • Grouping patterns (e.g., *.service.ts, *.controller.ts)
  • Organizational patterns (e.g., components/, utils/, lib/)

Phase 2: Systematic File Audit

For EACH file in the todo list:

Step 1: Analyze Filename

  • What is the current filename?
  • What naming convention does it use?
  • Is it descriptive and clear?
  • Does it match its purpose/content?

Step 2: Check Against Standards

Compare to:

  • Explicit CLAUDE.md rules for this directory
  • Implicit patterns in the same directory
  • Common naming conventions for file type
  • Best practices for the framework/language

Step 3: Identify Issues

Naming Convention Violations:

  • Wrong case (e.g., PascalCase when should be kebab-case)
  • Mixed conventions (e.g., userAuth.service.ts mixing camelCase and dot notation)
  • Inconsistent with directory pattern

Clarity Issues:

  • Vague names (e.g., utils.ts, helpers.ts, stuff.ts)
  • Overly verbose names
  • Misleading names (content doesn't match name)
  • Abbreviations without context

Anti-Patterns:

  • Temporary names (e.g., temp.ts, test.ts, new-*.ts, *-v2.ts)
  • Generic names (e.g., index2.ts, common.ts)
  • Dated names (e.g., old-*.ts, legacy-*.ts)
  • Feature flag names (e.g., *-new.ts, *-enhanced.ts)

Organizational Issues:

  • File in wrong directory
  • Missing grouping suffix (e.g., should be *.service.ts)
  • Inconsistent with sibling files

Step 4: Check File Contents

Read the file to verify:

  • Does filename accurately describe contents?
  • Would a better name exist based on what's inside?
  • Are there naming conventions violations inside (class names, etc.)?

Step 5: Record Findings

Store in memory:

File: path/to/filename.ts
Convention Used: camelCase
Should Be: kebab-case
Pattern: Violates directory convention
Issues:
- [Specific issue]
Suggested Name: [better-name.ts]
Severity: [HIGH|MEDIUM|LOW]

Step 6: Update Todo

Mark file as audited in todo list.

Phase 3: Pattern Analysis

After auditing all files:

Step 1: Identify Systemic Issues

  • Which directories have most inconsistencies?
  • What naming patterns are most violated?
  • Are there clusters of similar violations?

Step 2: Find Outliers

  • Files that don't match any pattern
  • One-off naming schemes
  • Orphaned file types

Step 3: Detect Missing Standards

  • Directories lacking clear naming conventions
  • File types without established patterns
  • Areas needing CLAUDE.md documentation

Phase 4: Generate Report

Create report at .audits/naming-audit-[timestamp].md:

# Filename & Naming Convention Audit
**Date**: [timestamp]
**Files Audited**: X
**Issues Found**: Y

---

## Executive Summary
- **Critical Issues**: X (blocks consistency)
- **High Priority**: Y (major violations)
- **Medium Priority**: Z (minor inconsistencies)
- **Low Priority**: W (suggestions)

**Most Problematic Directory**: [path] (X issues)

---

## Issues by Severity

### CRITICAL: Convention Violations

#### Temporary/Migration Filenames
- `src/services/auth-v2.ts` - Migration file still in use
  - **Violates**: No version suffixes rule
  - **Suggested**: `src/services/auth.ts` (replace old one)

- `src/utils/new-logger.ts` - Temporary naming
  - **Violates**: No "new-" prefix rule
  - **Suggested**: `src/utils/logger.ts`

#### Wrong Case Convention
- `src/components/UserProfile.tsx` - PascalCase
  - **Directory Standard**: kebab-case
  - **Suggested**: `src/components/user-profile.tsx`

### HIGH: Consistency Violations

#### Inconsistent with Directory Pattern
- `src/services/database.ts` - Missing `.service.ts` suffix
  - **Pattern**: All files in directory use `*.service.ts`
  - **Suggested**: `src/services/database.service.ts`

#### Vague/Generic Names
- `src/utils/helpers.ts` - Too generic
  - **Contains**: String manipulation functions
  - **Suggested**: `src/utils/string-helpers.ts`

### MEDIUM: Clarity Issues

#### Misleading Names
- `src/lib/validator.ts` - Named as single purpose
  - **Contains**: Multiple validators and formatters
  - **Suggested**: Split or rename to `validators.ts`

### LOW: Suggestions

#### Verbose Names
- `src/components/user-authentication-form-component.tsx`
  - **Redundant**: "component" suffix in components dir
  - **Suggested**: `src/components/user-auth-form.tsx`

---

## Issues by Directory

### src/services/ (12 issues)
- **Pattern**: Should use `*.service.ts` suffix
- **Violations**:
  - `database.ts` (missing suffix)
  - `auth-helper.ts` (wrong suffix)
  - `userService.ts` (wrong case)

### src/components/ (8 issues)
- **Pattern**: kebab-case without suffix
- **Violations**:
  - `UserProfile.tsx` (PascalCase)
  - `button-component.tsx` (redundant suffix)

[Continue for all directories]

---

## Pattern Analysis

### Most Common Violations
1. **Mixed case conventions** - 15 files
2. **Missing pattern suffixes** - 12 files
3. **Generic names** - 8 files
4. **Temporary names** - 5 files

### Directories Lacking Standards
- `src/lib/` - No clear convention (mix of all patterns)
- `src/shared/` - Inconsistent organization
- `tools/` - No established pattern

### Emerging Anti-Patterns
- Version suffixes appearing (`*-v2`, `*-new`)
- Component files with "component" in name
- Service files without `.service.ts` suffix

---

## CLAUDE.md Coverage

### Documented Standards
- ✅ `src/components/` - Documented in `src/CLAUDE.md`
- ✅ `src/services/` - Documented in `src/CLAUDE.md`
- ❌ `src/lib/` - No documentation
- ❌ `src/utils/` - No documentation
- ❌ `tools/` - No documentation

### Missing Documentation Needed
- File naming conventions for `src/lib/`
- Grouping patterns for utilities
- Test file naming standards
- Config file organization rules

---

## Statistics

**By Issue Type**:
- Case Violations: X
- Pattern Violations: Y
- Generic Names: Z
- Temporary Names: W
- Misleading Names: V

**By Severity**:
- Critical: X
- High: Y
- Medium: Z
- Low: W

**By File Type**:
- TypeScript: X issues
- React Components: Y issues
- Test Files: Z issues
- Config Files: W issues

---

## Detailed File List

### Critical Issues
| File | Issue | Suggested Name | Reason |
|------|-------|----------------|--------|
| `src/auth-v2.ts` | Version suffix | `src/auth.ts` | Migration files not allowed |
| `src/UserProfile.tsx` | Wrong case | `src/user-profile.tsx` | Directory uses kebab-case |

### High Priority Issues
[Similar table]

### Medium Priority Issues
[Similar table]

### Low Priority Issues
[Similar table]

Phase 5: Summary for User

Provide concise summary:

# Naming Convention Audit Complete

## Overview
- **Files Audited**: X
- **Issues Found**: Y
- **Directories with Issues**: Z

## Critical Issues (Immediate Action)
- X files with version/migration suffixes (`*-v2`, `*-new`)
- Y files with wrong case convention
- Z files in wrong locations

## Most Problematic Areas
1. **src/services/** - 12 issues (missing `.service.ts` suffix)
2. **src/components/** - 8 issues (case convention mix)
3. **src/lib/** - 6 issues (no clear standard)

## Top Violations
- Mixed case conventions: 15 files
- Missing pattern suffixes: 12 files
- Generic names: 8 files

## Missing Standards
- `src/lib/` lacks naming documentation
- `src/utils/` needs pattern definition
- Test files need naming standard

**Full Report**: `.audits/naming-audit-[timestamp].md`

Critical Principles

  • NEVER EDIT FILES - This is audit only, not renaming
  • NEVER SKIP FILES - Audit every file in todo list
  • DO READ CLAUDE.MD - Extract explicit standards first
  • DO IDENTIFY PATTERNS - Find implicit conventions
  • DO BE CONSISTENT - Apply same standards across similar files
  • DO CHECK CONTENTS - Verify name matches file contents
  • DO TRACK PROGRESS - Update todo list as you audit
  • DO FLAG ANTI-PATTERNS - Especially temporary/migration names

Success Criteria

A complete naming audit includes:

  • All files in codebase audited
  • All CLAUDE.md standards extracted and applied
  • Implicit patterns identified for each directory
  • Violations categorized by severity
  • Systemic issues identified
  • Missing standards documented
  • Structured report generated
  • Statistics and trends analyzed