publish-package

publish-package is a cursor rule for Cursor from danielvm-git/bigpowers. It costs 36 tokens per session (2,602 once invoked), scanned A, original, MIT.

Package registry publishing for npm, crates.io, PyPI, and Homebrew. Verifies prerequisites, runs the publish command, confirms success, and surfaces actionable error hints on failure.

Cursor rule for Cursor

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 rules/danielvm-git/bigpowers/publish-package
Clone the repo
git clone --depth 1 https://github.com/danielvm-git/bigpowers

Made for: Cursor.

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-package

README.md
[![agentmods](https://agentmods.dev/badge/rules/danielvm-git/bigpowers/publish-package.svg)](https://agentmods.dev/rules/danielvm-git/bigpowers/publish-package)
Your own site
<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/publish-package"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/publish-package.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00036 $0.02602
Opus 5 $0.00018 $0.01301
Sonnet 5 $0.00007 $0.00520
Haiku 4.5 $0.00004 $0.00260

Measured today against content hash 6aa0a55098b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish-package 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 today.

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.

.cursor/rules/publish-package.mdc · 338 lines

How it starts

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

Publish Package

HARD GATE — Do not attempt to publish without verifying prerequisites. Missing auth tokens, stale builds, or duplicate versions cause CI failures that are hard to debug post-push.

HARD GATE — Always run --dry-run first. Package registries are append-only — a bad publish cannot be fully undone on most registries.

Publish packages to language-specific registries. Detects package type from manifest files, verifies publish prerequisites, runs the registry-specific publish command, and confirms the version appears on the registry.

Process

1. Detect package type

Read the project root for manifest files to determine the package type:

Manifest Registry Publish command
package.json npm npm publish --access public
Cargo.toml crates.io cargo publish
setup.py / pyproject.toml PyPI twine upload dist/* or flit publish
Formula/<name>.rb Homebrew brew bump-formula-pr
Multiple detected Polyglot Error: specify registry with `--registry <npm

If no manifest is found, prompt the user to specify the type or pass --type <npm|crates.io|pypi|brew>.

2. Verify prerequisites

Before attempting any publish, run all applicable checks:

npm (package.json): See REFERENCE.md

crates.io (Cargo.toml): See REFERENCE.md

PyPI (setup.py / pyproject.toml): See REFERENCE.md

3. Run publish

After all prerequisite checks pass, run the registry-specific command:

See REFERENCE.md

4. Verify publish success

After publish, confirm the version appears on the registry:

See REFERENCE.md

5. Error handling

On failure, surface actionable hints:

See REFERENCE.md

6. Dry-run mode (--dry-run)

Run --dry-run to verify all prerequisites without actually publishing:

See REFERENCE.md

Read the full file on GitHub · 338 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. today First seen · 338 lines · 36 tokens per session scan A 6aa0a55098b7

Subscribe to this mod's changes

publish-package is a cursor rule published in the GitHub repository danielvm-git/bigpowers (163 stars, last pushed 2d ago), licensed MIT. It adds 36 tokens to every session and 2,602 once invoked, about $0.0002 per session on Opus 5. 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-09-03.