publish

publish is a command for coding agents from rolecraft-sh/rolecraft. It costs 0 tokens per session (1,483 once invoked), scanned A, original, MIT.

A command for submitting a skill’s SKILL.md file to the rolecraft Registry, a shared catalogue of skills similar to npm for JavaScript packages or PyPI for Python packages.

In plain words
What is it for?
Use it to publish a local skill through the command line, optionally choosing its repository, slug, or name. It can also perform a dry run before submitting a pull request.
Why use it?
It removes the manual work of preparing a registry entry and opening a contribution for review.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rolecraft-sh/rolecraft/publish
Clone the repo
git clone --depth 1 https://github.com/rolecraft-sh/rolecraft

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for publish

README.md
[![agentmods](https://agentmods.dev/badge/commands/rolecraft-sh/rolecraft/publish.svg)](https://agentmods.dev/commands/rolecraft-sh/rolecraft/publish)
Your own site
<a href="https://agentmods.dev/commands/rolecraft-sh/rolecraft/publish"><img src="https://agentmods.dev/badge/commands/rolecraft-sh/rolecraft/publish.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,483 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01483
Opus 5 $0.00000 $0.00741
Sonnet 5 $0.00000 $0.00297
Haiku 4.5 $0.00000 $0.00148

Measured 5d ago against content hash 529309f28ac9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/publish.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rolecraft publish

Publish a skill to the rolecraft Registry.

Usage

rolecraft publish <source> [--repo <owner/repo>] [--dry-run] [--yes]
                     [--slug <slug>] [--name <name>]

Description

Publishes a SKILL.md to the centralised rolecraft Registry. The registry acts as a community-driven index of skills, similar to npm for Node.js packages or PyPI for Python.

Option A: CLI publish (recommended)

When you publish via CLI:

  1. Reads the SKILL.md metadata from your local skill directory.
  2. Detects the GitHub repository from your local git remote (or --repo flag).
  3. Forks the rolecraft-sh/registry repository (one-time setup, automatic).
  4. Updates index.json with a new entry.
  5. Opens a pull request via GitHub API.
  6. A maintainer is notified to merge once CI validation passes.

Option B: Manual PR (without CLI)

Don't use rolecraft CLI? You can add your skill by editing index.json directly on GitHub:

  1. Go to https://github.com/rolecraft-sh/registry
  2. Click Fork
  3. Edit index.json — add your skill entry to the skills array
  4. Commit to a new branch
  5. Open a Pull Request

Entry format:

{
  "slug": "my-skill",
  "name": "My Skill",
  "description": "What this skill does",
  "repo": "your-username/your-skill-repo",
  "author": "your-username",
  "versions": ["v1.0.0"],
  "latest": "v1.0.0"
}

Constraints

Rule Details
Slug format kebab-case: ^[a-z0-9]+(-[a-z0-9]+)*$, e.g. react-rules
Unique slug Every slug must be unique across all skills
Author match The author field must be your GitHub username (checked by CI)
Repo must exist The repo must be a valid GitHub repo that contains a SKILL.md
Schema validation Entry must match schema.json in the registry repo

Validation checks (auto)

Each PR triggers:

  1. JSON syntax check
  2. Schema validation against schema.json
  3. Duplicate slug check
  4. Owner verification — PR author must match the author field

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 176 lines · 0 tokens per session scan A 529309f28ac9

Subscribe to this mod's changes

publish is a command published in the GitHub repository rolecraft-sh/rolecraft (76 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,483 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.