Repository navigation
feat: add /cfo skill — session cost + AI spend dashboard - #34
Closed
shivanipods wants to merge 3 commits into
Closed
shivanipods wants to merge 3 commits into
shivanipods wants to merge 3 commits into
Conversation
Adds a new `/cfo` skill that shows: - Current session cost and elapsed time as a banner - 30-day AI spend dashboard for the project (by day, by branch) - Prompt repetition detection with waste estimates - Personalized cost-saving tips based on usage patterns Includes `ai_spend.py`, a ~1000-line stdlib-only Python script (originally by @shivanipods) that reads token usage directly from `~/.claude/projects/` — no API keys, no third-party tracking. Also supports team/org aggregation and manual logging of spend from other AI tools (Cursor, Lovable, ChatGPT, etc.). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replace deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc) in build_export_payload. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Owner
|
Python script in a Bun/TS project. Closing. |
garrytan
added a commit
that referenced
this pull request
Oct 30, 2026
…n flags (GSTA-167) Each build records its plan flags, --range, --plan-file and --fanout in the manifest. build --like <dir> fills every flag not given from that record, --out-dir defaulting to <dir>, and refuses (exit 2) a dir without one. The Red Team build, Step 11's adversarial and outside-voice packets, PACKET_DEFERRED and collect's pending hint use it, so a later build no longer misbuilds from hand-copied flags (#34, #36). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Oct 30, 2026
…th origin skips gh; RUNTIME_LINES leaves data files out /ship review of #3633 (security CRITICAL x2): gh pr list --head "$branch" ran through sh(), so a branch named x$(cmd) executed. Replay 3 of gstack-evals #34: a local bare origin under GH_HOST failed the carry check, and RUNTIME_LINES counted JSON. The fixture's origin is now a GitHub URL mapped to the bare repo by insteadOf. Failing-first tests. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Oct 30, 2026
…very capped review-log start names its reservation gstack-evals #34 round 3: close printed budget_check_skipped dispatches=3 for the Step 9 and 11 rows, which ran in handoff child 1: the root's audit matched review-log rows against its own ledger's reservations only. review-log --start already refuses without --reservation under an active capped run. verify-handoff now records each child ledger on the parent's handoff and close walks that tree. Step 9 item 2 builds and checks its batch before REVIEW_START, the fix-check and both Step 11 voices start on --reservation, and the pass program starts once per logged row. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Oct 30, 2026
…--finish settles it gstack-evals #34 round 3: the pass program's start-once-per-role rule gave the Red Team batch an extra --start review token that no row ever finished. A later batch of the same Step 9 pass (the Red Team or an ADMIT remainder) now takes no start, and --finish REVIEW_START settles the open later batches of the step reserved after the started one, so none stays reserved at close. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Oct 30, 2026
…spatch program's reading pair gstack-evals #34 round 3: the docs-audit settle ran from a later program, so the reader was unmeasured. Under a cap its dispatch is now one program: check on build's BUDGET_NEXT, BEFORE right before the reader starts, the poll, AFTER, and settle --dispatched-at <BEFORE> --reading <AFTER> --readers 1 in that program. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 tasks done
3 tasks done
Jmeg8r
added a commit
to Jmeg8r/gstack
that referenced
this pull request
Nov 24, 2026
…an#34) from upgrade/sync-v1.103.0.0 into main Reviewed-on: http://100.88.14.2:3300/jfcadm/gstack/pulls/34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
/cfoskill that answers "what am I spending?" without leaving Claude Code.ai_spend.py --add--export,--team,--org)Reads token usage directly from
~/.claude/projects/transcripts — no API keys, no third-party tracking.What's included
cfo/SKILL.md— skill prompt (4 steps: find script, gather session metrics in one atomic bash call, run dashboard, print banner)cfo/ai_spend.py— ~1000-line stdlib-only Python dashboard script, originally from @shivanipods/claude-session-skillNotes for reviewer
/cfosection is written in third-person to let you adapt it to your voice if you accept the PRjqandpython3(3.10+) — added to the Requirements line in README; both are pre-installed or onebrew install jqaway on macOScfo/subdirectory with aSKILL.mdTest plan
./setupsymlinkscfoalongside the other skills/cforuns and outputs session banner + spend dashboardpython3 cfo/ai_spend.py --helpruns without errors (stdlib only, no pip required)jqis the only new system dependency🤖 Generated with Claude Code