setup

A setup command for Carbonlog, a plugin that tracks coding sessions and can sync them for a team. It checks existing configuration, offers to start fresh or import old sessions, and asks for a team name.

In plain words
What is it for?
Use it to configure Carbonlog, optionally import earlier session records from transcript files, and set the team and project details it needs.
Why use it?
It guides first-time configuration and avoids overwriting an existing setup without showing the current settings first.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cnaught-inc/claude-code-plugins/setup
Clone the repo
git clone --depth 1 https://github.com/CNaught-Inc/claude-code-plugins
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 848 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00848
Opus 5 $0.00000 $0.00424
Sonnet 5 $0.00000 $0.00170
Haiku 4.5 $0.00000 $0.00085

Measured yesterday against content hash c8700ab5c854, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Configure `~/.claude/settings.json` to enable the CO₂ statusline (active across all projects)
plugins/carbonlog/commands/setup.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/carbonlog:setup

Set up the CNaught Carbonlog plugin.

Instructions

Follow these steps in order:

Step 0: Check for existing setup

Run the setup check script to see if the plugin has already been set up:

npx -y bun ${CLAUDE_PLUGIN_ROOT}/src/scripts/carbonlog-setup-check.ts

This outputs JSON. If isSetup is true, the plugin has already been configured. Show the user their current configuration:

  • When they first set up (installedAt)
  • Whether sync is enabled and their team name
  • Their project ID
  • Whether the statusline is active

Then ask the user what they'd like to do:

  • Reconfigure — walk through the full setup again (continue to Step 1)
  • Nothing — everything is already set up, exit

If isSetup is false, this is a first-time setup — proceed to Step 1.

Step 1: Ask about historical sessions

Ask the user whether they want to:

  • Start fresh — only track new sessions going forward
  • Backfill — process all previous Claude Code sessions from transcript files on disk

Step 2: Ask for team name

Ask the user for their team name (free text, required). Tell them that this should usually be something like their company or organization name. This is used to group users into teams and identify their sessions. They cannot skip this. DO NOT use the AskUserQuestion tool here since they have to provide an input.

Step 3: Ask about anonymous tracking

Ask the user whether they want to enable anonymous carbon tracking with CNaught:

  • Enable — session metrics (token counts, CO₂, energy, project ID) will be synced to CNaught's API. No code, conversations, or personal information is shared. (default)
  • Disable — all data stays local only

Step 4: Run the setup script

Build the command with the appropriate flags based on the user's choices:

  • Always include --team "Their Team"
  • Add --backfill if the user chose to backfill historical sessions
  • Add --disable-sync if the user chose to disable anonymous tracking

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 82 lines · 0 tokens per session scan B c8700ab5c854

Subscribe to this mod's changes

setup is a command published in the GitHub repository CNaught-Inc/claude-code-plugins (5 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 848 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.