feat(skills): route MCP workflows through mcporter by ryoppippi · Pull Request #1346 · ccusage/ccusage · GitHub
Skip to content

feat(skills): route MCP workflows through mcporter#1346

Open
ryoppippi wants to merge 5 commits into
mainfrom
codex/add-mcporter-skills
Open

feat(skills): route MCP workflows through mcporter#1346
ryoppippi wants to merge 5 commits into
mainfrom
codex/add-mcporter-skills

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Jun 21, 2026

Copy link
Copy Markdown
Member

Routes repository MCP workflows through the mcporter CLI instead of direct agent MCP registration. Adds mcporter from llm-agents.nix to the development shell, moves server definitions to a project-scoped mcporter config, and adds focused Context7, DeepWiki, and grep.app skills.

Testing:

  • just fmt
  • Nix dev shell: mcporter Context7 library resolution and documentation query
  • Nix dev shell: mcporter grep.app repository code search
  • Nix dev shell: mcporter DeepWiki repository structure read
  • pre-commit and pre-push hooks

Local note: nix flake check --no-build was blocked by an invalid cached agent-skills source store path; CI will evaluate in a clean environment.

Summary by CodeRabbit

  • New Features
    • Context7 skill: Access package and framework documentation with project-scoped lookups
    • DeepWiki skill: Explore GitHub repository documentation and wiki contents
    • Grep skill: Search GitHub code with optional path, language, and regex filters

Source mcporter from the pinned llm-agents.nix flake so agents can use the CLI without npm installation or ad hoc npx downloads. Keep llm-agents on its own tested nixpkgs revision to retain upstream binary-cache compatibility.
Replace direct agent MCP registration with a project-scoped mcporter configuration. Add focused Context7 and grep.app skills so agents load only the workflow and tool surface required for each task.
@pullfrog

pullfrog Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The head commit changed during the review from 2c075cc to f915cd0.

📝 Walkthrough

Walkthrough

Three new MCP agent skills (context7-mcp, deepwiki-mcp, grep-mcp) are added with SKILL.md documentation and registered in AGENTS.md. MCP server definitions are moved from .mcp.json into a new config/mcporter.json (adding a deepwiki entry). mcporter is introduced into the Nix dev shell via a new llm-agents flake input.

Changes

mcporter MCP Integration

Layer / File(s) Summary
llm-agents flake input and mcporter dev-shell package
flake.nix, nix/dev-shell.nix
Pins llm-agents flake input to github:numtide/llm-agents.nix and appends mcporter from that input to the default dev shell's buildInputs.
mcporter server config, skill routing, and skill docs
config/mcporter.json, AGENTS.md, .agents/skills/context7-mcp/SKILL.md, .agents/skills/deepwiki-mcp/SKILL.md, .agents/skills/grep-mcp/SKILL.md
Adds config/mcporter.json with context7, deepwiki, and grep server baseUrl entries (replacing the removed .mcp.json). Registers all three skills in AGENTS.md's Skill Routing section. Each SKILL.md documents metadata and mcporter command patterns: context7-mcp uses a two-step resolve-then-query flow; deepwiki-mcp covers structure inspection, full content reads, and targeted questions for public GitHub repos; grep-mcp exposes GitHub code search with optional repo, path, language, and useRegexp filters.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐇 Hop hop, three new skills in a row,
Context7, DeepWiki, and grep on the go!
mcporter now lives in the Nix shell with glee,
.mcp.json retired — new config runs free.
The rabbit reads wikis and searches with flair,
Documentation bunnies beyond compare! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(skills): route MCP workflows through mcporter' accurately and concisely summarizes the main architectural change of refactoring MCP workflows to be routed through mcporter instead of direct registration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-mcporter-skills

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide f915cd0 Commit Preview URL

Branch Preview URL
Jun 21 2026, 07:36 PM

Register the official DeepWiki Streamable HTTP endpoint with mcporter and add a focused skill for repository structure, documentation, and grounded architecture questions.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch PR details and diff
gh pr view 1346 --repo ccusage/ccusage --json title,body,files,additions,deletions,changedFiles

echo "=== PR DIFF ==="
gh pr diff 1346 --repo ccusage/ccusage

Length of output: 12307



@ryoppippi: Here's my review of the PR.

Summary

The PR cleanly achieves its goal: replaces direct .mcp.json MCP registration with project-scoped mcporter routing, adds two focused skill files, and wires up the mcporter binary through the Nix dev shell. The changes are well-scoped and the skill files are clearly written.


Observations & suggestions

1. config/mcporter.json — config discovery path

The mcporter config is placed at config/mcporter.json. Most CLI tools look for config in a well-known default location (e.g., .mcporter.json, mcporter.json, or ~/.config/mcporter/). If mcporter doesn't auto-discover config/mcporter.json, agents invoking mcporter call without an explicit --config config/mcporter.json flag will silently get no servers registered.

It's worth confirming whether mcporter supports this path via a project-level override (e.g., a MCPORTER_CONFIG env var in shellHook, or whether the conventional path is different). If not auto-discovered, exporting the config path in shellHook would make this robust:

shellHook = ''
  export MCPORTER_CONFIG="$PWD/config/mcporter.json"
  ...
'';

2. Missing nixpkgs follows for llm-agents

# flake.nix
llm-agents.url = "github:numtide/llm-agents.nix";

Without a follows constraint, Nix resolves llm-agents' nixpkgs independently, which is why flake.lock now carries two nixpkgs revisions (nixpkgs at 3e41b24 for llm-agents, nixpkgs_2 / 8a1b012 for the root). For a dev-shell-only tool this is a minor closure concern, but it's worth considering:

llm-agents = {
  url = "github:numtide/llm-agents.nix";
  inputs.nixpkgs.follows = "nixpkgs";
};

If following causes build or version incompatibilities with mcporter, keeping it unpinned is a valid tradeoff — just noting the duplication is intentional in that case.

3. "imports": [] in config/mcporter.json

"imports": []

This appears to be an explicit no-op. If it's the default value, it can be dropped to keep the config minimal. If mcporter requires it to be present (e.g., strict schema), it's fine as-is — just confirm it's necessary.


What looks good

  • Skill files: Well-structured, actionable guidance. The instruction to search for literal code patterns rather than conceptual keywords in grep-mcp/SKILL.md is particularly useful for agents.
  • AGENTS.md placement: The two new skills are inserted at a logical position in the ordered list.
  • flake.lock root nixpkgs: The root project's effective nixpkgs revision is unchanged (nixpkgs_28a1b012) — the bump only affects llm-agents' subtree.
  • mcporter package inclusion: inputs.llm-agents.packages.${system}.mcporter follows the correct pattern for consuming packages from flake inputs.
  • .mcp.json removal: Clean deletion with the equivalent config migrated to config/mcporter.json.

Overall this is a clean, well-reasoned change. The config discovery question in point 1 is the most actionable item to verify before merging.

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

Added the DeepWiki MCP workflow in 8d42a06. Validation: just fmt and a live DeepWiki structure read through the Nix-provided mcporter.

@cubic-dev-ai

cubic-dev-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review
@cubic-dev-ai review

Added the DeepWiki MCP workflow in 8d42a06. Validation: just fmt and a live DeepWiki structure read through the Nix-provided mcporter.

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai Confirmed all three points. config/mcporter.json is mcporter’s documented project discovery path, and live calls to Context7, grep.app, and DeepWiki succeeded without --config. The separate nixpkgs input is intentional per llm-agents.nix guidance so its tested package/cache combination is retained. imports: [] intentionally prevents unrelated editor/agent MCP definitions from being merged into this focused project registry.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh pr diff 1346 --repo ccusage/ccusage

echo "=== PR STATUS ==="
gh pr view 1346 --repo ccusage/ccusage --json title,state,commits,files

echo "=== COMMIT 8d42a06 ==="
gh api repos/ccusage/ccusage/commits/8d42a06

Length of output: 22238



@ryoppippi: The DeepWiki addition in 8d42a06 is clean and consistent with the rest of the PR.

What changed in 8d42a06:

  • config/mcporter.json"deepwiki": { "baseUrl": "https://mcp.deepwiki.com/mcp" } added in the correct position, using the same baseUrl key as the other entries.
  • .agents/skills/deepwiki-mcp/SKILL.md — the three-tool progression (read_wiki_structureread_wiki_contentsask_question) gives agents a clear escalation path, and the closing tip ("Prefer a focused question over loading all wiki contents when only one subsystem matters") is good cost-control guidance.
  • AGENTS.md — skill inserted at the right spot, between context7-mcp and grep-mcp.

No issues with the new commit. The three observations from the earlier review (config discovery path, nixpkgs follows, "imports": []) remain open, but none are blockers introduced by this commit. Overall the PR looks good to merge.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

@ryoppippi Thanks for the thorough follow-up — all three points make sense:

  1. config/mcporter.json: Good to know this is the documented project-level discovery path; no extra shellHook export needed.
  2. Separate nixpkgs for llm-agents: Keeping it unpinned to preserve the upstream-tested binary/cache combination is a reasonable tradeoff.
  3. imports: []: Using it as an explicit isolation boundary to fence out editor/agent MCP registrations is a valid and clear design intent.

The PR looks good to merge. 🐇


✏️ Learnings added
Learnt from: ryoppippi
URL: https://github.com/ccusage/ccusage/pull/1346

Timestamp: 2026-06-21T19:30:12.243Z
Learning: In the ccusage/ccusage repository (Nix flake, mcporter CLI from numtide/llm-agents.nix), `config/mcporter.json` is mcporter's documented project-level discovery path. MCP tool calls via `mcporter call` auto-discover this file without needing a `--config` flag or a `MCPORTER_CONFIG` env var in shellHook.

Learnt from: ryoppippi
URL: https://github.com/ccusage/ccusage/pull/1346

Timestamp: 2026-06-21T19:30:12.243Z
Learning: In the ccusage/ccusage repository, the `llm-agents` flake input intentionally does NOT use `inputs.nixpkgs.follows = "nixpkgs"`. This is per llm-agents.nix upstream guidance: keeping its own nixpkgs pin preserves the upstream-tested mcporter package/binary cache combination.

Learnt from: ryoppippi
URL: https://github.com/ccusage/ccusage/pull/1346

Timestamp: 2026-06-21T19:30:12.243Z
Learning: In the ccusage/ccusage repository, `"imports": []` in `config/mcporter.json` is intentional. It explicitly prevents mcporter from merging unrelated editor or agent MCP server definitions into the project-scoped registry, keeping it focused and isolated.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

Re-trigger cubic

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Jun 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ccusage/ccusage-darwin-arm64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-arm64@1346

@ccusage/ccusage-darwin-x64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-x64@1346

@ccusage/ccusage-linux-arm64

npx https://pkg.pr.new/@ccusage/ccusage-linux-arm64@1346

@ccusage/ccusage-linux-x64

npx https://pkg.pr.new/@ccusage/ccusage-linux-x64@1346

@ccusage/ccusage-win32-x64

npx https://pkg.pr.new/@ccusage/ccusage-win32-x64@1346

ccusage

npx https://pkg.pr.new/ccusage@1346

commit: f915cd0

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 4eb1296b38b7
Base SHA: 88246e6d8668

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 299.9ms 3.36 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 300.8ms 3.35 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 121.8ms 8.27 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 93.1ms 10.81 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 40.4ms 33.6ms 1.20x 53.75 MiB 53.75 MiB 1.00x 0.04 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 32.0ms 29.1ms 1.10x 54.00 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 30.8ms 28.9ms 1.07x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.8ms 28.8ms 1.00x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 352.0ms 295.8ms 1.19x 930.34 MiB 936.33 MiB 1.01x 2.86 GiB/s 3.40 GiB/s
codex --offline --json 1.01 GiB 123.3ms 135.9ms 0.91x 431.30 MiB 405.29 MiB 0.94x 8.16 GiB/s 7.41 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB +0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 4eb1296b38b7
Base SHA: 88246e6d8668

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 250.0ms 4.03 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 271.0ms 3.72 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 113.7ms 8.85 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 89.4ms 11.27 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 38.4ms 6.4ms 6.02x 53.75 MiB 10.21 MiB 0.19x 0.04 MiB/s 0.24 MiB/s
claude session --offline --json 0.00 MiB 33.8ms 5.0ms 6.81x 53.50 MiB 10.21 MiB 0.19x 0.05 MiB/s 0.31 MiB/s
codex daily --offline --json 0.00 MiB 33.6ms 3.1ms 10.98x 53.75 MiB 8.20 MiB 0.15x 0.03 MiB/s 0.28 MiB/s
codex session --offline --json 0.00 MiB 31.1ms 3.0ms 10.52x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.29 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 317.4ms 253.6ms 1.25x 952.34 MiB 962.34 MiB 1.01x 3.17 GiB/s 3.97 GiB/s
codex --offline --json 1.01 GiB 119.4ms 95.9ms 1.24x 419.29 MiB 413.29 MiB 0.99x 8.43 GiB/s 10.50 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB +0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 8d42a060d2af
Base SHA: 88246e6d8668

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 294.8ms 3.42 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 248.1ms 4.06 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 114.5ms 8.79 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 88.6ms 11.36 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 35.3ms 33.7ms 1.05x 53.75 MiB 54.00 MiB 1.00x 0.04 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 33.9ms 30.6ms 1.11x 53.50 MiB 53.50 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 30.1ms 29.7ms 1.02x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 29.2ms 30.4ms 0.96x 53.50 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 328.2ms 282.8ms 1.16x 948.34 MiB 930.33 MiB 0.98x 3.07 GiB/s 3.56 GiB/s
codex --offline --json 1.01 GiB 118.8ms 119.9ms 0.99x 413.29 MiB 413.29 MiB 1.00x 8.47 GiB/s 8.40 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB -0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 8d42a060d2af
Base SHA: 88246e6d8668

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 328.5ms 3.06 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 242.8ms 4.15 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 123.0ms 8.19 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 87.9ms 11.45 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 39.7ms 6.6ms 6.02x 54.00 MiB 10.21 MiB 0.19x 0.04 MiB/s 0.23 MiB/s
claude session --offline --json 0.00 MiB 36.1ms 3.4ms 10.52x 53.75 MiB 10.21 MiB 0.19x 0.04 MiB/s 0.45 MiB/s
codex daily --offline --json 0.00 MiB 31.5ms 3.0ms 10.55x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.29 MiB/s
codex session --offline --json 0.00 MiB 28.2ms 2.9ms 9.67x 53.75 MiB 8.20 MiB 0.15x 0.03 MiB/s 0.29 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 289.0ms 280.0ms 1.03x 942.34 MiB 938.34 MiB 1.00x 3.48 GiB/s 3.60 GiB/s
codex --offline --json 1.01 GiB 159.1ms 111.9ms 1.42x 407.29 MiB 411.29 MiB 1.01x 6.33 GiB/s 8.99 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB -0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 2c075ccf008f
Base SHA: 88246e6d8668

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 277.5ms 3.63 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 276.3ms 3.64 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 111.7ms 9.02 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 86.4ms 11.66 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 32.6ms 7.2ms 4.55x 53.50 MiB 10.21 MiB 0.19x 0.05 MiB/s 0.22 MiB/s
claude session --offline --json 0.00 MiB 32.4ms 3.4ms 9.61x 53.75 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.46 MiB/s
codex daily --offline --json 0.00 MiB 33.8ms 3.0ms 11.39x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.29 MiB/s
codex session --offline --json 0.00 MiB 31.4ms 3.0ms 10.41x 53.75 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.28 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 333.1ms 265.4ms 1.26x 956.34 MiB 942.34 MiB 0.99x 3.02 GiB/s 3.79 GiB/s
codex --offline --json 1.01 GiB 126.6ms 103.0ms 1.23x 419.29 MiB 413.29 MiB 0.99x 7.95 GiB/s 9.78 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB -0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f915cd07df6c
Base SHA: 88246e6d8668

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 255.0ms 3.95 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 239.5ms 4.20 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 109.1ms 9.23 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 86.1ms 11.69 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 31.5ms 6.9ms 4.56x 54.25 MiB 10.21 MiB 0.19x 0.05 MiB/s 0.22 MiB/s
claude session --offline --json 0.00 MiB 32.0ms 3.8ms 8.48x 54.00 MiB 10.20 MiB 0.19x 0.05 MiB/s 0.41 MiB/s
codex daily --offline --json 0.00 MiB 26.9ms 2.4ms 11.05x 54.00 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.35 MiB/s
codex session --offline --json 0.00 MiB 27.0ms 3.3ms 8.29x 54.00 MiB 8.19 MiB 0.15x 0.03 MiB/s 0.26 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 256.4ms 204.3ms 1.25x 962.34 MiB 938.34 MiB 0.98x 3.93 GiB/s 4.93 GiB/s
codex --offline --json 1.01 GiB 107.8ms 90.6ms 1.19x 413.29 MiB 403.29 MiB 0.98x 9.34 GiB/s 11.11 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB +0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 2c075ccf008f
Base SHA: 88246e6d8668

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 279.6ms 3.60 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 244.6ms 4.12 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 121.1ms 8.31 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 88.6ms 11.37 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 31.6ms 35.7ms 0.89x 53.75 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 31.8ms 31.5ms 1.01x 53.50 MiB 53.75 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 30.7ms 32.1ms 0.96x 53.75 MiB 53.50 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 30.8ms 30.6ms 1.00x 53.50 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 330.0ms 306.1ms 1.08x 920.33 MiB 934.34 MiB 1.02x 3.05 GiB/s 3.29 GiB/s
codex --offline --json 1.01 GiB 114.1ms 120.0ms 0.95x 413.29 MiB 401.29 MiB 0.97x 8.82 GiB/s 8.39 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB -0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: f915cd07df6c
Base SHA: 88246e6d8668

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 284.2ms 3.54 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 234.2ms 4.30 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 119.1ms 8.45 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 88.4ms 11.39 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 35.1ms 29.3ms 1.20x 53.75 MiB 54.00 MiB 1.00x 0.04 MiB/s 0.05 MiB/s
claude session --offline --json 0.00 MiB 28.9ms 28.9ms 1.00x 53.50 MiB 53.50 MiB 1.00x 0.05 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 28.6ms 27.1ms 1.05x 53.75 MiB 53.50 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 28.3ms 28.5ms 0.99x 53.75 MiB 53.75 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 338.3ms 308.6ms 1.10x 946.34 MiB 952.34 MiB 1.01x 2.98 GiB/s 3.26 GiB/s
codex --offline --json 1.01 GiB 113.2ms 119.4ms 0.95x 419.29 MiB 427.29 MiB 1.02x 8.90 GiB/s 8.43 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 18.25 KiB 18.25 KiB +0.00 KiB 1.00x
installed native package binary 4026.25 KiB 4026.25 KiB +0.00 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@pullfrog

pullfrog Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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