[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DB8G7E8AD44XK8MWE84J8X":3,"skill-same:01M6DB8G7E8AD44XK8MWE84J8X":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6DB8G7E8AD44XK8MWE84J8X","cost-tracking",null,"Track and report Claude Code token usage, spending, and budgets from a local cost-tracking database. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by project, tool, session, or date.","Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcost-tracking\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,5,29,30,31,32,33],"tracking","cost","cost tracking","code","report","database","tool","user","session","use","community","local","project","token","tokens","2026-11-10 10:12:30",false,"---\nname: cost-tracking\ndescription: Track and report Claude Code token usage, spending, and budgets from a local cost-tracking database. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by project, tool, session, or date.\norigin: community\n---\n\n# Cost Tracking\n\nUse this skill to analyze Claude Code cost and usage history from a local SQLite\ndatabase. It is intended for users who already have a cost-tracking hook or\nplugin writing usage rows to `~\u002F.claude-cost-tracker\u002Fusage.db`.\n\nSource: salvaged from stale community PR #1304 by `MayurBhavsar`.\n\n## When to Use\n\n- The user asks \"how much have I spent?\", \"what did this session cost?\", or\n  \"what is my token usage?\"\n- The user mentions budgets, spending limits, overruns, or cost controls.\n- The user wants a cost breakdown by project, tool, session, model, or date.\n- The user wants to compare today against yesterday or inspect a recent trend.\n- The user asks for a CSV export of recent usage records.\n\n## How It Works\n\nFirst verify prerequisites:\n\n```bash\ncommand -v sqlite3 >\u002Fdev\u002Fnull && echo \"sqlite3 available\" || echo \"sqlite3 missing\"\ntest -f ~\u002F.claude-cost-tracker\u002Fusage.db && echo \"Database found\" || echo \"Database not found\"\n```\n\nIf the database is missing, do not fabricate usage data. Tell the user that cost\ntracking is not configured and suggest installing or enabling a trusted local\ncost-tracking hook\u002Fplugin.\n\nThe expected `usage` table usually contains one row per tool call or model\ninteraction. Column names vary by tracker, but the examples below assume:\n\n| Column | Meaning |\n| --- | --- |\n| `timestamp` | ISO timestamp for the usage event |\n| `project` | Project or repository name |\n| `tool_name` | Tool or event name |\n| `input_tokens` | Input token count, when recorded |\n| `output_tokens` | Output token count, when recorded |\n| `cost_usd` | Precomputed cost in USD |\n| `session_id` | Claude Code session identifier |\n| `model` | Model used for the event |\n\nPrefer `cost_usd` over hand-calculating pricing. Model prices and cache pricing\nchange over time, and the tracker should be the source of truth for how each row\nwas priced.\n\n## Examples\n\n### Quick Summary\n\n```bash\nsqlite3 ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT\n    'Today: $' || ROUND(COALESCE(SUM(CASE WHEN date(timestamp) = date('now') THEN cost_usd END), 0), 4) ||\n    ' | Total: $' || ROUND(COALESCE(SUM(cost_usd), 0), 4) ||\n    ' | Calls: ' || COUNT(*) ||\n    ' | Sessions: ' || COUNT(DISTINCT session_id)\n  FROM usage;\n\"\n```\n\n### Cost By Project\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY project\n  ORDER BY cost DESC;\n\"\n```\n\n### Cost By Tool\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT tool_name, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY tool_name\n  ORDER BY cost DESC;\n\"\n```\n\n### Last Seven Days\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT date(timestamp) AS date, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY date(timestamp)\n  ORDER BY date DESC\n  LIMIT 7;\n\"\n```\n\n### Session Drilldown\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT session_id,\n    MIN(timestamp) AS started,\n    MAX(timestamp) AS ended,\n    ROUND(SUM(cost_usd), 4) AS cost,\n    COUNT(*) AS calls\n  FROM usage\n  GROUP BY session_id\n  ORDER BY started DESC\n  LIMIT 10;\n\"\n```\n\n## Reporting Guidance\n\nWhen presenting cost data, include:\n\n1. Today's spend and yesterday comparison.\n2. Total spend across the tracked database.\n3. Top projects ranked by cost.\n4. Top tools ranked by cost.\n5. Session count and average cost per session when enough data exists.\n\nFor small amounts, format currency with four decimal places. For larger amounts,\ntwo decimals are enough.\n\n## Anti-Patterns\n\n- Do not estimate costs from raw token counts when `cost_usd` is present.\n- Do not assume the database exists without checking.\n- Do not run unbounded `SELECT *` exports on large databases.\n- Do not hard-code current model pricing in user-facing answers.\n- Do not recommend installing unreviewed hooks or plugins that execute arbitrary\n  code.\n\n## OpenRouter generation ids (sidecar)\n\nClaude SQLite rows in `~\u002F.claude-cost-tracker\u002Fusage.db` do **not** include OpenRouter sidecar calls. Label the source when mixing numbers.\n\nOpenRouter chat completions return a generation `id`. After the call, `GET https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fgeneration?id=\u003Cgeneration_id>` (same env credential, never log it) returns `total_cost`, token counts, model, and provider. Cost may lag a second or two; retry a few times on 404.\n\nProbe (prints generation id + usage, never the secret):\n\n```powershell\nC:\\Python314\\python.exe C:\\Users\\Prekzursil\\.agents\\scripts\\openrouter-complete.py --show-limits --prompt \"Reply with the single word: pong\"\n```\n\nDo not hard-code OpenRouter unit prices in answers; prefer the generation endpoint's `total_cost`. Per-key remaining cap is `GET \u002Fapi\u002Fv1\u002Fkey` → `limit_remaining` (see skill `openrouter-routing`).\n\nFree-path Wave 0 smoke (2026-08-27): `liquid\u002Flfm-2.5-2.6b:free` id `gen-1787793797-2WelxSMIM1z6ZjFYfWFv` and `openrouter\u002Ffree` → `nvidia\u002Fnemotron-3.5-lightning:free` id `gen-1787793804-F2TQPdT2frdTAk6BC3FR` both settled at `total_cost=0` after an initial `GET \u002Fgeneration` 404 lag. Paid `deepseek\u002Fdeepseek-v4-flash-0731` remains 402 until credits are added.\n\n## Related\n\n- `\u002Fcost-report` - Command-form report using the same database.\n- `cost-aware-llm-pipeline` - Model-routing and budget-design patterns.\n- `token-budget-advisor` - Context and token-budget planning.\n- `strategic-compact` - Context compaction to reduce repeated token spend.\n- `openrouter-routing` - T0\u002FT1\u002FT2 sidecar, spend-cap checklist, generation-id probe.\n","# Cost Tracking\n\nUse this skill to analyze Claude Code cost and usage history from a local SQLite\ndatabase. It is intended for users who already have a cost-tracking hook or\nplugin writing usage rows to `~\u002F.claude-cost-tracker\u002Fusage.db`.\n\nSource: salvaged from stale community PR #1304 by `MayurBhavsar`.\n\n## When to Use\n\n- The user asks \"how much have I spent?\", \"what did this session cost?\", or\n  \"what is my token usage?\"\n- The user mentions budgets, spending limits, overruns, or cost controls.\n- The user wants a cost breakdown by project, tool, session, model, or date.\n- The user wants to compare today against yesterday or inspect a recent trend.\n- The user asks for a CSV export of recent usage records.\n\n## How It Works\n\nFirst verify prerequisites:\n\n```bash\ncommand -v sqlite3 >\u002Fdev\u002Fnull && echo \"sqlite3 available\" || echo \"sqlite3 missing\"\ntest -f ~\u002F.claude-cost-tracker\u002Fusage.db && echo \"Database found\" || echo \"Database not found\"\n```\n\nIf the database is missing, do not fabricate usage data. Tell the user that cost\ntracking is not configured and suggest installing or enabling a trusted local\ncost-tracking hook\u002Fplugin.\n\nThe expected `usage` table usually contains one row per tool call or model\ninteraction. Column names vary by tracker, but the examples below assume:\n\n| Column | Meaning |\n| --- | --- |\n| `timestamp` | ISO timestamp for the usage event |\n| `project` | Project or repository name |\n| `tool_name` | Tool or event name |\n| `input_tokens` | Input token count, when recorded |\n| `output_tokens` | Output token count, when recorded |\n| `cost_usd` | Precomputed cost in USD |\n| `session_id` | Claude Code session identifier |\n| `model` | Model used for the event |\n\nPrefer `cost_usd` over hand-calculating pricing. Model prices and cache pricing\nchange over time, and the tracker should be the source of truth for how each row\nwas priced.\n\n## Examples\n\n### Quick Summary\n\n```bash\nsqlite3 ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT\n    'Today: $' || ROUND(COALESCE(SUM(CASE WHEN date(timestamp) = date('now') THEN cost_usd END), 0), 4) ||\n    ' | Total: $' || ROUND(COALESCE(SUM(cost_usd), 0), 4) ||\n    ' | Calls: ' || COUNT(*) ||\n    ' | Sessions: ' || COUNT(DISTINCT session_id)\n  FROM usage;\n\"\n```\n\n### Cost By Project\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY project\n  ORDER BY cost DESC;\n\"\n```\n\n### Cost By Tool\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT tool_name, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY tool_name\n  ORDER BY cost DESC;\n\"\n```\n\n### Last Seven Days\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT date(timestamp) AS date, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls\n  FROM usage\n  GROUP BY date(timestamp)\n  ORDER BY date DESC\n  LIMIT 7;\n\"\n```\n\n### Session Drilldown\n\n```bash\nsqlite3 -header -column ~\u002F.claude-cost-tracker\u002Fusage.db \"\n  SELECT session_id,\n    MIN(timestamp) AS started,\n    MAX(timestamp) AS ended,\n    ROUND(SUM(cost_usd), 4) AS cost,\n    COUNT(*) AS calls\n  FROM usage\n  GROUP BY session_id\n  ORDER BY started DESC\n  LIMIT 10;\n\"\n```\n\n## Reporting Guidance\n\nWhen presenting cost data, include:\n\n1. Today's spend and yesterday comparison.\n2. Total spend across the tracked database.\n3. Top projects ranked by cost.\n4. Top tools ranked by cost.\n5. Session count and average cost per session when enough data exists.\n\nFor small amounts, format currency with four decimal places. For larger amounts,\ntwo decimals are enough.\n\n## Anti-Patterns\n\n- Do not estimate costs from raw token counts when `cost_usd` is present.\n- Do not assume the database exists without checking.\n- Do not run unbounded `SELECT *` exports on large databases.\n- Do not hard-code current model pricing in user-facing answers.\n- Do not recommend installing unreviewed hooks or plugins that execute arbitrary\n  code.\n\n## OpenRouter generation ids (sidecar)\n\nClaude SQLite rows in `~\u002F.claude-cost-tracker\u002Fusage.db` do **not** include OpenRouter sidecar calls. Label the source when mixing numbers.\n\nOpenRouter chat completions return a generation `id`. After the call, `GET https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\u002Fgeneration?id=\u003Cgeneration_id>` (same env credential, never log it) returns `total_cost`, token counts, model, and provider. Cost may lag a second or two; retry a few times on 404.\n\nProbe (prints generation id + usage, never the secret):\n\n```powershell\nC:\\Python314\\python.exe C:\\Users\\Prekzursil\\.agents\\scripts\\openrouter-complete.py --show-limits --prompt \"Reply with the single word: pong\"\n```\n\nDo not hard-code OpenRouter unit prices in answers; prefer the generation endpoint's `total_cost`. Per-key remaining cap is `GET \u002Fapi\u002Fv1\u002Fkey` → `limit_remaining` (see skill `openrouter-routing`).\n\nFree-path Wave 0 smoke (2026-08-27): `liquid\u002Flfm-2.5-2.6b:free` id `gen-1787793797-2WelxSMIM1z6ZjFYfWFv` and `openrouter\u002Ffree` → `nvidia\u002Fnemotron-3.5-lightning:free` id `gen-1787793804-F2TQPdT2frdTAk6BC3FR` both settled at `total_cost=0` after an initial `GET \u002Fgeneration` 404 lag. Paid `deepseek\u002Fdeepseek-v4-flash-0731` remains 402 until credits are added.\n\n## Related\n\n- `\u002Fcost-report` - Command-form report using the same database.\n- `cost-aware-llm-pipeline` - Model-routing and budget-design patterns.\n- `token-budget-advisor` - Context and token-budget planning.\n- `strategic-compact` - Context compaction to reduce repeated token spend.\n- `openrouter-routing` - T0\u002FT1\u002FT2 sidecar, spend-cap checklist, generation-id probe.\n",{"name":5,"origin":29,"description":7},"main","a298c929b6cbd662e1fce54302ce520d5ceea1a5",".agents\u002Fskills\u002Fcost-tracking","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill cost-tracking",{"tool":51,"command":52},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill cost-tracking",{"tool":54,"command":55},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill cost-tracking","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcost-tracking\u002FSKILL.md",true,[],[60,81,110,137,149,164],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":34},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[67,68,69,70,71,72,73,74,75,28,76,77,78,79,80],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","context","repo","injection","execution","file",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":92,"publishedAt":34},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[93,94,95,96,97,98,25,99,100,101,102,103,104,105,28,106,107,30,108,109],"openmm md","how","decision","pick","linux","analyze","stack","open","NVIDIA","gpu","license","workflow","windows","free","molecular dynamics","do","MCP",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":122,"publishedAt":34},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[116,119],{"categoryNo":117,"categoryName":118,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":120,"categoryName":121,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000008","测试与质量",[123,124,125,126,127,128,129,130,131,132,94,133,134,135,136],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":34},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[139,144,23,31,145,146,147,148],"setup","installation","project setup","issues","state",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":156,"publishedAt":34},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[155],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},[151,157,72,158,159,160,28,26,161,162,163],"start issue","issue","ready","work on issue","work","work on","development",{"skillNo":165,"name":144,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":34},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[144,31,30,170,146,171],"files","interactive"]