speckit-companion: Command for Claude Code

.claude/commands/publish-mod.md

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

A release command for publishing the Claude Code mod from this repository's plugin marketplace and preparing its Anthropic directory submission.

In plain words
What is it for?
Use it to release the `speckit-companion` Claude Code plugin and prepare the information needed for an Anthropic directory submission.
Why use it?
It guides the version update, quality checks, clean-branch checks, commit, and release steps so a published change can be installed by users.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions .claude-plugin; names the AskUserQuestion tool.

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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is claude plugin validate --strict ./apps/claude-mod.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/publish-mod"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/publish-mod.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 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,283 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.00031 $0.01283
Opus 5.5 $0.00012 $0.00513
Sonnet 5.5 $0.00006 $0.00257
Haiku 4.5 $0.00003 $0.00128

Measured 18d ago against content hash e410025a36ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

publish-mod 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 18d 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-mod.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 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
  • Mod version: !node -p "require('./apps/claude-mod/.claude-plugin/plugin.json').version"
  • Latest mod tags: !git tag --list 'speckit-companion--v*' --sort=-version:refname | head -3
  • Claude Code version: !claude --version

Your task

Release the Claude Code mod (apps/claude-mod/, plugin speckit-companion). It has no store upload: the repo-root .claude-plugin/marketplace.json lists it, so it is published the moment the release commit is on main. Reference: https://code.claude.com/docs/en/plugins/publish.

The version bump is the release. claude plugin update compares the version in apps/claude-mod/.claude-plugin/plugin.json with the installed one, so commits pushed without a new version reach nobody.

Steps

  1. QA gate. Apply the Release gate in .claude/commands/release-qa.md. If it does not pass, stop and tell the user to run /release-qa; continue only on their explicit override. Skip it when /publish-all already ran it in its preflight.
  2. Preflight. The working tree is clean and the branch is main, or abort.
  3. Version. Ask for the new version, showing the current one; a first release, with no tag yet, may keep it. Skip the question when /publish-all passed one in.
  4. Bump version in apps/claude-mod/.claude-plugin/plugin.json. Never rename the plugin: installs are recorded as speckit-companion@speckit-companion, and a rename orphans every one of them.
  5. Rebuild the vendored bundle: npm run mod:build. It regenerates hooks/vendor/ from the canvas's spec-rules.mjs and the test fixtures from the demo specs.
  6. Validate and test, and stop on the first failure:
    claude plugin validate --strict ./apps/claude-mod
    claude plugin validate --strict .
    claude plugin validate --strict apps/website/public/plugins/marketplace.json
    npm run test:mod
    
    The second line checks the repo's marketplace file and the third the hosted one, apps/website/public/plugins/marketplace.json, which is the file the install command points at. The hosted file is part of the release: it fetches the mod from apps/claude-mod on main, keeps the same entry text as the repo's file, and a change to it goes live with the next site deploy. test:mod also rebuilds the canvas bundle; if that leaves a diff under apps/copilot-canvas/vendor, main was stale, so stop and fix that first.
  7. README. When the tests ran on a newer Claude Code than the "Tested on Claude Code" line in apps/claude-mod/README.md names, update that line.
  8. Commit and push apps/claude-mod/ to main as chore(claude-mod): release v<X.Y.Z>. Nothing else goes in this commit.
  9. Tag: claude plugin tag apps/claude-mod --push. It checks that plugin.json and the marketplace entry agree, then creates and pushes speckit-companion--v<X.Y.Z>. Confirm with gh run list --workflow=release.yml --limit 2 that no run started: the tag does not match v*.
  10. Report the tag and the commands users run:
    claude plugin marketplace add https://speckit-companion.dev/plugins/marketplace.json
    claude plugin install speckit-companion@speckit-companion
    
    People who already have it run claude plugin update speckit-companion@speckit-companion, since auto-update is off by default for a third-party marketplace.
  11. Directory mirror. Anthropic's directory reads a small mirror repo, alfredoperez/speckit-companion-claude-mod, because this repo is over its 50 MiB limit. Run tooling/scripts/sync-mod-mirror.sh --push: it copies the released mod, validates it and pushes, and the directory picks the new version up from that repo's main. The listing is managed at https://claude.ai/directory/manage; a version held for review is the user's to follow there. Never open the portal or submit on their behalf without being asked.
  12. Before a first listing anywhere else, read the destination's own checklist and run its validator before sending. The directory's is https://claude.com/docs/plugins/pre-submission-checklist: a square PNG icon at .claude-plugin/icon.png, and a README that says what the mod reads, runs and sends.

Read the full file on GitHub · 52 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. 18d ago Changed · +1 lines e410025a36ee
  2. 19d ago Changed · +1 lines 1e048271d64f
  3. 21d ago First seen · 50 lines · 31 tokens per session scan A efb67799f762

Subscribe to this mod's changes

publish-mod is a command published in the GitHub repository alfredoperez/speckit-companion (99 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 1,283 once invoked, about $0.0001 per session on Opus 5.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-10-04.