speckit.spex.finish

speckit.spex.finish is a command for Claude Code from rhuss/cc-spex. It costs 15 tokens per session (4,135 once invoked), scanned A, original, Apache-2.0.

A command for checking a code change, combining its commits into one, and merging or keeping it on the main branch. A smoke test is a quick check that the software still starts and works at a basic level.

In plain words
What is it for?
Use it to run smoke tests, handle extension hooks, squash commits, and decide whether to merge or keep the completed work.
Why use it?
It puts the final checks and delivery steps into one repeatable process before code reaches the main branch.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to run smoke tests, handle extension hooks, squash commits, and decide whether to merge or keep the completed work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rhuss/cc-spex/speckit.spex.finish
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.

Clone the repo
git clone --depth 1 https://github.com/rhuss/cc-spex

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 speckit.spex.finish

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex.finish"><img src="https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex.finish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,135 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.00015 $0.04135
Opus 5 $0.00008 $0.02067
Sonnet 5 $0.00003 $0.00827
Haiku 4.5 $0.00002 $0.00413

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

Security

Grade A, and why

speckit.spex.finish 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 9d 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.

specs/038-neutral-command-vocab/pre-rewrite-snapshot/spex/commands/speckit.spex.finish.md · 462 lines

How it starts

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

Finish - Smoke Test, Squash, and Land the Code

Ship Pipeline Guard

If .specify/.spex-state exists and its status is running, this command is part of an autonomous pipeline. Check the ask field:

AUTONOMOUS_MODE=false
if [ -f ".specify/.spex-state" ]; then
  STATUS=$(jq -r '.status // empty' .specify/.spex-state 2>/dev/null)
  ASK=$(jq -r '.ask // "always"' .specify/.spex-state 2>/dev/null)
  if [ "$STATUS" = "running" ] && [ "$ASK" != "always" ]; then
    AUTONOMOUS_MODE=true
  fi
fi

In autonomous mode: suppress all interactive prompts, UNLESS running inside a worktree (IN_WORKTREE is true, detected in Phase 2). When in a worktree, always present the user with the action prompt (Phase 4) regardless of autonomous mode. Never auto-merge or auto-delete a worktree.

Argument Parsing

Parse the following flags from arguments:

  • If --no-smoke-test is passed, set SKIP_SMOKE_TEST=true. This bypasses the smoke test gate unconditionally.
SKIP_SMOKE_TEST=false
for arg in "$@"; do
  case "$arg" in
    --no-smoke-test) SKIP_SMOKE_TEST=true ;;
  esac
done

Pre-Execution Checks

Check for extension hooks (before finish):

  • Check if .specify/extensions.yml exists in the project root.
  • If it exists, read it and look for entries under the hooks.before_finish key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • Convert hook command names from dot notation to hyphen notation for slash command invocation (e.g., speckit.spex.smoke-test becomes /speckit-spex-smoke-test)
  • Determine prompt behavior based on autonomous mode: when .specify/.spex-state exists with ask of smart or never, optional hooks execute without prompting (treated as mandatory). When ask is "always" or no state file exists, optional hooks prompt as normal.
  • For each executable hook, output the following based on its optional flag:
    • Optional hook (optional: true) in interactive mode:
      ## Extension Hooks
      
      **Optional Pre-Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
      
    • Optional hook (optional: true) in autonomous mode (ask is smart or never): Treat as mandatory (auto-execute without prompting).
    • Mandatory hook (optional: false):
      ## Extension Hooks
      
      **Automatic Pre-Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      
      Wait for the result of the hook command before proceeding to Phase 1.
      
    • If a mandatory hook fails or is declined by the user, STOP. Output an error message indicating which hook failed and do NOT proceed to Phase 1.
  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

Read the full file on GitHub · 462 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. 9d ago First seen · 462 lines · 15 tokens per session scan A 52dd30a23e7b

Subscribe to this mod's changes

speckit.spex.finish is a command published in the GitHub repository rhuss/cc-spex (116 stars, last pushed 21d ago), licensed Apache-2.0. It adds 15 tokens to every session and 4,135 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.