Skip to content
Back to skills

Cocometer

ASecurity

Generate a full CocoMeter usage report for the current session and optionally the last N sessions. Includes per-model breakdown, per-action costs, and total token consumption.

  • 724 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
ai-agents

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add Snowflake-Labs/cocoplus --skill cocometer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cocometer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cocometer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/snowflake-labs-cocometer-63bfa6b6/badge)](https://www.skillsdirectory.com/skills/snowflake-labs-cocometer-63bfa6b6)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "meter-report"
description: "Generate a full CocoMeter usage report for the current session and optionally the last N sessions. Includes per-model breakdown, per-action costs, and total token consumption."
version: "1.0.0"
author: "CocoPlus"
tags:
  - cocoplus
  - cocometer
  - reporting
---

Your objective is to generate a CocoMeter usage report.

## Pre-flight Check

Check that `.cocoplus/` directory exists. If not, output:
"CocoPlus not initialized in this directory. Run `$pod init` to begin."
Then stop.

## Read Session Data

1. Read `.cocoplus/meter/current-session.json` if it exists.
2. Read `.cocoplus/meter/history.jsonl` — parse last 10 sessions (or all if fewer).

If no meter data exists at all, output:
"No CocoMeter data found. Use `$meter on` to enable tracking, then use `$meter` to see current usage."
Then stop.

## Generate Report

Output a structured report:

```
═══════════════════════════════════════
  CocoMeter Usage Report
═══════════════════════════════════════

CURRENT SESSION
───────────────
Status:     <Active | Inactive>
Session ID: <id>
Started:    <timestamp>
Duration:   <X minutes>

Token Usage:
  Input:    <n> tokens
  Output:   <n> tokens
  Total:    <n> tokens

Tool Activity:
  Tool calls: <n>
  Top tools:  <tool: count, ...>

Model Breakdown:
  <model>: <input_tokens> in / <output_tokens> out (<n> calls)
  ...

ACTIONS LOG (last 10)
─────────────────────
  <HH:MM> [<model>] <action>: <in>→<out> tokens
  ...

SESSION HISTORY (last 5 sessions)
──────────────────────────────────
  <date>  <duration>m  <total_tokens> tokens  <tool_calls> calls
  ...

TOTALS (all recorded sessions)
───────────────────────────────
  Sessions tracked:  <n>
  Total tokens:      <n>
  Total tool calls:  <n>
  Avg tokens/session:<n>
═══════════════════════════════════════
```

## Cost Estimates (Optional)

If Snowflake Cortex token pricing is available in project context, append:
```
ESTIMATED COST
──────────────
Note: Estimates based on published Cortex token pricing.
Actual billing may differ.

  Current session: ~$<amount>
  All sessions:    ~$<amount>
```

Otherwise omit the cost section and note:
"Cost estimation requires Snowflake Cortex pricing data. Check your Snowflake account for actual billing."

## Anti-Rationalization

| Shortcut / Temptation | Why It Fails |
|-----------------------|--------------|
| Show only current session and skip history | Developers need cross-session trends to understand cost patterns; single-session view misses cumulative impact |
| Fabricate cost estimates when pricing data is absent | Invented cost numbers are worse than no numbers — always omit the cost section if pricing data is unavailable |

## Exit Criteria

- [ ] Report includes CURRENT SESSION block with status, token usage, tool activity, and model breakdown
- [ ] Report includes SESSION HISTORY block showing last 5 sessions in tabular form
- [ ] TOTALS block with cumulative sessions, tokens, and tool calls is shown
- [ ] If pricing data is available, an ESTIMATED COST section is included; if not, an explanatory note replaces it

Files in this skill

  • archetype-classifier.skill.md1.5 KB
  • chargeback-refresh.skill.md1.5 KB
  • cost-center-resolver.skill.md1.5 KB
  • invoice-generator.skill.md1.5 KB
  • meter-accuracy.skill.md2.3 KB
  • meter-benchmark.skill.md1.3 KB
  • meter-chargeback.skill.md3.2 KB
  • meter-compare.skill.md4.1 KB
  • meter-estimate.skill.md3.4 KB
  • meter-history.skill.md1.9 KB
  • meter-invoice.skill.md1.5 KB
  • meter-off.skill.md2.3 KB
  • meter-on.skill.md2.3 KB
  • meter-reconcile.skill.md4.1 KB
  • meter-refresh.skill.md1.5 KB
  • meter-report.skill.md3.5 KB
  • meter-status.skill.md1.5 KB
  • meter-sync.skill.md2 KB
  • meter-verify.skill.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…