スキル一覧に戻る
erikpr1994

writing-claude-md

by erikpr1994

0🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: writing-claude-md description: "Use when creating or updating CLAUDE.md files at any level (global, project, folder). Covers inheritance rules and token budgets."

Writing CLAUDE.md Files

Overview

CLAUDE.md files provide context at different scopes. They follow hierarchical inheritance: global -> project -> folder.

When to Create

Create CLAUDE.md when:

  • Project has specific conventions
  • Folder has specialized context
  • Team patterns need documentation
  • Repeated instructions should be automated

Levels:

  • ~/.claude/CLAUDE.md - Global (all projects)
  • project/CLAUDE.md - Project-level
  • project/folder/CLAUDE.md - Folder-specific

Structure Template

# [Project/Folder Name]

## Overview
[Brief description of scope]

## Key Conventions
[Most important rules - loaded every session]

## File Patterns
[Naming, organization, structure]

## Common Tasks
[Frequent operations with guidance]

## Dependencies
[Key libraries, versions, integrations]

## Anti-Patterns
[What to avoid in this context]

Quality Checklist

  • Scope clearly defined (global/project/folder)
  • Under 500 tokens for always-loaded sections
  • Most critical rules first (may be truncated)
  • Folder detection patterns if folder-specific
  • No duplication of parent-level content
  • Anti-patterns documented
  • Tested with real prompts

Inheritance Rules

Global CLAUDE.md (always loaded)
    |
    v
Project CLAUDE.md (loaded in project)
    |
    v
Folder CLAUDE.md (loaded in folder context)

Child overrides parent for conflicting rules. Child extends parent for non-conflicting rules.

Token Budget Guidelines

LevelTargetMax
Global200500
Project5001500
Folder300800

Tips:

  • Lead with most critical content
  • Use bullet points over prose
  • Reference skills instead of duplicating
  • Move verbose content to referenced files

Examples

Good Project CLAUDE.md:

# MyApp

## Key Conventions
- TypeScript strict mode
- React Server Components by default
- Supabase for backend

## File Patterns
- Components: src/components/{name}/{name}.tsx
- Server actions: src/actions/{domain}.ts
- Database: supabase/migrations/*.sql

## Common Tasks
- New component: Use shadcn/ui, check existing patterns
- Database change: Create migration, test locally first

## Anti-Patterns
- No client-side data fetching (use RSC)
- No raw SQL (use Supabase client)

Bad CLAUDE.md:

# Instructions

This is a project. It uses various technologies.
Please be careful and write good code.
Follow best practices and industry standards.

(Vague, no actionable content, wastes tokens)

Common Mistakes

MistakeFix
Too verboseTrim to token budget
Duplicates parentOnly add new/override content
Generic adviceProject-specific conventions only
Critical content buriedLead with most important rules
No anti-patternsDocument what to avoid
Not testedVerify with real prompts

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です