Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokenPolice skills for coding agents

TokenPolice shows what every user, plan, session and workflow costs your AI product, and caps it before the next LLM call. This repository holds the skills that let your coding agent do the SDK integration for you.

Skill What it does
token-police-sdk Integrates the TokenPolice SDK (Python or Node.js) into your app. It reads your code, asks you a few questions, shows you a plan, wires the SDK, and proves the integration works. You write no integration code.

Install

Claude Code

claude plugin marketplace add tokenpolice/skills
claude plugin install tokenpolice@tokenpolice

The skill loads the next time you start Claude Code. If a session is already open in another terminal, run /reload-plugins there. No GitHub SSH key on this machine? Set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 for both commands (export it, or prefix each) — Claude Code clones owner/repo marketplaces over SSH by default.

Cursor, GitHub Copilot, OpenAI Codex, Google Antigravity

npx skills add tokenpolice/skills -y

Run it at the root of your repo. It writes the skill to .agents/skills/token-police-sdk/ plus a skills-lock.json at the repo root, and — depending on which agents it detects on your machine — a symlink to it from that agent's own folder, such as .claude/skills/token-police-sdk. Commit everything it reports; the lock file is designed to be checked in. Drop -y and it prompts for scope (Project, or Global — under your home directory instead of the repo) and lets you pick agents when it cannot tell which one you use. skills is a third-party CLI by Vercel Labs; set DISABLE_TELEMETRY=1 to opt out of its usage telemetry.

Manual (any agent)

Run at the root of your repo:

mkdir -p .agents/skills
curl -fsSL https://github.com/tokenpolice/skills/archive/refs/heads/main.tar.gz \
  | tar -xzf - -C .agents/skills --strip-components=2 skills-main/skills/token-police-sdk

For Claude Code use .claude/skills in both lines.

Use it

You need a TokenPolice API key (a show-once tp_sk_… key from app.tokenpolice.ai/keys). Then, in your project, tell the agent:

Integrate TokenPolice into this app.

The agent reads your repo, finds your LLM calls and where your user, plan and session values live, asks for your API key, and shows you a plan. It changes nothing until you say yes. It wires the SDK in dry-run mode by default (nothing is blocked until you choose to enforce), you run your app once, and it checks that TokenPolice received the data. Walkthrough: tokenpolice.ai/docs/get-started/coding-agent/walkthrough.

Update

  • Claude Code: claude plugin marketplace update tokenpolice && claude plugin update tokenpolice@tokenpolice
  • npx skills: npx skills update token-police-sdk -y
  • Manual: run the manual commands again.

Layout

  • .claude-plugin/ — the Claude Code plugin marketplace and plugin manifest (plugin tokenpolice).
  • skills/<name>/ — one folder per skill in the Agent Skills format: SKILL.md plus a references/ folder the skill links to. Copy the whole folder, not just SKILL.md.

Contributing and security

Issues and pull requests are welcome; see CONTRIBUTING.md. Security reports: SECURITY.md.

License

Apache-2.0. See LICENSE.

About

TokenPolice skills for coding agents (Claude Code plugin marketplace + Agent Skills)

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors