AGENT SKILL

cost-opt

Compact cost logs, recalibrate the pricing table in ~/.claude/extract_cost.py and statusline-command.sh against platform.claude.com/cost extracts, and surface optimization suggestions.

License 许可
MIT
最近更新
2026-09-10
Stars
★ 3
Forks
1

01 前言 Front Matter

name
cost-opt
description
Compact cost logs, recalibrate the pricing table in ~/.claude/extract_cost.py and statusline-command.sh against platform.claude.com/cost extracts, and surface optimization suggestions.
user-invocable
true

03 SKILL.md 正文

  1. First, ensure logs exist by running: python3 ~/.claude/extract_cost.py --append-log --quiet

  2. Read the JSONL cost log files in ~/.claude/cost-log/*.jsonl and the existing ~/.claude/COST-SUMMARY.md.

  3. Recalibrate and update ~/.claude/extract_cost.py PRICING table and the ~/.claude/statusline-command.sh case "$model_id" pricing block, based on the ~/.claude/cost-log/*.csv actual extracts from

    • https://platform.claude.com/cost (cost-by-day), and
    • https://platform.claude.com/logs (historical API logs) –> The user will periodically fetch these extracts themselves and upload them to ~/.claude/cost-log.
  4. Perform an efficient /compact summary on the log files (just changes since last summary) and update SUMMARY.md with the compacted summary including: total spend, spend by model, spend by project, busiest sessions, and trends.

  5. Suggest cost optimizations based on the data — e.g., sessions where Opus was used for tasks that Sonnet could handle, high cache-creation ratios, or sessions with excessive turns.

  6. Ignore and filter out work done on the ~/.claude and ~/.awesome directories, in the cost analysis, summary and recommendations.

  7. Formatting rule — escape dollar signs: In prose sections (bullet points, numbered lists, paragraphs), always write \$ instead of bare $ to prevent Markdown renderers from interpreting $...$ as LaTeX math. Dollar signs inside tables and fenced code blocks do NOT need escaping. Never break a dollar amount across lines.

04 同仓库更多 Skills

laurac8r
laurac8r/claude-damn

visual-aid

Use when the user asks for a quick visual aid, visual explainer, concept card, one-pager, poster, cheat sheet, infographic, visual summary, summary card, or mini explainer page — especially from input like a block of text, attached images, an attached song (lyrics/audio), a web link, a CSV/dataset, a math formula, a code snippet to walk through, a tutorial's steps, a timeline, or an A-vs-B comparison. Triggers include "make me a quick visual aid", "turn this into a one-pager / cheat sheet / explainer", "summarize this visually", "give me a visual of", "explain this on a single page", "make a concept card for", "whip up a page about", "build a mini page that shows", "something I can paste into a doc explaining X", or any request to render a topic/text/link/image-set/song/data into a standalone page. Prefer this skill over frontend-design when the ask is an explanatory single-file page (not a production UI), over playground when the output is static information display (not an interactive configurator), and over a Markdown/code answer when the user explicitly wants a *page* (HTML). Produces a single self-contained HTML file that opens on double-click without a server.

★ 3
laurac8r
laurac8r/claude-damn

tesseract

Use when you've been poking at the same file, concept, or problem across many sessions and want to step outside time to see its whole arc — or when you want to leave a note for next-session-you. Triggers: 'I've been going in circles on X', 'what have I learned about X', 'what did past-me say about X', 'I keep rediscovering this'.

★ 3
laurac8r
laurac8r/claude-damn

tdd

Invoke test-driven development as an explicit one-at-a-time micro-cycle — one test, one piece of functionality, refactor, then repeat for the next behavior

★ 3
laurac8r
laurac8r/claude-damn

tdd-cat

TDD workflow with subagent-driven-development — /tdd composed with /cat, plus the A/B TDD execution-mode axis (split-phase vs micro-cycle) asked as a third question in /cat's combined pre-dispatch question

★ 3
laurac8r
laurac8r/claude-damn

task-list

TaskCreate / TaskUpdate / render the current TaskList in response to `/task-list` (with or without flags). The skill body executes immediately on the syntax — no permission-seeking, no echoing the list back as plain text.

★ 3
laurac8r
laurac8r/claude-damn

sync

Sync files between two local directories, repos, or git worktrees. Five modes (plan/interactive/push/pull/mirror), .gitignore-aware, Claude-workflow allowlist via --claude, dropbox-restore-style per-directory prompts.

★ 3