Skip to content

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

Open

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

Activity

  1. github-actions commented on Jul 17, 2026

    @github-actions
    Contributor

    cc @github/spec-kit-maintainers — new catalog submission for review.

  2. github-actions commented on Jul 17, 2026

    @github-actions
    Contributor

    Validation Result: ❌ Failed

    Thank you for your submission, @rnoap! After reviewing it against the publishing requirements, one validation check failed:


    ❌ Extension ID conflict

    Check: Extension ID must be unique in the catalog
    Issue: The extension ID cost is already registered in the community catalog by a different author (Quratulain-bilal) pointing to a different repository (https://github.com/Quratulain-bilal/spec-kit-cost).

    Because the existing cost entry belongs to a different author and repository, this submission cannot update it in-place. Replacing another author's catalog entry is not permitted.

    How to fix: Please choose a different extension ID that is not already taken. Some suggestions:

    • speckit-cost
    • cost-tracker (also check availability)
    • llm-cost

    Once you have selected an available ID, update the extension.yml in your repository to reflect the new ID and re-submit this issue with the corrected Extension ID.


    ✅ All other checks passed

    Check Result
    Extension ID format (^[a-z][a-z0-9-]*$) ✅ Passed
    Version format (semver X.Y.Z) ✅ 1.4.0
    Repository exists and is public ✅ https://github.com/rnoap/spec-kit-cost
    extension.yml present ✅ Found
    README.md present ✅ Found
    LICENSE file present ✅ Found
    GitHub release exists (v1.4.0) ✅ Found
    Download URL follows expected pattern ✅ archive/refs/tags/v1.4.0.zip
    Testing checklist complete ✅ All checked
    Submission requirements complete ✅ All checked

    Your extension itself looks well-structured and thoroughly tested — once the ID conflict is resolved, this should proceed smoothly.

    Generated by 🧩 Add Community Extension from Issue Submission for issue #3566 · 135.4 AIC · ⌖ 10.7 AIC · ⊞ 32.9K · ◷

  3. mnriem commented on Jul 17, 2026

    @mnriem
    Collaborator

    @rnoap Please address the naming. Thank you!

  4. github-actions commented on Sep 17, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed in 30 days if no further activity occurs.

  5. added
    triage-must-haveVerdict: high-value, important work for Spec Kit — do first
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions