/spectra-commit

/spectra-commit is a command for Claude Code, Cursor from gcake119/joplin-llm-wiki. It costs 15 tokens per session (2,136 once invoked), scanned A, original, MIT.

A Git command for committing only the files associated with one Spectra change. Git is a tool for tracking and saving versions of project files.

In plain words
What is it for?
Use it to identify a change, read its tracked files, stage those files, and create a focused commit.
Why use it?
It helps keep unrelated work out of a commit when several changes are being developed at the same time.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: names the AskUserQuestion tool.

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 commands/gcake119/joplin-llm-wiki/spectra-commit
Clone the repo
git clone --depth 1 https://github.com/gcake119/joplin-llm-wiki

Made for: Claude Code, 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 /spectra-commit

README.md
[![agentmods](https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-commit.svg)](https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-commit)
Your own site
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-commit"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-commit.svg" alt="Measured on agentmods" 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 2,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.02136
Opus 5 $0.00008 $0.01068
Sonnet 5 $0.00003 $0.00427
Haiku 4.5 $0.00002 $0.00214

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

Security

Grade A, and why

/spectra-commit 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 5d 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.

.cursor/commands/spectra-commit.md · 260 lines

How it starts

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

Commit files related to a specific Spectra change.

This is a utility skill (not a workflow step). It reads source file tracking data and artifact changes to stage and commit only the files belonging to one change — useful when multiple changes are in progress simultaneously.

Input: Optionally specify a change name after /spectra:commit (e.g., /spectra:commit add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

Prerequisites: This skill requires git. Run git --version. If git is not available (command not found or similar error), inform the user to install git and STOP.

Steps

  1. Select the change

    If a name is provided, use it. Otherwise:

    • Infer from conversation context if the user mentioned a change
    • Auto-select if only one active change exists
    • If ambiguous, run spectra list --json to get available changes. Use the AskUserQuestion tool to let the user select

    Always announce: "Committing for change: "

  2. Read tracking file

    Check for .spectra/touched/<change-name>.json. If it exists, parse it to get source files grouped by task.

    Expected format:

    {
      "change": "<change-name>",
      "touched": [
        {
          "task_id": "1",
          "task_desc": "Task description",
          "files": ["src/file1.ts", "src/file2.ts"]
        }
      ]
    }
    

    If the file does not exist, proceed without source file data — only artifact files will be included.

  3. Collect artifact files

    Run git status --porcelain and filter the output to files under openspec/changes/<name>/. These are the change's artifact files (proposal, design, tasks, specs, etc.).

  4. Identify unrelated dirty files

    From the full git status --porcelain output, any dirty files NOT in the artifact set and NOT in the tracking file are "unrelated changes."

  5. Display commit plan

    Show the file list grouped into sections:

    ## Commit Plan: <change-name>
    
    ### Change Artifacts
    - M  openspec/changes/<name>/proposal.md
    - M  openspec/changes/<name>/tasks.md
    
    ### Source Files
    **Task 1: <task description>**
    - M  src/lib/components/search.svelte
    - A  src/lib/stores/search.ts
    
    **Task 3: <task description>**
    - M  src/routes/+page.svelte
    
    ### Unrelated Changes (not included)
    - M  src/lib/utils/format.ts
    - ??  tmp/scratch.js
    

    If no tracking file was found, show a warning instead of the Source Files section:

    ### Source Files
    ⚠ No source file tracking data found.
    Only artifact files will be committed. Use `spectra task done` during apply to enable source file tracking.
    

    If there are no artifact files AND no tracked source files, inform the user that there is nothing to commit and STOP.

  6. User confirmation

    Use the AskUserQuestion tool to ask the user how to proceed.

    Options:

    • Commit as shown: Proceed with the displayed artifact + source files
    • Include all dirty files: Add all unrelated files to the commit as well
    • Customize: Let the user add or remove specific files from the commit set
    • Archive first, then commit together: Run archive before committing — archive file moves will be included in this commit

    If the user selects "Customize":

    • Show a numbered list of all dirty files (included and excluded)
    • Ask which files to add or remove
    • Re-display the updated commit plan for confirmation

    If the user selects "Archive first, then commit together":

    • Proceed to step 6a (Archive sub-flow) before continuing to step 7

6a. Archive sub-flow (only when the user selected "Archive first, then commit together")

This sub-flow executes three checks in sequence before returning to the main commit flow.

**6a-i. Incomplete task handling**

Read the tasks file at `openspec/changes/<name>/tasks.md`. Count `- [x]` (complete) and `- [ ]` (incomplete) checkboxes.

Read the full file on GitHub · 260 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. 5d ago First seen · 260 lines · 15 tokens per session scan A 6110a3d890a7

Subscribe to this mod's changes

/spectra-commit is a command published in the GitHub repository gcake119/joplin-llm-wiki (2 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 2,136 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-31.