Skip to content
Conduit

skill

agentic-commons

Privacy-first AI usage analytics across 6+ coding tools. Local-first — your prompts never leave your machine.

Phlegonlabs/agentic-commonscommunitylistedunreviewed

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/Phlegonlabs/agentic-commons itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 27, 2026

Track token usage across Claude Code, Codex CLI, OpenCode, Gemini CLI, and more. Local-first collection, verifiable aggregation, optional cloud sync. Your prompts never leave your machine.

     

npm version npm downloads GitHub stars TypeScript License: MIT

English | 简体中文 | 繁體中文


📑 Quick Navigation

SectionDescription
Quick StartInstall in 2 minutes
CLI CommandsFull command reference
Claude Code SkillUse inside Claude Code directly
Supported ToolsClaude, Codex, Gemini, and more
Privacy BoundaryWhat's uploaded vs. what stays local
External CLI ImportFeed usage from any tool
Local DevelopmentBuild from source

🚀 Quick Start

macOS / Linux:

npm i -g agentic-commons
acommons setup
acommons doctor

Windows:

npm i -g agentic-commons
acommons setup
acommons doctor

After setup, automatic sync is enabled (launchd hourly on macOS, schtasks on Windows, crontab on Linux).

Manual sync (optional):

acommons sync

Requirements: Node.js >= 20, npm >= 10


🛠 CLI Commands

CommandDescription
acommons setupFirst-time setup (hook, scheduler, scripts)
acommons doctorHealth check and diagnostics
acommons syncCollect + upload pipeline
acommons statsToday's usage summary
acommons daily14-day daily breakdown
acommons modelsPer-model token usage
acommons totalAll-time aggregated summary
acommons reportGenerate HTML usage report
acommons watchWatch mode
acommons linkDevice OAuth authentication
acommons updateUpdate to latest version

🎯 Claude Code Skill

No CLI install required — use /acommons directly inside Claude Code.

npx skills add Phlegonlabs/agentic-commons --skill acommons -g -y

The skill reads local data directly and includes a Stop hook for automatic token ledger updates on session end.

CommandDescription
/acommonsShow today's usage (default: stats)
/acommons daily14-day daily breakdown
/acommons modelsPer-model token usage
/acommons totalAll-time summary
/acommons syncRun collect + upload pipeline
/acommons setupFirst-time setup
/acommons linkDevice OAuth authentication
/acommons doctorHealth check and diagnostics
/acommons probeDetect all installed AI tools
/acommons reportGenerate HTML usage report

🤖 Supported Tools

ToolConfig DirData SourceStatus
Claude Code~/.claudestats-cache.json + ledgerFull
Codex CLI~/.codexsessions/*.jsonl + ledgerFull
OpenCode~/.local/share/opencodeopencode.dbFull
Gemini CLI~/.geminisession-*.jsonFull
Cursor~/.cursorProbe detectionDetect
Windsurf~/.codeiumProbe detectionDetect
Aider~/.aiderProbe detectionDetect
Goose~/.config/gooseProbe detectionDetect
Amp~/.config/ampProbe detectionDetect
Kimi CLI~/.kimiProbe detectionDetect
Kiro~/.kiroProbe detectionDetect
External~/.agentic-commons/external-usage/*.jsonl drop-inFull

Full = token-level analytics. Detect = acommons probe recognizes the tool.


🔒 Privacy Boundary

Your prompts never leave your machine. Only aggregated stats are uploaded.

UploadedNever Uploaded
date, source, modelPrompt / message content
input_uncached, outputTranscript text and reasoning blocks
cached_read, cached_write, total_ioFile paths and repository names
Raw session logs

📦 External CLI Auto-Import

Drop event logs into ~/.agentic-commons/external-usage/*.jsonl and acommons sync will auto-scan and aggregate them.

Minimal event shape:

{
  "timestamp": "2026-02-19T16:55:00Z",
  "source": "opencode",
  "provider": "openai",
  "model": "gpt-5.1-codex-mini",
  "usage": { "prompt_tokens": 1200, "completion_tokens": 320 }
}
FormatFields
Normalizedinput_uncached, output, cached_read, cached_write
Anthropicinput_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens
GeminiusageMetadata.promptTokenCount, usageMetadata.candidatesTokenCount

Quick test:

mkdir -p ~/.agentic-commons/external-usage
cat >> ~/.agentic-commons/external-usage/opencode.jsonl <<'JSON'
{"timestamp":"2026-02-19T17:20:00Z","source":"opencode","provider":"openai","model":"gpt-5.1-codex-mini","usage":{"prompt_tokens":1200,"completion_tokens":300}}
JSON
acommons doctor   # verify detection
acommons sync     # upload

🔧 Local Development

git clone https://github.com/Phlegonlabs/agentic-commons.git
cd agentic-commons
npm install
npm run build:cli
npm run typecheck -w @agentic-commons/shared

📞 Support

ChannelLink
Usage QuestionsGitHub Issues
Feature RequestsGitHub Issues
Security ReportsGitHub Security Advisories (private)

MIT License · Phlegonlabs — Private-by-design AI usage analytics

↑↓ navigate openesc close