speckit-companion: Command for Claude Code

.claude/commands/publish-both.md

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

A release command that publishes new versions of both the VS Code extension and the spec-kit extension in sequence.

In plain words
What is it for?
Use it when releasing both extensions together, with separate versioning and publishing flows for each one.
Why use it?
It keeps the two extension releases coordinated and checks basic release conditions before starting.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

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-both.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-both

README.md
[![agentmods](https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/publish-both/github.svg)](https://agentmods.dev/commands/alfredoperez/speckit-companion/publish-both)
Your own site
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/publish-both"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/publish-both/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-both

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/publish-both"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/publish-both.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 769 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.00016 $0.00769
Opus 5 $0.00008 $0.00385
Sonnet 5 $0.00003 $0.00154
Haiku 4.5 $0.00002 $0.00077

Measured 11d ago against content hash b625316acd4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

publish-both 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 11d 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-both.md · 38 lines

How it starts

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

Context

  • Git status: !git status --porcelain | head
  • Current branch: !git branch --show-current
  • VS Code ext version: !node -p "require('./package.json').version"
  • spec-kit ext version: !grep -A4 '^extension:' speckit-extension/extension.yml | grep 'version:' | tr -d ' "' | sed 's/version://'
  • Latest v* tags: !git tag --list 'v*' --sort=-version:refname | grep -v speckit-ext | head -3
  • Latest speckit-ext-v* tags: !git tag --list 'speckit-ext-v*' --sort=-version:refname | head -3

Your task

Release both extensions in one pass by running the two existing flows sequentially. This command adds orchestration only — the per-extension steps live in their own commands and stay the single source of truth:

  • Phase 1 (VS Code extension): .claude/commands/publish.md
  • Phase 2 (spec-kit extension): .claude/commands/publish-speckit-ext.md

Steps

  1. Preflight — abort with a clear message if either fails:
    • Working tree must be clean (git status --porcelain empty).
    • Branch must be main.
  2. Ask for both target versions up front in a single question, showing both current versions. Do not ask again inside the phases.
  3. Phase 1 — VS Code extension. Read .claude/commands/publish.md and execute its task section exactly, using the version from step 2 instead of prompting. Ends with the vX.Y.Z tag pushed and release.yml handling Marketplace/OpenVSX.
  4. Checkpoint. Confirm release.yml started for the new v* tag (gh run list --workflow=release.yml --limit 2). If Phase 1 failed at any point, stop here — do not start Phase 2 on a half-released state.
  5. Phase 2 — spec-kit extension. Read .claude/commands/publish-speckit-ext.md and execute it exactly, using the version from step 2 instead of prompting. Ends with the speckit-ext-vX.Y.Z GitHub release cut and the scratch-dir install verified.
  6. No rollback. If Phase 2 fails, the VS Code release stays in flight (it's already on the Marketplace pipeline). Report precisely what completed, what failed, and what remains — the user finishes Phase 2 later with /publish-speckit-ext.
  7. Final report. Both tags, the release.yml run status, the spec-kit release URL, and the specify extension add companion --from <url> install command.

Read the full file on GitHub · 38 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. 11d ago First seen · 38 lines · 16 tokens per session scan A b625316acd4a

Subscribe to this mod's changes

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