Skip to content

Report Cursor activity with --source cursor - #3

Merged
Expecho merged 1 commit into
mainfrom
cursor-source
Oct 27, 2026
Merged

Expecho merged 1 commit into
mainfrom
cursor-source

Conversation

@Expecho

@Expecho Expecho commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Adds Cursor as a third source. A new loader (src/cursor.mjs) reads Cursor's agent transcripts (~/.cursor/projects/<project>/agent-transcripts/<id>/<id>.jsonl). Both the Cursor CLI and the agent in the Cursor editor write them. --source all now covers Claude Code, GitHub Copilot and Cursor.

node bin/ccreports.mjs --source cursor
node bin/ccreports.mjs session --source cursor
node bin/ccreports.mjs --source all -a -r

Activity only

Cursor keeps token usage on its servers, so its local logs have no tokens, models or cost. Cursor sessions count in activity only: sessions, prompts, tools, skills, slash commands and adoption.

  • Activity records: one per prompt, so sessions without tool calls still count.
  • No token columns: reports on data without any token usage leave out the token, cost, context, request and model columns instead of showing zeros. Combined reports keep them for Claude Code and Copilot, and note that Cursor counts in activity only.

How the transcripts map onto the reports

  • Skills you invoke: from the skill block Cursor attaches to your message (/github in the CLI, or picked in the editor). Exact.
  • Skills the agent uses: reads of a SKILL.md in a skills folder Cursor loads from (.cursor/skills, .claude/skills, .agents/skills, …). A read made only to look at a skill still counts.
  • Time: each record gets the time of the prompt that started its turn. Older transcripts without timestamps use the file's modification time.
  • Project: the CLI's session metadata (~/.cursor/chats/…/meta.json) where it exists. Otherwise the transcript's folder name, decoded against the folders on disk.
  • Surface: CLI when that metadata exists, editor otherwise.
  • Tools: keep Cursor's names. CallDynamicTool calls count under the tool they call; those outside Cursor's namespace count as MCP tools. SwitchMode and CreatePlan mark plan mode.
  • Recommendations: a Cursor profile. Without tokens only the workflow checks (step-by-step coding, skills) can fire.
  • Adoption: labels the Cursor CLI and editor. Outside Claude-only reports, the phase descriptions say "the agent" instead of "Claude".

Not available from Cursor's logs

Tokens, cost, models, context size, hooks, compactions, subagents and PRs. The transcripts have no tool output, so there are no PR links. IDE chats from before Cursor wrote transcripts live only in the editor's SQLite database and aren't read; reading it would need Node 22's node:sqlite.

Tests

npm test: 48 pass. test/cursor.test.mjs covers:

  • prompt timestamps and project-folder decoding;
  • both transcript formats;
  • skill and command detection, including a plugin's SKILL.md that must not count as a use;
  • the token-free summary columns.

🤖 Generated with Claude Code

A new loader (src/cursor.mjs) reads Cursor's agent transcripts
(~/.cursor/projects/<project>/agent-transcripts/<id>/<id>.jsonl), written
by both the Cursor CLI and the agent in the Cursor editor. --source all now
covers Claude Code, GitHub Copilot and Cursor.

Cursor keeps token usage on its servers, so its sessions count in activity
only: sessions, prompts, tools, skills, slash commands and adoption.

- Activity records (one per prompt) count sessions that have no tokens.
- Reports on data without any token usage leave out the token, cost,
  context, request and model columns instead of showing zeros.
- Skills you invoke come from the skill block Cursor attaches to your
  message; skills the agent uses are reads of a SKILL.md in a skills folder
  Cursor loads from (.cursor/skills, .claude/skills, ...).
- Each record gets the time of the prompt that started its turn; the
  project comes from the CLI's session metadata or the decoded folder name.
- Recommendations get a Cursor profile; without tokens only the workflow
  checks (step-by-step coding, skills) can fire.
- Adoption labels the Cursor CLI and editor, and outside Claude-only
  reports the phase descriptions say "the agent" instead of "Claude".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Expecho
Expecho merged commit e2a1cc7 into main Oct 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant