원클릭으로
rule-create
Creates new .claude/rules/ files following best practices, or audits existing rules for quality and effectiveness.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Creates new .claude/rules/ files following best practices, or audits existing rules for quality and effectiveness.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create a new empirical research project: generates projects/<name>/ with latex, code, scripts, results, literature, and guidance subfolders plus README.md and project-level CLAUDE.md.
Publication-ready figure conventions for empirical finance and economics. Covers matplotlib styling, color palettes, export settings, and common figure types (time series, decile bars, coefficient plots, event studies). Auto-apply when creating any figure, plot, or visualization.
Agent-driven cold-start onboarding. Use the repo shell entrypoint to find or install Python 3.11+, then run the shared bootstrap audit/plan/apply flow and configure WRDS only if the user has it.
Create and compile Beamer presentations following the Rhetoric of Decks philosophy. Use when making seminar or conference slides.
Compile LaTeX to PDF using pdflatex + bibtex cycle
Creates new Claude Code skills, auto-apply skills, or auto-trigger rules, or audits existing ones for quality and effectiveness.
| name | rule-create |
| description | Creates new .claude/rules/ files following best practices, or audits existing rules for quality and effectiveness. |
| argument-hint | [new | audit [<path> | all]] |
Two modes: Create a new rule or Audit an existing one.
/rule-create -- create a new rule (interactive)/rule-create database patterns for PostgreSQL -- create with topic description/rule-create audit .claude/rules/validation.md -- audit a specific rule/rule-create audit all -- audit all rules with summary tableParse $ARGUMENTS:
new, or a topic description → Create modeaudit, audit <path>, or audit all → Audit modeFour phases: Gather → Draft → Write → Verify.
List all files in .claude/rules/ to understand what rules already exist. This prevents creating duplicates and helps identify the right scope.
If $ARGUMENTS contains a topic description (anything beyond new), use it as the domain. Otherwise, use AskUserQuestion with all of the following:
**/*.py, src/api/**/*.ts) or say "always load" if it applies everywhere.Compare the user's answers against existing rules. If there's significant overlap with an existing rule, warn the user and ask whether to:
Based on the domain, select the best body pattern from the reference:
| Domain Type | Template Pattern | Best For |
|---|---|---|
| Code conventions | Quick Reference + Sections | Naming, formatting, architecture patterns |
| Security / correctness | Do / Don't / Why / Refs | Vulnerability prevention, data integrity |
| Writing / style | Banned/Required + Examples | Prose style, documentation standards |
| Data / schema | Schema + Query + Gotchas | Database conventions, data pipelines |
Build the rule file with these requirements:
Frontmatter:
---
description: [Specific, keyword-rich — Claude uses this to assess relevance]
paths: # Omit entirely if the rule should always load
- "[glob patterns from user input]"
---
Description quality check:
Scope-gating decision (paths: field):
| Rule type | Scope | Rationale |
|---|---|---|
| File conventions (naming, docstrings, formatting) | paths: ["**/*.py"] | Only relevant when editing those files |
| Workflow behavior (always save results, always use turnover=True) | Unscoped (omit paths:) | Must be active even during ad-hoc script execution |
| API gotchas (parameter validation, common mistakes) | Unscoped | Needed whenever writing API calls, not just editing source |
Key lesson: Path-scoped rules are invisible when the LLM isn't editing files matching those globs. If a rule governs behavior (not just file conventions), it must be unscoped.
Body:
Filename:
database-patterns.md, api-security.md, testing-conventions.mdShow the complete rule to the user before writing. Ask if they want changes.
Write the file to .claude/rules/{name}.md using the Write tool.
Print confirmation:
Rule created: .claude/rules/{name}.md
Lines: {count}
Path scope: {paths or "always loaded"}
Run the full audit checklist (from Audit Mode below) against the newly created rule. Report results inline. If any checks fail, offer to fix them immediately.
Three phases: Read → Analyze → Report.
audit <path> → read that specific file (e.g., audit .claude/rules/security.md)audit all → list and read all .md files in .claude/rules/audit (no target) → list all rules as a numbered list, ask which to audit (or offer all)CLAUDE.md (for duplication checks)Run 10 checks against the rule file. For each, determine PASS, WARN, or FAIL.
Does the rule cover one coherent topic?
Count total lines (including frontmatter and blank lines).
description that is specific and keyword-rich; paths scope matches rule type (file conventions → scoped; workflow/behavior rules → unscoped)description but it's vague (e.g., "Development standards"), or workflow rule is path-scoped (may be invisible during ad-hoc execution)description, or missing paths for a clearly file-specific rule, or behavior rule scoped to paths it won't match during normal workflowDoes the rule contain concrete, implementable guidance?
Does the rule repeat content from CLAUDE.md or other rule files?
Does the rule contain step-by-step workflows that belong in a skill?
Does the rule duplicate what linters, formatters, or CI already enforce?
Are the most important rules near the top?
Do examples clearly show the right patterns?
Is anything obviously missing for this domain?
Print the structured report:
RULE AUDIT REPORT
=================
File: {path}
Lines: {count}
Domain: {detected domain}
Path scope: {paths from frontmatter, or "always loaded"}
CHECKLIST:
[PASS] Focus: {brief explanation}
[WARN] Length: {line count} lines — {explanation}
[PASS] Frontmatter: {brief explanation}
[FAIL] Actionability: {brief explanation with specific section references}
[PASS] Duplication: {brief explanation}
[PASS] No procedures: {brief explanation}
[PASS] No tool overlap: {brief explanation}
[WARN] Front-loading: {brief explanation}
[PASS] Examples: {brief explanation}
[PASS] Completeness: {brief explanation}
SUGGESTIONS:
1. {Specific, actionable suggestion with section reference}
2. {Another suggestion}
3. ...
OVERALL: {N}/10 passed, {W} warnings, {F} failures
After printing the report, offer to fix any FAIL or WARN items if the user wants.
For all mode, after all individual reports, print a summary table:
SUMMARY: {N} rules audited
==============================
| Rule | Pass | Warn | Fail |
|------------------------|------|------|------|
| academic-writing | 9 | 1 | 0 |
| latex-citations | 10 | 0 | 0 |
| latex-compile | 9 | 0 | 1 |
| latex-conventions | 10 | 0 | 0 |
| presentation-rules | 9 | 1 | 0 |
Reading best practices reference...