rule-creator
Interactive rule builder: guides the user through defining a new rule as a constraint doc, then generates the rule .md and installs it.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Interactive rule builder: guides the user through defining a new rule as a constraint doc, then generates the rule .md and installs it.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Interactive agent builder: guides the user through defining a new agent as a behavioral spec, then generates the agent .md and installs it.
Cross-repo investigation: research planning issues, break down into sub-issues, generate ralph session prompts per repo.
Three-phase QA orchestrator: parallel scan, interactive triage, guided fix.
Interactive feature builder with subagent delegation and approval gates.
Interactive skill builder: guides the user through defining a new skill as a structured SOP, then generates the SKILL.md and installs it.
Review code changes for architectural issues — module boundaries, coupling, and dependency direction.
| name | rule-creator |
| description | Interactive rule builder: guides the user through defining a new rule as a constraint doc, then generates the rule .md and installs it. |
Build a new toolkit rule interactively. Rules are always-on constraints that shape Claude's behavior — coding conventions, patterns to follow, anti-patterns to avoid, and domain-specific guidelines.
<rule-name> — name for the new rule (e.g., /rule-creator unreal-cpp-conventions)domain:<tech> — create rules for a tech stack (e.g., /rule-creator domain:unreal)Generate a production-ready rule .md file that Claude loads as always-on context, install it into the project's .claude/rules/ directory.
Read — read existing rules for pattern referenceWrite — create the rule .md fileGlob — find existing rules to study structure and avoid duplicationRules are constraint documents — they tell Claude what to do and what NOT to do, always. They're loaded into context at conversation start and apply to every response.
Rule structure:
# <Title>
<Brief purpose — one sentence>
## <Section>
- Directive 1
- Directive 2
## <Section>
| Pattern | Do This | Not This |
|---------|---------|----------|
Key characteristics:
Rule categories:
| Category | Location | Example |
|---|---|---|
| Common | .claude/rules/common/ | coding-style.md, testing.md, security.md |
| Language | .claude/rules/<lang>/ | golang/error-handling.md, typescript/types.md |
| Conditional | .claude/rules/conditional/ | read-only.md (only when flag set) |
Existing common rules (avoid duplicating these):
coding-style.md — naming, functions, files, readability, DRYtesting.md — TDD, test pyramid, test qualitysecurity.md — input validation, data access, secrets, OWASPperformance.md — DB queries, API, caching, frontendgit-workflow.md — commits, branches, PRssearch-strategy.md — LEANN, Grep, Glob priorityagents.md — when/how to use agentshooks.md — hook system behaviorpatterns.md — ECC patternsdevelopment-workflow.md — workflow phasescontext-efficiency.md — context window managementParse $ARGUMENTS. If empty, ask:
"What rule do you want to create? Describe the conventions or constraints in 1-2 sentences."
Scan existing rules to avoid duplication:
Glob: .claude/rules/**/*.md
Read any rules that overlap with the user's intent. If overlap exists, suggest updating the existing rule instead.
Ask the user:
Rule Definition Questionnaire:
- What should Claude always do? (3-10 directives)
- What should Claude never do? (anti-patterns)
- Is this for a specific tech stack? (determines location: common/ vs /)
- Can you give do/don't examples? (concrete patterns)
- Is this conditional? (only applies in certain modes/contexts)
If domain-specific (domain:<tech>), research the tech stack:
APPROVAL GATE: Present the interpreted rule scope. Wait for confirmation.
Read 2-3 existing rules for tone and density reference:
Read: .claude/rules/common/coding-style.md
Read: .claude/rules/common/security.md
Determine rule category and location:
.claude/rules/common/<name>.md.claude/rules/<tech>/<name>.md.claude/rules/conditional/<name>.mdStructure the rule sections:
Estimate rule size:
Present the outline to the user.
APPROVAL GATE: Wait for user to approve the structure.
Generate the rule .md following this pattern:
# <Title>
<One-sentence purpose>
## <Topic Section>
- Directive using imperative voice ("Use X", "Avoid Y", "Always Z")
- Directive with rationale where non-obvious
## <Patterns Section>
| Pattern | Do This | Not This |
|---------|---------|----------|
| <case> | `good example` | `bad example` |
## <Anti-Patterns Section>
- Never <anti-pattern> — <why>
- Avoid <anti-pattern> — <consequence>
## <Framework-Specific Section> (if domain rule)
### <Subsystem>
- Convention 1
- Convention 2
Writing principles:
Present the generated rule to the user.
APPROVAL GATE: User reviews the full rule. Accept edits before writing.
Determine install path:
.claude/rules/common/<name>.md.claude/rules/<tech>/<name>.md.claude/rules/conditional/<name>.mdCreate the directory if needed and write the file.
If this is a new language/tech directory, ask:
"Want to add this to the toolkit templates so future projects get these rules automatically?"
If yes, also write to templates/rules/<tech>/<name>.md (if in toolkit repo).
Verify:
Glob: .claude/rules/**/<name>.md
Report:
"Rule installed:
.claude/rules/<category>/<name>.md- Type: <common/language/conditional>
- Directives:
This rule is now active in every Claude session in this project."
| Situation | Action |
|---|---|
| Rule name already exists | Warn, offer to update or rename |
| Overlaps with existing rule | Show overlap, suggest merging |
| Rule too long (>150 lines) | Suggest splitting by topic |
| Rule too short (<10 lines) | Suggest merging with related rule |
| User gives vague conventions | Ask for concrete do/don't examples |
| Tech stack not in installer | Offer to add detection + rule templates |