Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill claude-rules명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | claude-rules |
| description | > Use when this capability is needed. |
This skill produces correct .claude/rules/ files (and a trim root
CLAUDE.md) for a target project, driven by the user's existing
conventions. It is stack-aware: commands, tooling, and idioms are
translated to the target's actual language and framework, not copy-pasted.
Three modes, same workflow:
Rules are guidance, not enforcement. Permissions, hooks, MCP, and
sandboxing belong in settings.json — route those to the claude-settings
skill.
<project> here".~/.claude/CLAUDE.md into this repo"..claude/rules/ load?", "my rule isn't being picked up" — use the
references directly (see Foundations below).Five phases. Walk the user through them in order; ask clarifying questions between phases rather than guessing.
Source options (often multiple — ask if unclear):
CLAUDE.md / .claude/rules/*.md at a concrete path.~/.claude/CLAUDE.md or ~/.claude/rules/*.md.AGENTS.md / .cursor/rules/*.mdc / .github/copilot-instructions.md
from the same or another repo. Worth reading — don't ignore non-Claude
convention files.Target: the current project. Detect the stack before doing anything
else (Phase 2). Also read the target's existing CLAUDE.md and
.claude/rules/ if they exist — you will merge, not overwrite.
Read the repo root for stack signals. Common markers:
| Marker file | Stack signal |
|---|---|
Cargo.toml + *.rs | Rust |
pyproject.toml / requirements.txt | Python |
go.mod + *.go | Go |
package.json (root type: module) | Node / TypeScript — inspect dependencies |
tsconfig.json | TypeScript |
next.config.* | Next.js |
svelte.config.* | Svelte (check version in package.json) |
vite.config.* | Vite (pair with React or Svelte signal) |
Package.swift / *.xcodeproj | Swift / iOS |
build.gradle / build.gradle.kts | JVM — Java or Kotlin (inspect sources) |
pubspec.yaml | Dart / Flutter |
*.tf / .terraform.lock.hcl | Terraform or OpenTofu (check binary in CI) |
terragrunt.hcl | Terragrunt on top of Terraform / OpenTofu |
Polyglot (common for monorepos): multiple markers coexist at different
paths — e.g., crates/ with Cargo.toml, packages/web/ with
package.json. Note where each stack lives; this drives paths:
scoping in Phase 4.
Load the relevant stack references only. See references/stacks/<name>.md
for each detected stack. Don't load stacks the project doesn't use — it
just adds noise.
Read the source. For each discrete rule or convention, classify it:
Personal vs team: if a rule is clearly personal (e.g., "I prefer
semicolons"), the target file is CLAUDE.local.md (gitignored). If it's
a team norm, target is the shared tree.
The target's rule layout follows load-time semantics (see
references/loading.md for the full mechanics — read it if you're unsure
whether a rule will actually load).
Root CLAUDE.md (target 50–100 lines): critical rules, project
overview, Do-Not-Add list, entry-point pointers. Cross-cutting content
only.
.claude/rules/<topic>.md (no frontmatter, always-loaded): topics the
user might ask about cold. Examples: architecture.md, testing.md,
build-release.md, commands.md, security.md. Also stack-specific
topics for single-stack projects: rust.md, python.md, etc.
.claude/rules/<stack>.md with paths: frontmatter (polyglot only):
in a monorepo, each stack's conventions are path-scoped to its subtree.
See the Polyglot path-scoping section in each stack reference for the
exact glob pattern.
CLAUDE.local.md: personal preferences (semicolons, trailing commas,
dark-theme rationales) and anything the user explicitly marks as "just me".
Never wire .claude/rules/*.md files via @import from root — they
auto-discover. @import is for files outside .claude/rules/.
Produce a concrete diff-style proposal before touching the filesystem:
Will create:
.claude/rules/rust.md (45 lines — build, fmt, clippy, test rules)
.claude/rules/architecture.md (30 lines — ported from <source>)
.claude/rules/testing.md (25 lines — ported + translated for cargo test)
Will modify:
CLAUDE.md (append 'Do NOT Add' section, 6 lines)
Will skip (source rules not applicable to target Rust stack):
- 'Prefer ESM over CJS' — TypeScript-specific
- 'Use pnpm, not npm' — Node-specific
Will leave alone (target already has):
.claude/settings.json (permissions — handled by claude-settings skill)
Ask the user to confirm. On confirmation, write. If target has existing rule files that overlap, merge (additive) or show the conflict for the user to resolve — don't overwrite silently.
After writing, verify with a sanity check. A fresh session + /memory
should list every new rule file. If something is missing, the frontmatter
is wrong or the path is off — use the InstructionsLoaded hook to
diagnose.
When in doubt about classification, ask: would a competent developer on a totally different stack still want this rule?
| Rule | Class | Why |
|---|---|---|
| "Never commit without explicit permission" | Universal | Applies to any project |
| "All PRs need a design doc for changes over 300 lines" | Process | Team workflow, stack-agnostic |
"Run pnpm lint && pnpm test before claiming done" | Stack-specific, translatable | Translate command per target's stack |
"Use z.infer<typeof schema> for API input types" | Stack-specific, TS | Copy only if target uses TypeScript + Zod |
"Prefer Result<T, E> over panics in library code" | Stack-specific, Rust | Skip entirely for non-Rust targets |
| "I like trailing commas" | Personal | CLAUDE.local.md or ~/.claude/CLAUDE.md |
| "Use 2-space indent" | Stack-specific (usually) | Most projects pin this per stack via formatter config — prefer encoding in .editorconfig or formatter config over rules |
When a source rule says "run X before commit", the translation is not just swapping tool names — it's knowing the idiomatic pre-commit pipeline for the target stack. See the per-stack references for exact commands.
Quick pointers (load the reference file before writing anything):
references/stacks/rust.mdreferences/stacks/python.mdreferences/stacks/go.mdreferences/stacks/typescript.mdreferences/stacks/react.mdreferences/stacks/nextjs.mdreferences/stacks/svelte.mdreferences/stacks/swift.mdreferences/stacks/kotlin.mdreferences/stacks/java.mdreferences/stacks/terraform.mdIf the target uses a stack not listed, tell the user so directly — don't make up commands.
If the target already has CLAUDE.md or .claude/rules/*.md:
references/splitting-guide.md — often the right
order is (a) split existing content first, (b) then port new rules
into the now-structured tree.These references hold mechanical details you'll need mid-workflow. Load them when the specific question arises — don't load all of them preemptively.
references/loading.md — every load-time mechanism: tree-walk,
.claude/rules/ auto-discovery, paths: frontmatter, @import,
subdirectory CLAUDE.md, CLAUDE.local.md, managed policy, symlinks,
claudeMdExcludes, /memory, InstructionsLoaded hook, auto memory.
Read when wiring anything non-trivial or debugging a rule that "should"
load.references/splitting-guide.md — when the target already has a bloated
CLAUDE.md; recipe for pruning and splitting before porting new rules in.references/templates.md — starter templates for root CLAUDE.md,
unscoped rules, path-scoped rules, CLAUDE.local.md. Use as skeletons
when Phase 4 lands content.When references/loading.md is silent or stale, the authoritative source
is Anthropic's own documentation. Re-fetch these before trusting any claim
in the bundled references that's more than a few months old.
.claude/rules/ sectionInstructionsLoaded hook for debugging what loadedclaudeMdExcludes and related config fieldsThe bundled references quote the relevant passages verbatim so the skill still works offline, but the upstream URLs are the tiebreaker when the docs evolve.
pnpm lint and the target is Rust, the rule needs to become
cargo clippy --all-targets -- -D warnings. Verbatim carry is the
most common failure mode.globs, alwaysApply). Claude
Code only recognises paths:. Other fields are silently ignored —
a rule that looks scoped may load unconditionally, or vice versa..claude/rules/ files via @import from root. They
auto-discover; the @import is pure maintenance debt.src/api/** won't load when the user asks "how do we handle
errors in this project?" without opening an API file first. Default to
unscoped for topics asked cold; scope only polyglot per-stack splits
and truly subtree-local rules.Terse, concrete, one idea per bullet. Explain why when the rule isn't
obvious — "validate request IP because L6 of the threat model forbids
attacker-controlled inputs" beats "validate request IP". Include a
one-line Applies to: signpost at the top of each rule file so humans
browsing the repo know the scope at a glance.
The smoke test for every written file: a contributor unfamiliar with the project should be able to read it in under two minutes and know what to do differently tomorrow. If they can't, tighten.
Source: descoped/llm-skills — distributed by TomeVault.