Awesome-omni-skill create-new-rule
Create a new agent rule or steering file from chat context. Detects the current IDE (Cursor or Kiro) and creates the file in the correct format and location.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/create-new-rule" ~/.claude/skills/diegosouzapw-awesome-omni-skill-create-new-rule && rm -rf "$T"
manifest:
skills/development/create-new-rule/SKILL.mdsource content
Create a New Rule / Steering File
Create a new agent rule or steering file based on the current chat context. The rule should be clear, concise, and placed in the correct location for the current IDE environment.
Environment Detection
Before creating any file, detect which IDE you're running in:
- Kiro workspace (
directory exists): Create a.kiro/
file with Kiro frontmatter.kiro/steering/*.md - Cursor workspace (
directory exists): Create a.cursor/
file with Cursor frontmatter.cursor/rules/*.mdc - Both exist (home directory or multi-IDE workspace): Ask the user which IDE to target, or create for both using the sync script (
)bash ~/scripts/ide-sync.sh sync --from <source> --to all
If running from the home directory (
~), default to the current IDE's format and offer to sync.
Process
-
Analyze the chat context:
- Review the conversation to identify the specific preference, pattern, or instruction the user wants to establish
- Extract the core requirement into a single, clear statement
- Determine scope: always active, file-type-specific, or manually invoked
-
Create the file in the correct format for the detected IDE
-
Before finalizing, ask the user to review:
- Present the proposed rule content (including frontmatter and the rule body)
- Ask: "Please review and let me know if you'd like any changes before I create the file"
- Wait for user approval or requested modifications
-
After user approval:
- Create the file in the correct location
- Offer to sync to other IDEs if the sync script is available
Format Reference
Kiro Steering (.kiro/steering/<name>.md
)
.kiro/steering/<name>.mdAlways-active rule:
--- inclusion: auto --- Your clear, concise rule here.
File-match rule:
--- inclusion: fileMatch fileMatchPattern: "*.ts" --- Your clear, concise rule here.
Manually invoked rule:
--- inclusion: manual --- Your clear, concise rule here.
Cursor Rules (.cursor/rules/<name>.mdc
)
.cursor/rules/<name>.mdcAlways-active rule:
--- alwaysApply: true --- Your clear, concise rule here.
File-glob rule:
--- globs: "*.ts" alwaysApply: true --- Your clear, concise rule here.
Agent-requested rule:
--- description: "Brief description of when to use this rule" alwaysApply: false --- Your clear, concise rule here.
Scope Mapping
| Intent | Kiro | Cursor |
|---|---|---|
| Always active | | |
| File-type specific | + | + |
| On-demand / manual | | + |
Guidelines
- Rules should be concise and actionable
- Use kebab-case for filenames based on the rule's purpose
- Default to always-active unless the user specifies otherwise
- For home-directory rules, these apply globally across all projects
- After creating, offer to sync across IDEs if
exists~/scripts/ide-sync.sh