Skip to content

[Extension]: Add spec-kit-cost #3566

Description

@rnoap

Extension ID

cost

Extension Name

spec-kit-cost

Version

1.4.0

Description

Tracks LLM token cost per spec-kit workflow step, showing a running per-step cost and total spec implementation cost, with cache-aware pricing and measured usage on supported hosts.

Author

Raúl Noa Pedroso

Repository URL

https://github.com/rnoap/spec-kit-cost

Download URL

https://github.com/rnoap/spec-kit-cost/archive/refs/tags/v1.4.0.zip

License

MIT

Homepage (optional)

https://github.com/rnoap/spec-kit-cost

Documentation URL (optional)

https://github.com/rnoap/spec-kit-cost/blob/main/README.md

Changelog URL (optional)

https://github.com/rnoap/spec-kit-cost/blob/main/CHANGELOG.md

Required Spec Kit Version

=0.4.0

Required Tools (optional)

None — pure POSIX bash (awk/grep/sed/cut/date), no external runtime dependencies.

Number of Commands

3

Number of Hooks (optional)

7

Tags

cost, tokens, budget, observability, ledger, token-usage

Key Features

  • Per-step inline cost summary after each of 7 spec-kit lifecycle events (specify, clarify, plan, tasks, analyze, checklist, implement)
  • Cumulative cost report shown automatically after implement, or on demand via speckit.cost.report
  • Append-only USD ledger (JSON Lines) — entries are never modified, only appended
  • Zero-config — works out of the box with sensible defaults and a built-in model-price catalog (Claude, OpenAI, Google Gemini)
  • Measured token usage — on hosts exposing a session-store query tool (currently VS Code Copilot), records real token/cache counts instead of chars÷4 estimates
  • Cache-aware pricing — prices cache-read/cache-write tokens at their own rates instead of the full input rate (verified case: 6.8x cost overstatement avoided)
  • Pluggable providers — self-report (default), manual, log-file (planned)

Testing Checklist

  • Extension installs successfully via download URL
  • All commands execute without errors
  • Documentation is complete and accurate
  • No security vulnerabilities identified
  • Tested on at least one real project

Submission Requirements

  • Valid extension.yml manifest included
  • README.md with installation and usage instructions
  • LICENSE file included
  • GitHub release created with version tag
  • All command files exist and are properly formatted
  • Extension ID follows naming conventions (lowercase-with-hyphens)

Testing Details

Tested on:

  • Windows 11 with Git Bash (bats-core via npm) — spec-kit CLI 0.12.18.dev0
  • Dogfooded within this repository across specs 001-004 (real per-step cost tracking)

Test project: this repository itself (rnoap/spec-kit-cost), specs/001-004

Test scenarios:

  1. Installed extension from GitHub release archive URL (v1.4.0) into a fresh spec-kit project — succeeded, no errors
  2. Ran full bats suite (record.bats, report.bats, reset.bats) covering record/report/reset commands, cache-aware pricing, measured vs. estimated sourcing, and byte-identity regression against legacy behavior
  3. Verified hooks fire correctly across all 7 lifecycle events during real spec-kit workflow runs
  4. Verified ledger append-only behavior and cumulative report output

Example Usage

# Install extension
specify extension add cost --from https://github.com/rnoap/spec-kit-cost/archive/refs/tags/v1.4.0.zip

# Use a command
/speckit.cost.report

Proposed Catalog Entry

{
  "spec-kit-cost": {
    "name": "spec-kit-cost",
    "id": "cost",
    "description": "Tracks LLM token cost per spec-kit workflow step, showing a running per-step cost and total spec implementation cost, with cache-aware pricing and measured usage on supported hosts.",
    "author": "Raúl Noa Pedroso",
    "version": "1.4.0",
    "download_url": "https://github.com/rnoap/spec-kit-cost/archive/refs/tags/v1.4.0.zip",
    "sha256": "7c3cc3e4f215339eb185ebc7d73addfd948dfbfb2b2d7a671612c0a05e32d538",
    "repository": "https://github.com/rnoap/spec-kit-cost",
    "homepage": "https://github.com/rnoap/spec-kit-cost",
    "documentation": "https://github.com/rnoap/spec-kit-cost/blob/main/README.md",
    "changelog": "https://github.com/rnoap/spec-kit-cost/blob/main/CHANGELOG.md",
    "license": "MIT",
    "requires": {
      "speckit_version": ">=0.4.0",
      "tools": []
    },
    "provides": {
      "commands": 3,
      "hooks": 7
    },
    "tags": ["cost", "tokens", "budget", "observability", "ledger", "token-usage"],
    "verified": false
  }
}

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions