# New Rule

> Scaffold a new workflow rule under rules/<kebab-name>/. Creates RULE.md (frontmatter + body template) and snippet.md (drop-in for downstream CLAUDE.md), plus updates INVENTORY.md and INVENTORY.zh.md in the same edit batch.

- **Type:** Skill
- **Install:** `agentstack add skill-jajupmochi-agent-harness-new-rule`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jajupmochi](https://agentstack.voostack.com/s/jajupmochi)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jajupmochi](https://github.com/jajupmochi)
- **Source:** https://github.com/jajupmochi/agent-harness/tree/main/.claude/skills/new-rule

## Install

```sh
agentstack add skill-jajupmochi-agent-harness-new-rule
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /new-rule

Scaffold a new workflow rule. Use when you (or Claude) discover a behavior worth standardizing across projects.

## Usage

```
/new-rule 
```

E.g.: `/new-rule no-emoji-in-prose`

## Pre-flight

- Verify `rules//` does not already exist (don't clobber)
- Confirm the rule isn't redundant with an existing one (check `INVENTORY.md` table)

## Steps

1. **Create directory**:

   ```bash
   mkdir -p rules/
   ```

2. **Ask the user** for:
   - One-line description (becomes `description:` frontmatter)
   - Scope: `universal | personal | ui-project | research-pkg | static-site | optional`
   - Rationale: 1-2 sentences on what bug this rule prevents / time it saves
   - Trigger condition: when does this rule kick in?

3. **Write `rules//RULE.md`**:

   ```markdown
   ---
   name: 
   description: 
   scope: 
   rationale: 
   ---

   # 

   > 

   ## Master TOC

   - [Rule](#rule)
   - [Why](#why)
   - [How to apply](#how-to-apply)
   - [Examples](#examples)
   - [Exceptions](#exceptions)

   ## Rule

   

   ## Why

   

   ## How to apply

   

   ## Examples

   ✅ Good:
   

   ❌ Bad:
   

   ## Exceptions

   
   ```

4. **Write `rules//snippet.md`** — the drop-in version:

   ```markdown
   ## 

   
   ```

5. **Update `rules/README.md`** — add a row to the rule index table.

6. **Update `INVENTORY.md` AND `INVENTORY.zh.md`** — add a row to the Rules section table.

7. **Show the user** the diff and ask for confirmation before committing.

## Companion

- `docs/CONTRIBUTING.md` §"Adding a rule" — formal spec
- `rules/README.md` — index of all rules + scope tag definitions

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jajupmochi](https://github.com/jajupmochi)
- **Source:** [jajupmochi/agent-harness](https://github.com/jajupmochi/agent-harness)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jajupmochi-agent-harness-new-rule
- Seller: https://agentstack.voostack.com/s/jajupmochi
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
