speckit-companion: Command for Claude Code

.claude/commands/publish.md

publish is a command for Claude Code from alfredoperez/speckit-companion. It costs 7 tokens per session (496 once invoked), scanned A, original, MIT.

A release workflow for publishing a new version of a VS Code extension. It checks the Git state, updates the changelog and version references, and prepares the release using the project’s versioning rules.

In plain words
What is it for?
Use it to review changes since the previous version, create categorized release notes, update version references, and publish the extension.
Why use it?
It helps avoid publishing with uncommitted changes or an incorrect version. It also keeps the release notes and documentation aligned with the code.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is alfredoperez/speckit-companion's own configuration. It tells Claude Code how to work on speckit-companion 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 speckit-companion configures →

Reuse

Borrowing it

Nothing to install: this file belongs to alfredoperez/speckit-companion. 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/alfredoperez/speckit-companion/main/.claude/commands/publish.md
Clone the repo
git clone --depth 1 https://github.com/alfredoperez/speckit-companion

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/commands/alfredoperez/speckit-companion/publish/github.svg)](https://agentmods.dev/commands/alfredoperez/speckit-companion/publish)
Your own site
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/publish"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/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/commands/alfredoperez/speckit-companion/publish"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/publish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00007 $0.00496
Opus 5 $0.00003 $0.00248
Sonnet 5 $0.00001 $0.00099
Haiku 4.5 $0.00001 $0.00050

Measured 12d ago against content hash 98e7bf2a9e2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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.

.claude/commands/publish.md · 36 lines

What it actually says

Context

  • Current git status: !git status --porcelain
  • Current version: !node -p "require('./package.json').version"
  • Current branch: !git branch --show-current
  • Recent tags: !git tag --sort=-version:refname | head -5

Your task

Scope: the VS Code extension only. For the spec-kit extension (speckit-extension/) use /publish-speckit-ext — it has its own README/CHANGELOG/extension.yml version and a speckit-ext-v* tag (a v* tag here would wrongly publish to the Marketplace).

Help the user publish a new version of the extension by:

  1. First check if there are uncommitted changes. If yes, abort with a warning.
  2. Ask the user for the new version number (show current version).
  3. Get the previous version tag and analyze commits since then to generate a changelog.
  4. Update CHANGELOG.md by adding a new section at the top (after the header) with:
    • ## [X.X.X] - YYYY-MM-DD format
    • Generated changelog with sections for New Features, Bug Fixes, and Improvements
    • Keep all previous versions' changelogs intact
  5. Update documentation files with the new version:
    • Update version references in CLAUDE.md if needed
    • Update version references in README.md (e.g., in installation commands)
    • Update version references in README.zh-CN.md (e.g., in installation commands)
  6. Update package.json version using npm version X.X.X --no-git-tag-version.
  7. Commit CHANGELOG.md, CLAUDE.md, README.md, README.zh-CN.md, package.json and package-lock.json with message "chore: bump version to X.X.X".
  8. Create an annotated tag vX.X.X with message "Release vX.X.X - See CHANGELOG.md for details".
  9. Push both the commit and tag to origin.
  10. Inform the user that GitHub Actions will handle the rest.

Make sure to handle errors gracefully and provide clear feedback at each step.

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. 12d ago First seen · 36 lines · 7 tokens per session scan A 98e7bf2a9e2c

Subscribe to this mod's changes

publish is a command published in the GitHub repository alfredoperez/speckit-companion (90 stars, last pushed yesterday), licensed MIT. It adds 7 tokens to every session and 496 once invoked, about $0.0000 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-08-30.

Related

Other commands, from other repositories