Skip to content
Back to skills

Create New Rule

ASecurity

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.

  • 57 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
documentationbash

Works with

  • cursor

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill create-new-rule --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create New Rule?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create New Rule
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-create-new-rule/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-create-new-rule)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-new-rule
description: 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.
---

# 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** (`.kiro/` directory exists): Create a `.kiro/steering/*.md` file with Kiro frontmatter
- **Cursor workspace** (`.cursor/` directory exists): Create a `.cursor/rules/*.mdc` file with Cursor frontmatter
- **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

1. **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

2. **Create the file in the correct format for the detected IDE**

3. **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

4. **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`)

Always-active rule:
```markdown
---
inclusion: auto
---

Your clear, concise rule here.
```

File-match rule:
```markdown
---
inclusion: fileMatch
fileMatchPattern: "*.ts"
---

Your clear, concise rule here.
```

Manually invoked rule:
```markdown
---
inclusion: manual
---

Your clear, concise rule here.
```

### Cursor Rules (`.cursor/rules/<name>.mdc`)

Always-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 | `inclusion: auto` | `alwaysApply: true` |
| File-type specific | `inclusion: fileMatch` + `fileMatchPattern` | `globs` + `alwaysApply: true` |
| On-demand / manual | `inclusion: manual` | `alwaysApply: false` + `description` |

## 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 `~/scripts/ide-sync.sh` exists

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.