본문으로 건너뛰기
Skillpedia
프롬프트 및 LLM33k · #8721

agent-md-refactor

하는 일

이 스킬은 AI 에이전트가 코딩 에이전트를 위한 긴 지침 파일을 정리하도록 돕습니다. CLAUDE.md 또는 AGENTS.md 파일이 너무 커져서 쓸모가 떨어진 사람을 위한 것입니다.

사용하는 경우

  • ✓CLAUDE.md나 AGENTS.md 파일이 너무 길어 읽기 어려울 때.
  • ✓에이전트 지침에 서로 충돌하는 규칙이 있어 정리하고 싶을 때.
  • ✓에이전트 지침을 연결된 주제별 파일로 정리하려는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/agent-md-refactor/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/agent-md-refactor/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“CLAUDE.md가 너무 크고 복잡합니다. 짧은 메인 파일과 정리된 페이지로 나눠 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 먼저 서로 모순되는 부분을 찾은 다음, 메인 파일에 필요한 핵심만 골라냅니다. 나머지는 범주로 묶어 연결된 파일을 만들고, 모호하거나 중복된 지침을 표시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Agent MD Refactor

Refactor bloated agent instruction files (AGENTS.md, CLAUDE.md, COPILOT.md, etc.) to follow progressive disclosure principles - keeping essentials at root and organizing the rest into linked, categorized files.


Triggers

Use this skill when:

  • "refactor my AGENTS.md" / "refactor my CLAUDE.md"
  • "split my agent instructions"
  • "organize my CLAUDE.md file"
  • "my AGENTS.md is too long"
  • "progressive disclosure for my instructions"
  • "clean up my agent config"

Quick Reference

Phase Action Output
1. Analyze Find contradictions List of conflicts to resolve
2. Extract Identify essentials Core instructions for root file
3. Categorize Group remaining instructions Logical categories
4. Structure Create file hierarchy Root + linked files
5. Prune Flag for deletion Redundant/vague instructions

Process

Phase 1: Find Contradictions

Identify any instructions that conflict with each other.

Look for:

  • Contradictory style guidelines (e.g., "use semicolons" vs "no semicolons")
  • Conflicting workflow instructions
  • Incompatible tool preferences
  • Mutually exclusive patterns

For each contradiction found:

## Contradiction Found

**Instruction A:** [quote]
**Instruction B:** [quote]

**Question:** Which should take precedence, or should both be conditional?

Ask the user to resolve before proceeding.


Phase 2: Identify the Essentials

Extract ONLY what belongs in the root agent file. The root should be minimal - information that applies to every single task.

Essential content (keep in root):

Category Example
Project description One sentence: "A React dashboard for analytics"
Package manager Only if not npm (e.g., "Uses pnpm")
Non-standard commands Custom build/test/typecheck commands
Critical overrides Things that MUST override defaults
Universal rules Applies to 100% of tasks

NOT essential (move to linked files):

  • Language-specific conventions
  • Testing guidelines
  • Code style details
  • Framework patterns
  • Documentation standards
  • Git workflow details

Phase 3: Group the Rest

Organize remaining instructions into logical categories.

Common categories:

Category Contents
typescript.md TS conventions, type patterns, strict mode rules
testing.md Test frameworks, coverage, mocking patterns
code-style.md Formatting, naming, comments, structure
git-workflow.md Commits, branches, PRs, reviews
architecture.md Patterns, folder structure, dependencies
api-design.md REST/GraphQL conventions, error handling
security.md Auth patterns, input validation, secrets
performance.md Optimization rules, caching, lazy loading

Grouping rules:

  1. Each file should be self-contained for its topic
  2. Aim for 3-8 files (not too granular, not too broad)
  3. Name files clearly: {topic}.md
  4. Include only actionable instructions

Phase 4: Create the File Structure

Output structure:

project-root/
├── CLAUDE.md (or AGENTS.md)     # Minimal root with links
└── .claude/                      # Or docs/agent-instructions/
    ├── typescript.md
    ├── testing.md
    ├── code-style.md
    ├── git-workflow.md
    └── architecture.md

Root file template:

# Project Name

One-sentence description of the project.

## Quick Reference

- **Package Manager:** pnpm
- **Build:** `pnpm build`
- **Test:** `pnpm test`
- **Typecheck:** `pnpm typecheck`

## Detailed Instructions

For specific guidelines, see:
- [TypeScript Conventions](.claude/typescript.md)
- [Testing Guidelines](.claude/testing.md)
- [Code Style](.claude/code-style.md)
- [Git Workflow](.claude/git-workflow.md)
- [Architecture Patterns](.claude/architecture.md)

Each linked file template:

# {Topic} Guidelines

## Overview
Brief context for when these guidelines apply.

## Rules

### Rule Category 1
- Specific, actionable instruction
- Another specific instruction

### Rule Category 2
- Specific, actionable instruction

## Examples

### Good
\`\`\`typescript
// Example of correct pattern
\`\`\`

### Avoid
\`\`\`typescript
// Example of what not to do
\`\`\`

Phase 5: Flag for Deletion

Identify instructions that should be removed entirely.

Delete if:

| Criterion | Example | Why Delete | |--------

자주 묻는 질문

지침을 삭제하나요?

중복되거나 모호한 지침을 제거 대상으로 표시하므로, 버리기 전에 직접 검토할 수 있습니다.

메인 파일에는 무엇이 들어가나요?

모든 세션에 필요한 핵심 내용과, 더 자세한 내용을 담은 파일로 가는 링크가 들어갑니다.

충돌하는 규칙도 찾나요?

네. 첫 단계에서 서로 모순되는 지침을 찾고, 어느 쪽을 우선할지 묻습니다.

상세 정보

작성자의 원본 설명

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8721
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬