safeclaw: Agent for Claude Code

.claude/agents/publish.md

publish is an agent for Claude Code from DinoMorphica/safeclaw. It costs 0 tokens per session (1,279 once invoked), scanned C, original, MIT.

An agent guide for publishing the safeclaw npm package, a reusable JavaScript package distributed through npm. It defines the required versioning, build, asset-copying, and publishing sequence.

In plain words
What is it for?
Use it to prepare and publish a new package version, verify the command-line app contains its frontend assets, and follow the required build order.
Why use it?
It prevents release mistakes such as publishing before the build is complete or leaving the command-line app without its web files.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is DinoMorphica/safeclaw's own configuration. It tells Claude Code how to work on safeclaw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything safeclaw configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd apps/cli && npm version patch && cd ../.. && pnpm build && cd apps/cli && pnpm publish --no-git-checks --otp=<OTP>.

Reuse

Borrowing it

Nothing to install: this file belongs to DinoMorphica/safeclaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DinoMorphica/safeclaw/main/.claude/agents/publish.md
Clone the repo
git clone --depth 1 https://github.com/DinoMorphica/safeclaw

Made for: Claude Code.

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/agents/dinomorphica/safeclaw/publish/github.svg)](https://agentmods.dev/agents/dinomorphica/safeclaw/publish)
Your own site
<a href="https://agentmods.dev/agents/dinomorphica/safeclaw/publish"><img src="https://agentmods.dev/badge/agents/dinomorphica/safeclaw/publish/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for publish

Your own site · 80×15
<a href="https://agentmods.dev/agents/dinomorphica/safeclaw/publish"><img src="https://agentmods.dev/badge/agents/dinomorphica/safeclaw/publish.svg" alt="Reviewed on agentmods" width="80" 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,279 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01279
Opus 5.5 $0.00000 $0.00512
Sonnet 5.5 $0.00000 $0.00256
Haiku 4.5 $0.00000 $0.00128

Measured 1mo ago against content hash 8b1d299211dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

publish scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ~/test-safeclaw && mkdir ~/test-safeclaw && cd ~/test-safeclaw && npx safeclaw@<VERSION> start
.claude/agents/publish.md · 135 lines

How it starts

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

SafeClaw Publish Agent

You are a specialist agent for publishing the safeclaw npm package. Follow these instructions exactly.

Publish Command (single pipeline)

cd apps/cli && npm version patch && cd ../.. && pnpm build && cd apps/cli && pnpm publish --no-git-checks --otp=<OTP>

Order matters: version bump → build → publish. The version is injected at build time via tsup's define in tsup.config.ts, so the bump must happen first.

What pnpm build Does

Runs in this exact order (defined in root package.json):

  1. pnpm build:shared — Compiles packages/shared (TypeScript types)
  2. pnpm build:web — Builds apps/web (Vite production build)
  3. pnpm build:cli — Bundles apps/cli via tsup into dist/main.js
  4. cp -r apps/web/dist/* apps/cli/public/ — Copies frontend assets into CLI's public folder

The CLI serves public/ as static files via @fastify/static. If this folder is empty, users see a 404 instead of the dashboard.

Pre-Publish Checklist

Before publishing, verify:

  1. apps/cli/public/ has frontend assets:

    ls apps/cli/public/
    

    Must contain: index.html, assets/, favicon files.

  2. Version is correct in the bundle:

    grep 'VERSION' apps/cli/dist/main.js | head -1
    

    Should show the new version string.

  3. License is AGPL-3.0-only in apps/cli/package.json (not MIT).

  4. apps/cli/README.md exists — this is what npm displays on the package page.

Testing a Published Version

Always test from a clean directory outside the monorepo:

rm -rf ~/test-safeclaw && mkdir ~/test-safeclaw && cd ~/test-safeclaw && npx safeclaw@<VERSION> start
  • Never test from inside the monorepo — workspace:* in devDependencies causes errors with npm.
  • Always specify the exact version (npx [email protected]) to avoid npx cache serving a stale version.
  • Verify: banner shows correct version, dashboard loads at http://localhost:54335, no "No frontend build found" warning.

Read the full file on GitHub · 135 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. 1mo ago First seen · 135 lines · 0 tokens per session scan C 8b1d299211dc

Subscribe to this mod's changes

publish is an agent published in the GitHub repository DinoMorphica/safeclaw (22 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,279 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

deployment-specialist

Handles all deployment operations.

luongnv89/claude-howto · 8 tokens

release-validator

Validates release readiness by checking tests, build, dependencies, and changelog. Use before creating a release.

rlajous/claude-code-commands · 25 tokens

pr-ghostwriter

Kod değişikliklerinden PR açıklaması, commit mesajı ve changelog üretir. Gerçek diff'i okuyarak değişikliğin ne, neden ve nasıl olduğunu açıklar. Kullanıcı PR açmak, commit mesajı yazmak veya release notu hazırlamak istediğinde kullanılır. Jenerik açıklama üretmez — her zaman gerçek değişikliğe özgü yazar.

komunite/kalfa · 81 tokens

iris

GitHub operations specialist — branches, pull requests, issues, releases, tags. Called by zeus after review. Never pushes or merges without explicit human approval. Integrates with VS Code GitHub Pull Requests extension.

ils15/pantheon-legacy · 45 tokens

shipper

Deployment pipeline agent that executes the full ship sequence: pre-ship checks, conventional commit, feature branch + PR, CI verification, and rollback documentation. Use in Phase 5 after Gate 2 passes. Never commits directly to main. Not for implementation or review approval.

ngocsangyem/MeowKit · 57 tokens

release-engineer

Use after reviewer approves a slice. Verifies build/test/lint/smoke against the release artifact, validates env and secret assumptions, rehearses rollback, and writes release notes. Last gate before merge/deploy.

dpanasenko-tech/claude-dev-pipeline · 47 tokens