[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F978ZXCYDW19JHZS6TWF6M":3,"skill-same:01M7F978ZXCYDW19JHZS6TWF6M":49},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7F978ZXCYDW19JHZS6TWF6M","cost-tracking",null,"Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.","siddu1004\u002FSFP","siddu1004","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F260113491?v=4","01M7F8W1SAJAR49097VRTE1TW5","Siddhardh Vanguri","01M7F8W1SYGY7JE15AHAECCT9R",5,"MIT","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fagent-dev\u002Fskills\u002Fcost-tracking\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: cost-tracking\ndescription: Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.\nmetadata:\n  origin: community\n---\n\n# Cost Tracking\n\nUse this skill to analyze Claude Code cost and usage history from the metrics log\nthat ECC's `stop:cost-tracker` hook writes.\n\n## Where the data lives\n\nThe tracker appends one JSON object per session-stop to\n`~\u002F.claude\u002Fmetrics\u002Fcosts.jsonl`. Each row is a **cumulative snapshot for that\nsession**, so to total spend you take the **latest row per `session_id`** and\nsum across sessions — summing every row multiply-counts.\n\nECC also maintains internal per-session files under\n`~\u002F.claude\u002Fmetrics\u002Fcost-snapshots\u002F` so runtime hooks can read the current\nsession total without rescanning all history. Treat those files as a\nrebuildable cache; each snapshot stores a byte cursor so only newly appended\nrows are scanned. Stable reads are O(1), while updates are O(new bytes). Stale\nentries are pruned after 30 days or when the directory exceeds 512 sessions.\nCold catch-up work is limited to 16 MiB per hook invocation, and malformed\nunterminated rows larger than 1 MiB are discarded with a resumable cursor.\nReports and exports should continue to use `costs.jsonl`.\n\nRow schema:\n\n| Field | Meaning |\n| --- | --- |\n| `timestamp` | ISO timestamp of the snapshot |\n| `session_id` | Claude Code session identifier |\n| `transcript_path` | Path to the session transcript |\n| `model` | Model used |\n| `input_tokens` \u002F `output_tokens` | Token counts |\n| `cache_write_tokens` \u002F `cache_read_tokens` | Prompt-cache token counts |\n| `estimated_cost_usd` | Precomputed cumulative cost in USD for the session |\n\nPrefer `estimated_cost_usd` over hand-calculating pricing — model and cache\nprices change, and the tracker is the source of truth.\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 model, session, or date, or a CSV export.\n\n## How It Works\n\nFirst verify the log exists (use `node`, not `sqlite3` — the tracker writes\nJSONL, and `node` is cross-platform):\n\n```bash\nnode -e 'const fs=require(\"fs\"),os=require(\"os\"),p=require(\"path\");const f=p.join(os.homedir(),\".claude\",\"metrics\",\"costs.jsonl\");console.log(fs.existsSync(f)?\"cost log found\":\"cost log not found: \"+f)'\n```\n\nIf the log is missing, do not fabricate usage data. Tell the user that cost\ntracking populates after the first session ends with the `stop:cost-tracker`\nhook enabled.\n\n## Example — summary, by model, last 7 days\n\n```bash\nnode -e '\nconst fs=require(\"fs\"),os=require(\"os\"),path=require(\"path\");\nconst f=path.join(os.homedir(),\".claude\",\"metrics\",\"costs.jsonl\");\nif(!fs.existsSync(f)){console.log(\"cost log not found: \"+f);process.exit(0);}\nconst rows=fs.readFileSync(f,\"utf8\").split(\u002F\\r?\\n\u002F).filter(Boolean).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(Boolean);\nconst bySession=new Map();\nfor(const r of rows){const k=r.session_id||r.transcript_path||r.timestamp;const p=bySession.get(k);if(!p||String(r.timestamp)>String(p.timestamp))bySession.set(k,r);}\nconst latest=[...bySession.values()];\nconst cost=r=>Number(r.estimated_cost_usd)||0, day=r=>String(r.timestamp||\"\").slice(0,10), sum=a=>a.reduce((s,r)=>s+cost(r),0), f4=n=>\"$\"+n.toFixed(4);\nconst today=new Date().toISOString().slice(0,10), yest=new Date(Date.now()-864e5).toISOString().slice(0,10);\nconsole.log(\"today: \"+f4(sum(latest.filter(r=>day(r)===today)))+\" | yesterday: \"+f4(sum(latest.filter(r=>day(r)===yest)))+\" | total: \"+f4(sum(latest))+\" (\"+latest.length+\" sessions)\");\nconst m=new Map();for(const r of latest){const k=r.model||\"(unknown)\";m.set(k,(m.get(k)||0)+cost(r));}\nconsole.log(\"by model:\");[...m.entries()].sort((a,b)=>b[1]-a[1]).forEach(([k,v])=>console.log(\"  \"+f4(v)+\"  \"+k));\n'\n```\n\nFor a session drilldown or CSV export, iterate the same `latest` set (or the raw\nrows for CSV) and print the fields you need.\n\n## Reporting Guidance\n\nWhen presenting cost data, include today's spend vs yesterday, total across all\nsessions, a by-model breakdown, and session count. Format sub-dollar amounts\nwith four decimals, larger amounts with two.\n\n## Anti-Patterns\n\n- Do not sum every row — they are cumulative per session; reduce to the latest\n  row per `session_id` first.\n- Do not estimate costs from raw token counts when `estimated_cost_usd` is present.\n- Do not assume the log exists without checking.\n- Do not hard-code current model pricing in user-facing answers.\n- Do not recommend installing unreviewed hooks or plugins that execute arbitrary code.\n\n## Related\n\n- `\u002Fcost-report` - Command-form report over the same metrics log.\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","# Cost Tracking\n\nUse this skill to analyze Claude Code cost and usage history from the metrics log\nthat ECC's `stop:cost-tracker` hook writes.\n\n## Where the data lives\n\nThe tracker appends one JSON object per session-stop to\n`~\u002F.claude\u002Fmetrics\u002Fcosts.jsonl`. Each row is a **cumulative snapshot for that\nsession**, so to total spend you take the **latest row per `session_id`** and\nsum across sessions — summing every row multiply-counts.\n\nECC also maintains internal per-session files under\n`~\u002F.claude\u002Fmetrics\u002Fcost-snapshots\u002F` so runtime hooks can read the current\nsession total without rescanning all history. Treat those files as a\nrebuildable cache; each snapshot stores a byte cursor so only newly appended\nrows are scanned. Stable reads are O(1), while updates are O(new bytes). Stale\nentries are pruned after 30 days or when the directory exceeds 512 sessions.\nCold catch-up work is limited to 16 MiB per hook invocation, and malformed\nunterminated rows larger than 1 MiB are discarded with a resumable cursor.\nReports and exports should continue to use `costs.jsonl`.\n\nRow schema:\n\n| Field | Meaning |\n| --- | --- |\n| `timestamp` | ISO timestamp of the snapshot |\n| `session_id` | Claude Code session identifier |\n| `transcript_path` | Path to the session transcript |\n| `model` | Model used |\n| `input_tokens` \u002F `output_tokens` | Token counts |\n| `cache_write_tokens` \u002F `cache_read_tokens` | Prompt-cache token counts |\n| `estimated_cost_usd` | Precomputed cumulative cost in USD for the session |\n\nPrefer `estimated_cost_usd` over hand-calculating pricing — model and cache\nprices change, and the tracker is the source of truth.\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 model, session, or date, or a CSV export.\n\n## How It Works\n\nFirst verify the log exists (use `node`, not `sqlite3` — the tracker writes\nJSONL, and `node` is cross-platform):\n\n```bash\nnode -e 'const fs=require(\"fs\"),os=require(\"os\"),p=require(\"path\");const f=p.join(os.homedir(),\".claude\",\"metrics\",\"costs.jsonl\");console.log(fs.existsSync(f)?\"cost log found\":\"cost log not found: \"+f)'\n```\n\nIf the log is missing, do not fabricate usage data. Tell the user that cost\ntracking populates after the first session ends with the `stop:cost-tracker`\nhook enabled.\n\n## Example — summary, by model, last 7 days\n\n```bash\nnode -e '\nconst fs=require(\"fs\"),os=require(\"os\"),path=require(\"path\");\nconst f=path.join(os.homedir(),\".claude\",\"metrics\",\"costs.jsonl\");\nif(!fs.existsSync(f)){console.log(\"cost log not found: \"+f);process.exit(0);}\nconst rows=fs.readFileSync(f,\"utf8\").split(\u002F\\r?\\n\u002F).filter(Boolean).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(Boolean);\nconst bySession=new Map();\nfor(const r of rows){const k=r.session_id||r.transcript_path||r.timestamp;const p=bySession.get(k);if(!p||String(r.timestamp)>String(p.timestamp))bySession.set(k,r);}\nconst latest=[...bySession.values()];\nconst cost=r=>Number(r.estimated_cost_usd)||0, day=r=>String(r.timestamp||\"\").slice(0,10), sum=a=>a.reduce((s,r)=>s+cost(r),0), f4=n=>\"$\"+n.toFixed(4);\nconst today=new Date().toISOString().slice(0,10), yest=new Date(Date.now()-864e5).toISOString().slice(0,10);\nconsole.log(\"today: \"+f4(sum(latest.filter(r=>day(r)===today)))+\" | yesterday: \"+f4(sum(latest.filter(r=>day(r)===yest)))+\" | total: \"+f4(sum(latest))+\" (\"+latest.length+\" sessions)\");\nconst m=new Map();for(const r of latest){const k=r.model||\"(unknown)\";m.set(k,(m.get(k)||0)+cost(r));}\nconsole.log(\"by model:\");[...m.entries()].sort((a,b)=>b[1]-a[1]).forEach(([k,v])=>console.log(\"  \"+f4(v)+\"  \"+k));\n'\n```\n\nFor a session drilldown or CSV export, iterate the same `latest` set (or the raw\nrows for CSV) and print the fields you need.\n\n## Reporting Guidance\n\nWhen presenting cost data, include today's spend vs yesterday, total across all\nsessions, a by-model breakdown, and session count. Format sub-dollar amounts\nwith four decimals, larger amounts with two.\n\n## Anti-Patterns\n\n- Do not sum every row — they are cumulative per session; reduce to the latest\n  row per `session_id` first.\n- Do not estimate costs from raw token counts when `estimated_cost_usd` is present.\n- Do not assume the log exists without checking.\n- Do not hard-code current model pricing in user-facing answers.\n- Do not recommend installing unreviewed hooks or plugins that execute arbitrary code.\n\n## Related\n\n- `\u002Fcost-report` - Command-form report over the same metrics log.\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",{"name":5,"metadata":24,"description":7},{"origin":25},"community","main","15fa5201935d2b1d172b4e61c2360c908d876d20","plugins\u002Fagent-dev\u002Fskills\u002Fcost-tracking",0,"https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fsfp-hive","https:\u002F\u002Fgithub.com\u002Fsiddu1004","I am a student at Amrita Vishwa Vidyapeetham pursuing my BTECH degree in Electronics and Electrical Engineering (2024-2028).","2026-11-09 16:04:40",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add siddu1004\u002FSFP --skill cost-tracking",{"tool":41,"command":42},"bunx","bunx skills add siddu1004\u002FSFP --skill cost-tracking",{"tool":44,"command":45},"pnpm","pnpm dlx skills add siddu1004\u002FSFP --skill cost-tracking","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fagent-dev\u002Fskills\u002Fcost-tracking\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7FEEDADZBNBVY19H3XZKCBQ","scientific-schematics","Generates scientific diagram drafts using Nano Banana 2 AI with smart iterative refinement. Uses Gemini 3.7 Flash for quality review. Refines when the review requests improvement, with at most two generations. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fscientific-schematics\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7FEE0JS04FE58MST48D0MMC","polyhaven-texture-apply","Apply realistic PBR textures from PolyHaven to any Blender object. Supports metals, wood, concrete, fabric, and more. Trigger when asked to texture an object, apply a material from PolyHaven, make something look like metal\u002Fwood\u002Fmarble, or change object surface.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-texture-apply\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7FEDJRWV194TY411WVRS84W","polyhaven-studio-setup","Set up a professional product photography studio in Blender using PolyHaven HDRIs and PBR ground materials. Trigger when asked to create a studio setup, add HDRI lighting, set up product photography, or create a showroom scene.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-studio-setup\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7FED5H2FGS50XGETMGSM0RV","polyhaven-scene-builder","Build complete product scenes using PolyHaven assets — HDRI environment, textured ground\u002Fpedestal, and optional props from the 3D model library. Trigger when asked to build a product scene, create a showcase setup, add a pedestal, or compose a product shot.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-scene-builder\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7FECSNZ2CJA7Z8TPE5R844R","polyhaven-material-swap","Cycle through multiple PolyHaven materials on a product and render each variant. Great for showing color\u002Ffinish options. Trigger when asked to show material variants, swap textures, create color options, show finish comparisons, or render product in different materials.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-material-swap\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7FECBPQ6YWH48PYAMS0C5CE","polyhaven-hdri-showcase","Render the same product across multiple HDRI environments and output a comparison grid. Trigger when asked to compare lighting setups, test different environments, show product in multiple settings, or create an HDRI comparison.","https:\u002F\u002Fgithub.com\u002Fsiddu1004\u002FSFP\u002Fblob\u002Fmain\u002Fplugins\u002Fscience-hardware\u002Fskills\u002Fpolyhaven-hdri-showcase\u002FSKILL.md",[],[]]