.claude/skills/create-rules/SKILL.md
Create new skills, modify and improve existing skills, create or update AI rules. Use when creating rules, building skills, adding coding standards, updating .claude/rules/ or .claude/skills/, converting Cursor rules to Claude Code, measuring skill performance, running evals, or optimizing skill descriptions.
npx skillsauth add dmitryprg-ai/cursor-develop-autorules create-rulesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build AI instructions that actually trigger and work. Follow the iterative loop: draft -> test -> evaluate -> improve -> repeat.
Claude Code uses .md files with YAML frontmatter:
---
description: "Apply when [specific context]. [What it does] for [outcome]."
paths:
- "src/**/*.ts"
- "apps/web/**/*.tsx"
---
| Trigger Type | Config | When Loaded |
|-------------|--------|-------------|
| Always | No description, no paths | Every conversation |
| Path-scoped | paths: [globs] | When matching file is active |
| Agent-decided | description: "..." | AI decides from description |
skill-name/
├── SKILL.md # Required: frontmatter + instructions
├── scripts/ # Optional: executable scripts
├── references/ # Optional: heavy templates, detailed docs
├── assets/ # Optional: templates, icons
└── evals/
└── evals.json # Test cases with assertions
---
name: my-skill # kebab-case, max 64 chars
description: "Max 1024 chars, no angle brackets (<>). Be pushy — list
contexts, triggers, error patterns, user-observable symptoms."
allowed-tools: Read, Write, Bash, Grep, Glob
model: sonnet
user-invocable: true # appears in /commands
---
Descriptions determine when the skill triggers. Write them "a little bit pushy" to combat under-triggering because skills that don't activate are useless:
BAD: "Deploy the application"
GOOD: "Deploy backend and/or frontend services. Use after npm run build
completes, when restarting services, when user mentions deploy/build/
restart, or when page shows Application error. Trigger on: build
success, 502/503 errors, service health check failures."
Include: task names, error patterns, user phrases, observable symptoms.
Explain WHY — reasoning helps the model understand importance. Reframe rigid demands:
Lean instructions — remove anything that doesn't change behavior. Read transcripts: if the model wastes time on a step, eliminate it.
Progressive disclosure — SKILL.md under 500 lines. Move templates, checklists, and examples to references/ with explicit pointers.
Bundle repeated work — if tests always create the same helper script, move it to scripts/ and reference it.
Theory of mind — write instructions that generalize, not narrow examples. The skill will be used in millions of contexts.
After drafting, create test cases representing real user language:
// evals/evals.json
{
"skill_name": "my-skill",
"evals": [
{
"id": 1,
"prompt": "Realistic user request in natural language",
"expected_output": "Description of successful result",
"assertions": [
"Output includes specific element X",
"File was created at correct path",
"No errors in execution"
]
}
]
}
Test whether the description triggers correctly with 20 realistic queries:
// evals/trigger-eval.json
[
{"query": "specific realistic user request", "should_trigger": true},
{"query": "near-miss that should NOT trigger", "should_trigger": false}
]
Make should-trigger queries varied (formal, casual, with typos). Make should-not-trigger queries tricky near-misses, not obviously irrelevant.
| Use Case | Format | Why | |----------|--------|-----| | Short constraint (<50 lines) | Rule | Always/auto loaded, low token cost | | Multi-step workflow | Skill | Structured, scriptable, loaded on demand | | Needs scripts/templates | Skill | Can include scripts/, references/ | | Specific task type | Skill | Only loaded when relevant |
After creating/updating:
<>development
Scan codebase for technical debt and fix safely with TDD. Use to find oversized files, duplicated code, code smells, and refactor safely. Workflow - SCAN, TEST CASES, REFACTOR, VERIFY. Keywords - techdebt, tech debt, duplicates, code quality audit.
development
Test-Driven Development workflow with strict Red-Green-Refactor cycle. Use when developing features with TDD, writing tests before code, or when test-driven approach is needed. MANDATORY order - test cases table BEFORE code, failing tests BEFORE implementation.
testing
Review work session quality and capture improvements. Use at end of session, after large tasks, after series of errors, or when user asks for session review, retrospective, lessons learned. Records improvements to backlog.
data-ai
Analyze data, investigate datasets, work with CSV/parquet/pandas/dataframes. Use when analyzing data, exploring datasets, running experiments, or when user mentions data, analysis, parquet, csv, pandas, dataframe, statistics, investigation.