agentleFS
minhtran3124minhtran3124/claude-code-tokscope/CLAUDE.md

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.

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
  1. Very specific:

    Before the final response of every session, update STATUS.md, and commit it with the session's work:

    line 36
  2. Distinctive:

    Keep it under 40 lines and never rename or remove the frontmatter keys (a scanner parses them).

    line 44

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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    # tests

Code 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/ or tokscope/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 on main.
  • Review every PR (outside /factory, unless the owner says skip): run /code-review:code-review <PR> (Anthropic's plugin) with REVIEW.md. First name the change type, then pick reviewers, model and effort per REVIEW.md. When the type needs a security review, give an agent gh pr diff <PR>: /security-review needs origin/HEAD, and the remote here is github. Subagents stop at gh 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: and effort: lines in .claude/agents/*.md apply; 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:

  1. Frontmatter: updated = today, updated_by: claude (manual only for a hand edit); adjust state (active | paused | blocked | done) and progress (0-100, share of the milestone's issues closed).
  2. Summary: 1-2 sentences on the current state. Next step: the single most useful next action. Blockers: or - (none).
  3. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.