>_AGENT_RULES

Publishing Rules

Share your agentic workflow with the community.

Rules are bundles of configuration files copied into your project.

Why Publish?

  • Showcase your setup — All your rules on your personal profile page
  • Reach developers — Put your work in front of developers browsing for rules
  • Get featured — Popular rules appear in trending and get more visibility
  • Drop your links — Users see your custom message on install (tips, links, whatever you want)

How to Publish

Already have a repo with your rule files? Three commands:

1. Initialize

npx @agentrules/cli init

Run this in the directory you want to publish (the same directory that will contain agentrules.json).

2. Login

npx @agentrules/cli login

Opens a browser for authentication.

3. Publish

npx @agentrules/cli publish

Your rule is now live.

Quick Publish

Don't have an agentrules.json? Publish directly — the CLI prompts for what it needs:

# Publish a file or directory (interactive)
npx @agentrules/cli publish .claude/commands/deploy.md
npx @agentrules/cli publish ./my-rule

# Non-interactive (requires all options)
npx @agentrules/cli publish .claude/commands/deploy.md --platform claude --type command --name deploy

After publishing, you'll be prompted to create an agentrules.json for future publishes.

Use --dry-run to preview before publishing.

What Gets Published

Everything in your rule directory becomes your rule (except config + metadata):

my-rule/
├── agentrules.json    <- Config (not included)
├── README.md          <- Metadata (not bundled)
├── LICENSE.md         <- Metadata (not bundled; LICENSE.txt also supported)
├── INSTALL.txt        <- Metadata (not bundled)
├── AGENTS.md          <- Included (optional)
└── command/
    └── review.md      <- Included

Updating

Made changes? Just publish again:

npx @agentrules/cli publish

The version auto-increments. Users installing your rule get your latest changes.

Learn More

See Rule Configuration for config fields, metadata files, versioning, and more.

On this page