generate-rule

Generate a scaffolded rule skeleton with schema, directory layout, and registry integration.

11|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/reporails/rules --skill generate-rule
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: generate-rule
Source: https://github.com/reporails/rules/tree/main/.claude/skills/generate-rule
Command: npx skills add https://github.com/reporails/rules --skill generate-rule

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate a reproducible, well-structured rule skeleton with coordinate-based IDs, directory layout, and placeholder files to streamline rule authoring and registry integration.

Core Features & Use Cases

  • Create a directory tree based on the rule coordinate (CORE:, CLAUDE:, etc.)
  • Generate rule.md frontmatter including id, slug, title, category, type, level, checks, backed_by
  • Produce rule.yml with deterministic or semantic patterns when available
  • Initialize tests/pass and tests/fail scaffolds for validation
  • Update registry/coordinate-map.yml to include the new rule and validate against tombstones
  • Validate coordinate availability and category resolution to prevent conflicts

Quick Start

Run /generate-rule CORE:S:0005 core "My New Rule" to generate a complete rule skeleton.

Frequently Asked Questions about generate-rule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate a rule skeleton with proper schema and directory layout?▼

Auto-generate a rule skeleton by running /generate-rule with a coordinate, category, and title to scaffold rule.md frontmatter, rule.yml, and test directories. This creates a fully structured rule with proper schema and registry integration for consistent rule authoring.

What is rule coordinate validation and how does it prevent conflicts in a ruleset?▼

Rule coordinate validation checks coordinate availability and category resolution before scaffolding to prevent numbering conflicts. It validates new rules against tombstones and updates registry/coordinate-map.yml to ensure upgrade-safe migrations across standardized rulesets.

How do I scaffold pass and fail test cases when authoring a new rule?▼

Scaffold pass and fail test cases automatically during rule skeleton generation. The process initializes tests/pass and tests/fail directories with placeholder files, providing immediate validation scaffolds for deterministic or semantic rule patterns.

Does rule generation require external dependencies or runtime packages?▼

Rule generation requires no runtime dependencies beyond the repository schema and local tooling. The scaffolding process operates entirely within the existing project environment, needing only the coordinate-map registry and local files to function.

What's the best way to maintain consistent rule frontmatter across a large engineering team?▼

Maintain consistent rule frontmatter by auto-generating rule.md files with standardized id, slug, title, category, type, level, checks, and backed_by fields. This skeleton generation enforces schema compliance and uniform metadata across all team-authored rules.

When should I not use automated rule skeleton generation for my ruleset?▼

Avoid automated rule skeleton generation if your project lacks a coordinate-based registry structure or does not use coordinate prefixes like CORE: or CLAUDE:. The scaffolder depends on an existing registry/coordinate-map.yml to validate and integrate new rules properly.