# Meter Off

Disable CocoMeter token tracking.

- Repository: https://github.com/Snowflake-Labs/cocoplus (727 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-04
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Snowflake-Labs/cocoplus --skill meter-off -g -a claude-code -y`
Codex: `npx skills add Snowflake-Labs/cocoplus --skill meter-off -g -a codex -y`
Cursor: `npx skills add Snowflake-Labs/cocoplus --skill meter-off -g -a cursor -y`
Gemini CLI: `npx skills add Snowflake-Labs/cocoplus --skill meter-off -g -a gemini-cli -y`

## Description

Disable CocoMeter token tracking. Finalizes the current session record and appends to history. Does not delete history, just stops active tracking.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Your objective is to disable CocoMeter token tracking.

## Pre-flight Check

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

## Check Current State

Check if `.cocoplus/meter/current-session.json` exists with `"metering_active": true`.

If metering is NOT active, output:
"CocoMeter is not currently active. Use `$meter on` to enable tracking."
Then stop.

## Finalize Session

1. Read `.cocoplus/meter/current-session.json`.

2. Update the record:
   - Set `"metering_active": false`
   - Set `"ended_at": "<ISO 8601 timestamp>"`
   - Compute `"duration_minutes"` from started_at to now

3. Append the finalized record to `.cocoplus/meter/history.jsonl` (one JSON object per line).

4. Reset `.cocoplus/meter/current-session.json` to inactive state:
```json
{
  "session_id": null,
  "metering_active": false,
  "input_tokens": 0,
  "output_tokens": 0,
  "tool_calls": 0
}
```

## Confirm Deactivation

Output session summary:
```
CocoMeter disabled.

Session Summary:
- Duration: <X> minutes
- Input tokens: <n>
- Output tokens: <n>
- Tool calls: <n>
- Top models: <model: count>

Session saved to .cocoplus/meter/history.jsonl
Use `$meter history` to review past sessions.
```

## Anti-Rationalization

| Shortcut / Temptation | Why It Fails |
|-----------------------|--------------|
| Skip appending to history.jsonl and just reset current-session.json | The session record is lost forever if not appended to history before reset, there is no recovery path |
| Mark `metering_active: false` without computing duration | Duration is part of the history record; a missing duration makes the history row incomplete and the totals wrong |

## Exit Criteria

The rest: https://github.com/Snowflake-Labs/cocoplus/blob/HEAD/.cortex/skills/cocometer/meter-off/SKILL.md
