claude-code-tokscope
CLAUDE.md1 starsChanged 25 days agoApache-2.0View on GitHub
Token usage per skill, subagent and phase for Claude Code: a stdlib Python CLI, an HTML report, a local dashboard and an Electron desktop app. Features: PRODUCT.md. Install and run: README.md. Tasks: GitHub issues. tokscope/: cli.py (entry), paths.py, assets/, core/ (transcripts to SQLite), features/, integrations/ (ant, MCP Registry), experiments/ (paid claude -p runs), web/ (dashboard/: pages/ one module per page, scripts, shell, server; report/: sections/, styles, scripts, widgets, writer) and web/theme/. core never imports the others and only cli and…
- Commits and pushes
In this repositoryOne other file it gives its agents.
- factorySkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Before the final response of every session, update STATUS.md, and commit it with the session's work:
- Distinctive: line 44
Keep it under 40 lines and never rename or remove the frontmatter keys (a scanner parses them).
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
claude-code-tokscope
Token usage per skill, subagent and phase for Claude Code: a stdlib Python CLI, an HTML report, a local dashboard and an Electron desktop app. Features: PRODUCT.md. Install and run: README.md. Tasks: GitHub issues.
bin/tokscope serve # http://127.0.0.1:8765 (--port N), no install needed
python3 -m unittest discover -s tests -q # testsCode layout
tokscope/: cli.py (entry), paths.py, assets/, core/ (transcripts to SQLite), features/, integrations/ (ant,
MCP Registry), experiments/ (paid claude -p runs), web/ (dashboard/: pages/ one module per page, scripts, shell,
server; report/: sections/, styles, scripts, widgets, writer) and web/theme/. core never imports the others and
only cli and web import web (tests/test_layout.py). Why: docs/research-package-layout.md.
Rules
- Minimize tokens. Behavior rules: .claude/rules/behavior.md.
- UI PRs show screenshots. A PR that changes what the owner sees (markup, CSS or page script in
tokscope/web/report/ortokscope/web/dashboard/) shows before (main) and after at 1440 and 375 px, and a pass/fail table against the issue's "Done when". Steps: uat.md. Fix a screenshot problem without asking when this PR caused it or it fails Done-when; ask about one that is also onmain. - Review every PR (outside
/factory, unless the owner says skip): run/code-review:code-review <PR>(Anthropic's plugin) withREVIEW.md. First name the change type, then pick reviewers, model and effort per REVIEW.md. When the type needs a security review, give an agentgh pr diff <PR>:/security-reviewneedsorigin/HEAD, and the remote here isgithub. Subagents stop atgh pr create, return the PR number and never review. Report findings; fix them only when the owner asks (the screenshot rule above is the one exception). - Models: the
model:andeffort:lines in.claude/agents/*.mdapply; review roles are chosen per review. - More: DECISIONS.md (why), REVIEW.md (what reviewers check),
docs/design-prompt.md (Indigo style), factory (
/factory).
STATUS.md (Claude Bot Local)
Before the final response of every session, update STATUS.md, and commit it with the session's work:
- Frontmatter:
updated= today,updated_by: claude(manualonly for a hand edit); adjuststate(active|paused|blocked|done) andprogress(0-100, share of the milestone's issues closed). - Summary: 1-2 sentences on the current state. Next step: the single most useful next action.
Blockers: or
- (none). - Recent:
- YYYY-MM-DD: <what this session did>; extend today's top line, else prepend. At most 10 lines.
Keep it under 40 lines and never rename or remove the frontmatter keys (a scanner parses them). If it is missing, create it with those keys and the four sections.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

