사용자 지정 명령과 Skills
프로젝트 범위와 사용자 범위, 명령 및 새롭게 추가된 Skills를 비교합니다
사용자 지정 명령과 Skills은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Why Commands and Skills Exist
Once a Claude Code workflow stabilizes, you stop typing the same multi-step prompt over and over. You capture it once and invoke it by name. That is what custom commands and skills are for: reusable, named units of behavior that live in your project or your home directory.
Two axes define everything in this lesson. First, the mechanism: .claude/commands/ is the legacy approach, .claude/skills/ is the current one. Second, the scope: project (shared via VCS) versus user (personal, in ~/.claude/). Get both axes right and your team gets consistent, portable workflows.
Custom Commands: The Legacy Mechanism
A custom command is a markdown file in .claude/commands/. The filename becomes the command name, and the body is the prompt that runs when you invoke it. It is essentially a saved prompt template you trigger by name instead of retyping.
Commands are simple and still work, but they are the legacy approach. They carry no structured metadata for isolating output or restricting tools. For new work, prefer skills, which add exactly those controls.
# .claude/commands/review-pr.md
Review the current diff for correctness bugs only.
Flag a comment ONLY when it contradicts the code it describes.
Report findings as a markdown list grouped by file.Skills: The Current Mechanism
A skill lives in .claude/skills/ and is the current, richer replacement for commands. Beyond the prompt body, a skill supports frontmatter that controls how it executes. Three fields matter for the exam:
context: fork— run the skill in an isolated context so its verbose output does not pollute the main conversation.allowed-tools— restrict which tools the skill may call (least privilege).argument-hint— document the arguments the skill expects.
These controls are exactly what a legacy command lacks.
Anatomy of a Skill File
Here is a skill that runs a code review. The frontmatter is delimited by ---; the body below it is the instruction Claude follows when the skill is invoked.
Notice context: fork isolates the review's discovery output, allowed-tools caps it to read and search tools (no Write, no Bash), and argument-hint tells the user what to pass.
---
argument-hint: <base-branch>
context: fork
allowed-tools: [Read, Grep, Glob]
---
# Code Review
Review the diff against the given base branch.
Do a per-file local pass, THEN a separate cross-file
integration pass. Flag a comment only when it
contradicts the code. Output a list grouped by file.context: fork — Isolating Verbose Output
Skills often produce a lot of intermediate noise: file dumps, search hits, exploration steps. If that all lands in your main conversation, it crowds the context window and triggers lost-in-the-middle, where the model attends less to content buried between the start and end.
context: fork runs the skill in an isolated context, like an explore subagent during discovery. The verbose work happens elsewhere and only the distilled result returns. This keeps the main session lean and your attention focused on what matters.
allowed-tools — Least Privilege
The allowed-tools field restricts a skill to only the tools it genuinely needs. A review skill should read and search but never write or run shell commands; scoping it that way removes a whole class of accidental mutations.
This mirrors least-privilege agent design elsewhere in the certification: scope tools to the role, and remember that 4-5 tools is the sweet spot while 18+ degrades selection reliability. A focused, well-scoped skill is both safer and more reliable.
---
argument-hint: <file-glob>
allowed-tools: [Read, Grep]
---
# Audit Logging
Scan matching files for missing audit-log calls on
state-changing operations. Report only; make no edits.The Scope Axis: Project vs User
Independent of commands-versus-skills, every command or skill has a scope determined by where the file lives:
- Project scope:
.claude/commands/or.claude/skills/inside the repo. Committed to VCS, so the whole team gets it automatically. - User scope: the same folders under
~/.claude/. Personal to your machine, NOT shared via VCS.
This is the exact same project-versus-user distinction as the CLAUDE.md hierarchy and .mcp.json versus ~/.claude.json. The rule is consistent across Claude Code config.
When to Use Project Scope
Use project scope whenever a workflow should be standard for everyone touching the repo. A shared /review-pr skill means every engineer reviews diffs the same way; a shared /migrate skill encodes your migration rules once.
Because it is committed to VCS, a new teammate cloning the repo gets these immediately, with zero setup. If you ever think "the team should all do this the same way," the answer is project scope.
# Project layout, committed to git
.claude/
skills/
review-pr.md # shared review workflow
migrate.md # shared migration steps
release-notes.md # shared changelog formatWhen to Use User Scope
Use user scope (~/.claude/) for personal conveniences that are not part of the team's contract: your own scratch helpers, a personal note-taking command, shortcuts tied to your local setup.
The trade-off is the same as user-level CLAUDE.md: it follows you across all projects but is NOT shared via VCS, so teammates never see it. If a workflow needs to be reproducible for the whole team, user scope is the wrong choice precisely because it is invisible to everyone else.
Combining the Two Axes
Mechanism and scope are independent, so you have a full grid to design against:
- Project skill — shared, current, with fork/allowed-tools controls. The default for team workflows.
- User skill — personal, current, still gets the rich frontmatter.
- Project command — shared but legacy; fine if it already exists, but migrate when you need isolation or tool restriction.
- User command — personal and legacy.
For anything new and team-facing, the strong default is a project-scoped skill.
Migrating a Command to a Skill
Migration is usually mechanical: move the file from .claude/commands/ to .claude/skills/, then add frontmatter to gain the controls you were missing. A pure prompt becomes a governed workflow.
The payoff is concrete: context: fork stops verbose review output from polluting your session, and allowed-tools guarantees the skill cannot write or run shell commands. Same intent, but now isolated and scoped.
# Before: .claude/commands/review-pr.md (legacy, no controls)
Review the current diff for correctness bugs.
# After: .claude/skills/review-pr.md (current)
---
argument-hint: <base-branch>
context: fork
allowed-tools: [Read, Grep, Glob]
---
Review the diff against the given base branch.
Flag a comment only when it contradicts the code.Quick Check: Choosing the Right Approach
Your team keeps running an ad-hoc multi-step PR-review prompt by hand. You want it standardized for everyone on the repo, runnable by name, and you want its noisy file-dump and search output kept OUT of the main conversation while ensuring it can never edit files. What should you build?
Recap
Key takeaways:
- Two mechanisms:
.claude/commands/is legacy,.claude/skills/is current. Prefer skills for new work. - Skills add frontmatter commands lack:
context: fork(isolate verbose output),allowed-tools(restrict tools, least privilege),argument-hint(document args). - Two scopes: project (
.claude/, shared via VCS) vs user (~/.claude/, personal, NOT shared) — the same axis as CLAUDE.md and MCP config. - Team workflow that must be reproducible → project-scoped skill. Personal convenience → user scope.
- Migrate a command to a skill by moving the file and adding frontmatter; never substitute a prose CLAUDE.md note for a deterministic
allowed-toolsrestriction.
자주 묻는 질문
“사용자 지정 명령과 Skills” 강의는 무료인가요?
네 — “사용자 지정 명령과 Skills” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.
“사용자 지정 명령과 Skills”에서 뭘 배우나요?
프로젝트 범위와 사용자 범위, 명령 및 새롭게 추가된 Skills를 비교합니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Claude Architect을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.
“사용자 지정 명령과 Skills” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 사용자 지정 명령과 Skills
- Skill Frontmatter
- 계획 모드와 직접 실행
- 예시를 활용한 반복적 개선