Back to skills
SKILL.md
Generate Rule
ASecurityGenerate a rule skeleton with proper schema and directory structure
- 11 stars
- 0 votes
- 0 copies
- 2 views
- Added February 10, 2026
Works with
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add reporails/rules --skill generate-rule --agent claude-codeAre you the author of Generate Rule?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/reporails-generate-rule)---
name: generate-rule
description: Generate a rule skeleton with proper schema and directory structure
---
# /generate-rule
Generate a rule skeleton with coordinate-based ID, directory structure, and placeholder files.
## Usage
```
/generate-rule <coordinate> <scope> <title> [--agent <name>]
```
- `<coordinate>`: Rule coordinate (e.g., CORE:S:0005, CLAUDE:S:0003)
- `<scope>`: `core` or agent name (e.g., `claude`)
- `<title>`: Short title for the rule
- `--agent <name>`: Agent for path resolution (default: `claude`)
## Examples
```
/generate-rule CORE:S:0005 core "My New Rule"
/generate-rule CLAUDE:S:0003 claude "Some Agent Rule"
```
## Workflow
1. Validate coordinate is not in `registry/tombstones.yml`
2. Validate coordinate slot is not already taken in `registry/coordinate-map.yml`
3. Determine category from coordinate letter (S/C/E/M/G)
4. Resolve directory path from `backbone.rules.patterns` and `backbone.rules.categories`
5. Create directory: `{category_path}/{slug}/`
6. Generate `rule.md` with frontmatter (id, slug, title, category, type, level, targets, checks)
7. Generate `rule.yml` with OpenGrep patterns (if deterministic/semantic)
8. Create `tests/pass/` and `tests/fail/` directories with `.gitkeep`
9. Update `registry/coordinate-map.yml` with new slug→coordinate entry
## Reference
- Schema: `schemas/rule.schema.yml` — field definitions and validation rules
- Registry: `registry/coordinate-map.yml` — existing coordinates
- Registry: `registry/tombstones.yml` — dead slots
## Quick Reference
| Decision | Result |
|----------|--------|
| Structural/file checks only | type: mechanical |
| OpenGrep pattern matching | type: deterministic |
| LLM evaluation needed | type: semantic (prompt field on terminal check) |
| Has backing sources | Add to backed_by with source IDs from docs/sources.yml |
| No backing sources | Omit backed_by (optional field) |Files in this skill
- SKILL.md
- rule-authoring.md
- workflow.md
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.