improve-claude-md
하는 일
이 스킬은 코딩 어시스턴트의 CLAUDE.md 지침 파일을 개선하는 방법을 에이전트에게 가르칩니다. 작업별 지침을 조건이 붙은 블록으로 감싸, 어시스턴트가 각 작업에서 중요한 부분에 주의를 기울이도록 합니다.
사용하는 경우
- ✓어시스턴트가 무시하는 것처럼 보이는 CLAUDE.md 파일이 있을 때.
- ✓프로젝트 지침 파일이 길어지고 일반 지침과 작업별 지침이 섞여 있을 때.
- ✓어시스턴트 지침을 더 잘 따르도록 다시 써 달라고 요청할 때.
스킬 링크
https://github.com/humanlayer/skills/blob/main/plugins/improve-claude-md/skills/improve-claude-md/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제가 테스트를 작성할 때 Claude가 테스트 규칙을 따르도록 제 CLAUDE.md를 개선해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 핵심 프로젝트 맥락을 일반 텍스트로 두고, 작업별 지침은 조건이 표시된 블록으로 옮깁니다. 이렇게 하면 어시스턴트가 각 블록이 언제 적용되는지 분명히 알 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
When the user provides a CLAUDE.md file (or asks you to improve one), rewrite it following the principles and structure below.
Core Problem
Claude Code injects a system reminder with every CLAUDE.md that says:
"this context may or may not be relevant to your tasks. You should not respond to this context unless it is highly relevant to your task."
This means Claude will ignore parts of your CLAUDE.md it deems irrelevant. The more content that isn't applicable to the current task, the more likely Claude is to ignore everything — including the parts that matter.
Solution: <important if="condition"> Blocks
Wrap conditionally-relevant sections of the CLAUDE.md in <important if="condition"> XML tags. This exploits the same XML tag pattern used in Claude Code's own system prompt, giving the model an explicit relevance signal that cuts through the "may or may not be relevant" framing.
Principles
1. Foundational context stays bare, domain guidance gets wrapped
Not everything should be in an <important if> block. Context that is relevant to virtually every task — project identity, project map, tech stack — should be left as plain markdown at the top of the file. This is onboarding context the agent always needs.
Domain-specific guidance that only matters for certain tasks — testing patterns, API conventions, state management, i18n — gets wrapped in <important if> blocks with targeted conditions.
The rule of thumb: if it's relevant to 90%+ of tasks, leave it bare. If it's relevant to a specific kind of work, wrap it.
2. Conditions must be specific and targeted
Bad — overly broad conditions that match everything:
<important if="you are writing or modifying any code">
- Use absolute imports
- Use functional components
- Use camelCase filenames
</important>
Good — each rule has its own narrow trigger:
<important if="you are adding or modifying imports">
- Use `@/` absolute imports (see tsconfig.json for path aliases)
- Avoid default exports except in route files
</important>
<important if="you are creating new components">
- Use functional components with explicit prop interfaces
</important>
<important if="you are creating new files or directories">
- Use camelCase for file and directory names
</important>
3. Keep it short, use progressive disclosure sparingly
Do not shard into separate files that require the agent to make tool calls to discover, unless the extra context is incredibly verbose or complex.
The whole point of <important if> blocks is that everything is inline but conditionally weighted — the agent sees it all but only attends to what matches.
Prefer to keep the file concise.
4. Less is more
- Frontier models can reliably follow a few hundred. Claude Code's system prompt and tools already use ~50 of those. Your CLAUDE.md should be as lean as possible.
- Cut any instruction that a linter, formatter, or pre-commit hook can enforce
- Cut any instruction the agent can discover from existing code patterns. LLMs are in-context learners — if your codebase consistently uses a pattern, the agent will follow it after a few searches.
- Cut code snippets. They go stale and bloat the file. Use file path references instead (e.g., "see
src/utils/example.tsfor the pattern").
5. Keep all commands
Do not drop commands from the original file. The commands table is foundational reference — the agent needs to know what's available even if some commands are used less frequently.
Output Structure
When rewriting a CLAUDE.md, produce this structure:
# CLAUDE.md
[one-line project identity — what it is, what it's built with]
## Project map
[directory listing with brief descriptions]
<important if="you need to run commands to build, test, lint, or generate code">
[commands table — all commands from the original]
</important>
<important if="<specific trigger for rule 1>">
[rule 1]
</important>
<important if="<specific trigger for rule 2>">
[rule 2]
</important>
... more rules, each with their own block ...
<important if="<specific trigger for domain area 1>">
[guidance]
</important>
... more domain sections ...
How to Apply
When given an existing CLAUDE.md to improve:
- Identify the project identity — extract a single sentence describing what this is. Leave it bare at the top.
- Extract the directory map — keep it bare (no
<important if>wrapper). This is foundational context. - Extract the tech stack — if present, k
자주 묻는 질문
important-if 블록이 무엇인가요?
조건이 붙은 XML 스타일 태그로, 지침이 언제 적용되는지 어시스턴트에게 알려 줍니다.
파일 전체를 감싸야 하나요?
아니요. 프로젝트 정체성과 기술 스택 같은 기본 맥락은 일반 마크다운으로 둔다고 설명합니다.
왜 이 작업이 필요한가요?
어시스턴트는 관련 없다고 판단한 맥락을 무시할 수 있으므로, 길고 무관한 텍스트가 중요한 내용을 가릴 수 있다고 설명합니다.
상세 정보
작성자의 원본 설명
improve a CLAUDE.md file using <important if> blocks to improve instruction adherence
repo: humanlayer/skills
인기도
- GitHub 스타
- 5.5k
- 순위
- #14776
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
build-iterated-agentic-loop
5.5k에이전트가 반복 코딩 작업을 예약된 GitHub Actions 워크플로와 메모리 파일로 실행하도록 돕고, 루프마다 열린 풀 리퀘스트를 하나만 유지합니다.
design-control-loop
5.5k에이전트가 인터뷰로 작은 단계의 자동 개선 루프를 설계하고, 합의된 설계를 예약된 워크플로로 만들도록 돕습니다.
rpi
5.5k에이전트가 변경 사항을 조사하고, 설계를 검토하며, 명확한 단계로 구현하도록 돕습니다. 각 단계마다 검토할 수 있는 문서를 만듭니다.
visual-pr
5.5k에이전트가 변경의 이유와 구현 방식을 설명하는 풀 리퀘스트 설명을 명확한 템플릿과 짧은 시각 개요로 작성하거나 갱신하도록 돕습니다.
비슷한 스킬
writing-skills
311k에이전트를 위한 새 스킬을 작성하고, 각 스킬이 실제로 에이전트의 행동을 바꾸는지 사용하기 전에 테스트하도록 가르칩니다.
writing-for-agents
310k스킬, AGENTS.md, CLAUDE.md 등 AI 에이전트가 읽는 문서를 명확하게 쓰는 방법을 알려 주어 에이전트가 예측 가능하게 행동하도록 돕습니다.
bengali-nlp
280k에이전트가 벵골어 텍스트를 처리하도록 돕습니다. 언어를 이해하고 다루며, 텍스트를 정규화하고 고유한 특징을 처리합니다.