Skip to content

chore(ai): migrate guidance into skills - #1003

Merged
ryoppippi merged 37 commits into
mainfrom
chore/migrate-claude-guidance-to-skills
May 16, 2026
Merged

chore(ai): migrate guidance into skills#1003
ryoppippi merged 37 commits into
mainfrom
chore/migrate-claude-guidance-to-skills

Conversation

@ryoppippi

@ryoppippi ryoppippi commented May 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Move reusable CLAUDE.md guidance into repo-local skills so agents can load focused instructions by task.
  • Make .agents/skills the canonical skill source and sync .claude/skills as symlinks, matching the rorkai layout.
  • Add focused skills for ccusage development, testing, agent data sources, docs, Bun APIs, fs-fixture, and TypeScript style.

Notes

  • Documents the unified `ccusage ` command surface and treats standalone agent binaries as deprecated compatibility wrappers.
  • Adds Vitest testing guidance for globals, in-source tests, assertions over non-null assertions, readable tests, and fs-fixture usage.

Validation

  • `pnpm run sync:skills:check`
  • `pnpm run format`
  • `pnpm typecheck`
  • `pnpm run test`

Summary by cubic

Migrates CLAUDE guidance into repo-local skills under .agents/skills (symlinked to .claude/skills) and standardizes docs and commands on the unified ccusage <agent> CLI. Adds focused skills and clarifies data sources, pricing, and dependency policy to reduce friction across dev, tests, and reviews.

  • New Features

    • Skills for development, testing, commit/TDD, PR review, CI fixes (fix-ci), agent sources, Bun APIs/profiling, TypeScript style, docs, filesystem fixtures, and duplicate-code checks (reduce-similarities).
  • Refactors

    • scripts/sync-skills.ts now syncs .agents/skills.claude/skills and validates symlinks.
    • Shortened package CLAUDE.md files to route to skills; mark standalone agent wrappers as deprecated in favor of ccusage <agent>.
    • Clarified Claude Code session/file shape (nested dirs, legacy flat JSONL), pricing modes, agent dependency policy, and OpenCode’s primary SQLite source with JSON fallback.
    • Aligned similarity skill name to reduce-similarities across skills and symlinks.
    • Fixed examples and docs: git apply usage, statusline commands, review-thread pagination notes, corrected ccusage-pi wrapper name, and guarded commit push instructions to block pushes to main/master.

Written for commit affb635. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Documentation

    • Added many modular skill guides and reference docs: commit workflow, TDD/testing, PR AI review, ccusage sources/dev/docs/testing, fs-fixture, Bun profiling/API reference, TypeScript style, fix-ci, plus condensed per-package guidance linking to these skills.
  • Chores

    • Updated skill routing/sync so skills are sourced from the central skills directory and added pointer/redirect entries for consistent resolution.

Review Change Stack

ryoppippi added 2 commits May 16, 2026 12:30
Move reusable CLAUDE.md guidance into repo-local skills so agents can load task-specific instructions instead of carrying the full repository guide in context.

Make .agents/skills the canonical skill source and sync .claude/skills as symlinks, matching the rorkai layout. The sync script now validates and creates symlinks from .agents to .claude.

Document the unified ccusage command surface for agent CLIs and mark standalone agent binaries as deprecated compatibility wrappers.
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR centralizes skills under .agents/skills, adds many skill and reference docs, creates .claude/skills pointer files to those agent skills, reverses scripts/sync-skills.ts to source from .agents/skills, and condenses root/package CLAUDE.md files to skill-routing notes.

Changes

Skills Architecture and Documentation

Layer / File(s) Summary
Development and testing
.agents/skills/typescript-style/SKILL.md, .agents/skills/tdd/SKILL.md, .agents/skills/tdd/references/vitest-examples.md, .agents/skills/fs-fixture/SKILL.md, .agents/skills/ccusage-testing/SKILL.md, .agents/skills/ccusage-development/SKILL.md, .agents/skills/ccusage-development/references/commands.md
TypeScript satisfies vs as guidance, strict TDD workflow with Vitest examples, fs-fixture usage, ccusage test conventions, and monorepo development notes and CLI command references.
Git workflow skills
.agents/skills/commit/SKILL.md, .agents/skills/commit/references/git-apply.md, .agents/skills/commit/references/push.md, .agents/skills/commit/references/revertable-commits.md, .agents/skills/pr-ai-review-workflow/SKILL.md, .agents/skills/pr-ai-review-workflow/references/gh-review-commands.md, .agents/skills/fix-ci/SKILL.md
Commit skill with non-interactive git apply staging, push/upstream checks, revertable-commit guidance, PR AI review workflow with gh CLI examples, and CI fix workflow.
Runtime & profiling skills
.agents/skills/bun-api-reference/SKILL.md, .agents/skills/bun-cpu-profile/SKILL.md, .agents/skills/bun-cpu-profile/references/profile-workflow.md
Bun API verification using local bun-types and ripgrep, Bun CPU profiling templates and workflow, and profiling lessons.
Ccusage agent-sources
.agents/skills/ccusage-agent-sources/SKILL.md, .../references/amp.md, .../references/claude-code.md, .../references/codex.md, .../references/opencode.md, .../references/pi-agent.md
Unified ccusage CLI surface, data source locations and JSON/DB shapes for AMP, Claude Code, Codex, OpenCode, and Pi; token-field mappings and cost/pricing modes.
Documentation editing
.agents/skills/ccusage-docs/SKILL.md
VitePress docs build steps (config-schema copy), directory expectations, command aliases, and content rules (CLI wording, screenshots, asset paths, lint comments).
Claude skill pointers
.claude/skills/*
All .claude/skills/ entries now redirect to corresponding .agents/skills/* implementations via single-line relative paths.
Skills sync reversal
scripts/sync-skills.ts
Script now sources from .agents/skills, updates SKILL_TARGETS and iteration to generate/validate symlinks pointing to ../../.agents/skills/<name>.
Repository guidance consolidation
CLAUDE.md, apps/amp/CLAUDE.md, apps/ccusage/CLAUDE.md, apps/codex/CLAUDE.md, apps/opencode/CLAUDE.md, apps/pi/CLAUDE.md, docs/CLAUDE.md
Root and package CLAUDE.md files condensed to skill-routing sections and short package notes referencing the curated skills library.

Sequence Diagram(s)

No additional sequence diagrams beyond the embedded sync script diagram in the hidden review stack.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • ryoppippi/ccusage#1001: Modifies the same .agents/skills/bun-cpu-profile skill documentation and profiling references.
  • ryoppippi/ccusage#998: Related changes to scripts/sync-skills.ts and skill symlink synchronization logic.

Poem

🐰 I hopped through docs, tidy and spry,
I moved the skills where the burrows lie,
Pointers now whisper the path to find,
Scripts sync from source — neat and kind,
A tidy warren for knowledge inside.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore(ai): migrate guidance into skills' accurately and concisely summarizes the main change: migrating reusable guidance into repo-local skills that agents can load by task.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migrate-claude-guidance-to-skills

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new

pkg-pr-new Bot commented May 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ccusage/amp

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/amp@1003

ccusage

npx https://pkg.pr.new/ryoppippi/ccusage@1003

@ccusage/codex

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/codex@1003

@ccusage/opencode

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/opencode@1003

@ccusage/pi

npx https://pkg.pr.new/ryoppippi/ccusage/@ccusage/pi@1003

commit: affb635

@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

ccusage performance comparison

This compares the PR build against the base branch build on the same CI runner.

Committed fixture performance

Committed small fixture for stable PR-to-PR feedback and output-shape regressions.

Fixture: apps/ccusage/test/fixtures/claude
Runtime: package ccusage bin from apps/ccusage/package.json through bun -b, --offline --json, measured by hyperfine with 2 warmups and 7 runs.

Command Base median PR median PR vs base
daily --offline --json 134.2ms 137.7ms 0.97x
session --offline --json 134.5ms 132.5ms 1.02x
blocks --offline --json 134.4ms 133.4ms 1.01x

Large real-world-shaped fixture performance

Generated fixture around 1 GiB shaped from aggregate local Claude-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 fixture.

Fixture: /home/runner/work/_temp/ccusage-large-fixture
Runtime: package ccusage bin from apps/ccusage/package.json through bun -b, --offline --json, measured by hyperfine with 0 warmups and 1 runs.

Command Base median PR median PR vs base
daily --offline --json 1.489s 1.473s 1.01x

Package size

Package artifact Base PR Delta Ratio
packed ccusage-*.tgz 64.10 KiB 64.10 KiB +0.00 KiB 1.00x

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/ccusage-development/SKILL.md:
- Around line 77-83: Update the SKILL.md instructions so formatting is run
before any mutating checks: replace the current "run these in parallel" wording
with a sequential recommendation to run `pnpm run format` first, then `pnpm
typecheck` and `pnpm run test` (noting that `pnpm typecheck` and `pnpm run test`
may be run in parallel if desired); specifically edit the block containing the
`pnpm run format`, `pnpm typecheck`, and `pnpm run test` commands to reflect
this ordering and rationale.

In @.agents/skills/commit/SKILL.md:
- Around line 129-135: Update the fenced code blocks flagged by MD040 to include
a language identifier (e.g., add "text" or "gitcommit" after the opening ```),
specifically for the example blocks that contain the commit messages such as
"feat(auth): add RefreshTokenService class" and "feat(auth): integrate token
rotation in middleware" (also apply the same change to the other fenced examples
referenced around lines 159-173); ensure every opening ``` has ```text so
markdownlint no longer reports missing language identifiers.

In @.agents/skills/tdd/SKILL.md:
- Around line 17-23: Add a language tag to the two fenced command-output blocks
so markdownlint MD040 is satisfied: change the fences around the block starting
with !`cat package.json 2>/dev/null | jq -r '.scripts ...'` and the block
starting with !`if [ -f vitest.config.ts ] || [ -f vitest.config.js ] ...` to
use ```bash instead of plain ```, keeping the command text unchanged and leaving
other fences in the file as-is.

In @.agents/skills/tdd/vitest-example.md:
- Around line 18-30: Replace the non-canonical usage it.extend({...}) with the
canonical test.extend({...}) and add test to the list of Vitest globals so
examples and guidance use the official API; update the globals declaration (the
globals array/list that currently mentions describe, it, expect, vi, beforeEach,
assert) to include test and change any example uses of it.extend to test.extend
to maintain consistency with Vitest docs and tooling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1eb3dbb-65b6-4889-9afa-c0f92a8ff88f

📥 Commits

Reviewing files that changed from the base of the PR and between c3c06ef and bd06550.

📒 Files selected for processing (43)
  • .agents/skills/bun-api-reference/SKILL.md
  • .agents/skills/bun-cpu-profile
  • .agents/skills/bun-cpu-profile/SKILL.md
  • .agents/skills/bun-cpu-profile/agents/openai.yaml
  • .agents/skills/byethrow
  • .agents/skills/byethrow/SKILL.md
  • .agents/skills/ccusage-agent-sources/SKILL.md
  • .agents/skills/ccusage-development/SKILL.md
  • .agents/skills/ccusage-docs/SKILL.md
  • .agents/skills/ccusage-testing/SKILL.md
  • .agents/skills/cmux-debug
  • .agents/skills/cmux-debug/SKILL.md
  • .agents/skills/commit/SKILL.md
  • .agents/skills/fs-fixture/SKILL.md
  • .agents/skills/reduce-similarities
  • .agents/skills/reduce-similarities/SKILL.md
  • .agents/skills/tdd/SKILL.md
  • .agents/skills/tdd/vitest-example.md
  • .agents/skills/typescript-style/SKILL.md
  • .agents/skills/use-gunshi-cli
  • .agents/skills/use-gunshi-cli/SKILL.md
  • .claude/skills/bun-api-reference
  • .claude/skills/bun-cpu-profile
  • .claude/skills/byethrow
  • .claude/skills/ccusage-agent-sources
  • .claude/skills/ccusage-development
  • .claude/skills/ccusage-docs
  • .claude/skills/ccusage-testing
  • .claude/skills/cmux-debug
  • .claude/skills/commit
  • .claude/skills/fs-fixture
  • .claude/skills/reduce-similarities
  • .claude/skills/tdd
  • .claude/skills/typescript-style
  • .claude/skills/use-gunshi-cli
  • CLAUDE.md
  • apps/amp/CLAUDE.md
  • apps/ccusage/CLAUDE.md
  • apps/codex/CLAUDE.md
  • apps/opencode/CLAUDE.md
  • apps/pi/CLAUDE.md
  • docs/CLAUDE.md
  • scripts/sync-skills.ts
💤 Files with no reviewable changes (5)
  • .agents/skills/byethrow
  • .agents/skills/cmux-debug
  • .agents/skills/use-gunshi-cli
  • .agents/skills/reduce-similarities
  • .agents/skills/bun-cpu-profile

Comment thread .agents/skills/ccusage-development/SKILL.md Outdated
Comment thread .agents/skills/commit/SKILL.md Outdated
Comment thread .agents/skills/tdd/SKILL.md Outdated
Comment thread .agents/skills/tdd/vitest-example.md Outdated

@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.

7 issues found across 43 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/ccusage-agent-sources/SKILL.md">

<violation number="1" location=".agents/skills/ccusage-agent-sources/SKILL.md:90">
P2: The OpenCode source description is outdated: messages are loaded from SQLite databases (`opencode.db` / `opencode-*.db`) and JSON files are only a fallback. Documenting JSON files as the only source can lead to incorrect parser/test updates.</violation>
</file>

<file name=".agents/skills/ccusage-development/SKILL.md">

<violation number="1" location=".agents/skills/ccusage-development/SKILL.md:48">
P2: These `pnpm run start ...` examples are presented as root-level commands, but the root workspace has no `start` script. Use a workspace filter (or explicitly scope to `apps/ccusage`) so they work from repo root.</violation>

<violation number="2" location=".agents/skills/ccusage-development/SKILL.md:73">
P2: This dependency rule is too broad for deprecated wrapper apps that must keep install-time runtime deps (for example `ccusage`) in `dependencies`. Narrow the rule to avoid breaking wrapper package installs.

(Based on your team's feedback about wrapper packages requiring `ccusage` in `dependencies`.) [FEEDBACK_USED]</violation>

<violation number="3" location=".agents/skills/ccusage-development/SKILL.md:77">
P2: Avoid running `pnpm run format` in parallel with `typecheck` and `test`. `format` mutates files, so concurrent checks can read changing content and produce flaky or inconsistent results.</violation>
</file>

<file name=".agents/skills/tdd/SKILL.md">

<violation number="1" location=".agents/skills/tdd/SKILL.md:22">
P2: The pytest detection condition is incorrectly grouped, so repositories with `pytest.ini` can be misdetected as not using pytest.</violation>

<violation number="2" location=".agents/skills/tdd/SKILL.md:61">
P2: This section points to `rust-example.md` and `zig-example.md`, but those files do not exist in the repository.</violation>
</file>

<file name=".agents/skills/commit/SKILL.md">

<violation number="1" location=".agents/skills/commit/SKILL.md:40">
P1: Resetting the full file before applying a single-hunk patch can discard other pending hunks from that file. Stage the patch directly instead so remaining changes are preserved for later commits.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
Re-trigger cubic

Comment thread .agents/skills/commit/SKILL.md Outdated
Comment thread .agents/skills/ccusage-agent-sources/SKILL.md Outdated
Comment thread .agents/skills/ccusage-development/SKILL.md Outdated
Comment thread .agents/skills/tdd/SKILL.md Outdated
Comment thread .agents/skills/tdd/SKILL.md Outdated
Comment thread .agents/skills/ccusage-development/SKILL.md Outdated
Comment thread .agents/skills/ccusage-development/SKILL.md Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 16, 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 Updated (UTC)
⛔ Deployment terminated
View logs
ccusage-guide affb635 May 16 2026, 01:31 PM

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 16, 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 May 16, 2026

Copy link
Copy Markdown

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read the key new skill files and scripts
echo "=== scripts/sync-skills.ts ==="
cat scripts/sync-skills.ts

echo ""
echo "=== CLAUDE.md ==="
cat CLAUDE.md

echo ""
echo "=== .agents/skills/ccusage-testing/SKILL.md ==="
cat .agents/skills/ccusage-testing/SKILL.md

echo ""
echo "=== .agents/skills/tdd/SKILL.md ==="
cat .agents/skills/tdd/SKILL.md

echo ""
echo "=== .agents/skills/tdd/vitest-example.md ==="
cat .agents/skills/tdd/vitest-example.md

echo ""
echo "=== .agents/skills/commit/SKILL.md ==="
cat .agents/skills/commit/SKILL.md

echo ""
echo "=== .agents/skills/ccusage-development/SKILL.md ==="
cat .agents/skills/ccusage-development/SKILL.md

echo ""
echo "=== .agents/skills/typescript-style/SKILL.md ==="
cat .agents/skills/typescript-style/SKILL.md

echo ""
echo "=== .agents/skills/bun-api-reference/SKILL.md ==="
cat .agents/skills/bun-api-reference/SKILL.md

echo ""
echo "=== .agents/skills/ccusage-agent-sources/SKILL.md ==="
cat .agents/skills/ccusage-agent-sources/SKILL.md

echo ""
echo "=== .agents/skills/ccusage-docs/SKILL.md ==="
cat .agents/skills/ccusage-docs/SKILL.md

echo ""
echo "=== .agents/skills/fs-fixture/SKILL.md ==="
cat .agents/skills/fs-fixture/SKILL.md

echo ""
echo "=== Directory structure of .agents/skills ==="
tree .agents/skills 2>/dev/null || find .agents/skills -type f | sort

echo ""
echo "=== Directory structure of .claude/skills ==="
tree .claude/skills 2>/dev/null || find .claude/skills -type f | sort

echo ""
echo "=== .claude/skills file contents (check if they are symlinks or text pointers) ==="
for f in $(find .claude/skills -maxdepth 1 -type f | sort); do
  echo "--- $f ---"
  cat "$f"
  echo ""
done

echo ""
echo "=== apps/ccusage/CLAUDE.md ==="
cat apps/ccusage/CLAUDE.md

echo ""
echo "=== apps/amp/CLAUDE.md ==="
cat apps/amp/CLAUDE.md

Length of output: 43433


@ryoppippi: Here is my review of PR #1003.


Overview

The migration cleanly separates concerns: .agents/skills becomes the single source of truth, and .claude/skills entries are symlinks generated by scripts/sync-skills.ts. The skill content itself is well-written, scoped, and cross-referenced. Three issues are worth addressing before merge.


Issue 1 — tdd/SKILL.md references missing companion files (Medium)

The "Test Execution" section points agents to rust-example.md and zig-example.md:

- **Rust (cargo test)**: See `rust-example.md``#[ignore]`, `#[should_panic]`, filtering, doc tests
- **Zig (zig test)**: See `zig-example.md``std.testing`, `test` blocks, `--test-filter`

However, only vitest-example.md exists in .agents/skills/tdd/. Agents following those references will find nothing. Either add the two files or change those bullets to a note such as:

- **Rust (cargo test)**: Follow the general pattern: `cargo test <test-name>` or `cargo test --manifest-path <path>`
- **Zig (zig test)**: Follow the general pattern: `zig build test -- --test-filter <name>`

Issue 2 — fs-fixture/SKILL.md hard-codes the package version (Minor)

node_modules/.pnpm/[email protected]/node_modules/fs-fixture/README.md

The version 2.8.1 will silently become a broken path after any pnpm update to fs-fixture. Since the fallback fd command already works correctly, consider making it the primary resolution step and moving the static path to a comment or example output:

Locate it with:

```sh
fd -a README.md node_modules/.pnpm | rg "fs-fixture"

---

### Issue 3 — `CLAUDE.md` references a non-existent skill `check-similarity-ts` (Minor)

The Skill Routing table includes:

```markdown
- `check-similarity-ts` - AST-based duplicate TypeScript/JavaScript detection.

But the actual skill directory is reduce-similarities — there is no check-similarity-ts entry anywhere under .agents/skills. This looks like the skill was renamed during development and the CLAUDE.md entry was not updated.


Nit — sync-skills.ts: non-directory entries in .agents/skills are silently skipped

const s = await lstat(join(AGENTS_SKILLS, name));
if (!s.isDirectory()) {
    return null;
}

This is correct and intentional, but files like a top-level README.md placed directly in .agents/skills would never produce a skill link and would also never be flagged in check mode. A short inline comment (// Only directories become skills) would make the intent clear to future contributors.


What looks good

  • The sync-skills.ts logic is solid: it verifies both existence and correct target in --check mode, removes orphans in sync mode, and avoids interactive commands.
  • All .claude/skills entries are proper symlinks (confirmed), not text pointer files.
  • The per-app CLAUDE.md files are correctly trimmed to just skill references and package-specific notes.
  • The skill frontmatter (name, description) is consistently formatted across all new files and uses actionable trigger language.
  • ccusage-testing/SKILL.md correctly cross-references the tdd and fs-fixture skills rather than duplicating guidance.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
.agents/skills/ccusage-development/SKILL.md (1)

77-83: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Avoid recommending parallel execution for mutating checks.

Running pnpm run format in parallel with typecheck/test can cause flaky or inconsistent results because formatting changes files during other checks. Recommend sequential wording (format first, then typecheck/test in parallel if desired).

Suggested wording
-After code changes, run these in parallel:
+After code changes, run:
 
 ```sh
 pnpm run format
 pnpm typecheck
 pnpm run test

Optionally add a note: "Run `pnpm run format` first; `typecheck` and `test` may be run in parallel afterward."

</details>

Based on learnings: "After code changes, run `pnpm run format`, `pnpm typecheck`, and `pnpm run test`."

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/ccusage-development/SKILL.md around lines 77 - 83, Update the
wording that currently suggests running "pnpm run format", "pnpm typecheck", and
"pnpm run test" in parallel: change it to instruct running "pnpm run format"
first (since it mutates files), then run "pnpm typecheck" and "pnpm run test"
afterward — and note that those two may be executed in parallel if desired;
ensure the commands "pnpm run format", "pnpm typecheck", and "pnpm run test" are
explicitly mentioned in the revised sentence for clarity.


</details>

</blockquote></details>
<details>
<summary>.agents/skills/commit/SKILL.md (1)</summary><blockquote>

`131-137`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_

**Add language identifiers to fenced code blocks.**

Markdownlint flags these code fences as missing language identifiers. Adding `text` or `gitcommit` will clear warnings and keep docs lint-clean.





<details>
<summary>Suggested fix</summary>

```diff
-```
+```text
 <type>(<scope>): <subject>
 
 <body>
 
 <footer>

Apply the same change to the example blocks at lines 161 and 169:

```diff
-```
+```text
 feat(auth): add RefreshTokenService class
 
 Added new RefreshTokenService to handle token lifecycle management.
 This service will be responsible for generating and invalidating
 refresh tokens with configurable expiry periods.

- +text
feat(auth): integrate token rotation in middleware

Updated auth middleware to call RefreshTokenService when validating
tokens. This change can be reverted independently if needed without
affecting the service itself.

Also applies to: 159-175

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/commit/SKILL.md around lines 131 - 137, Add a language
identifier (e.g., text or gitcommit) to the fenced code blocks in the commit
examples so they pass markdownlint; update the generic commit template block
(the triple-backtick block containing "<type>(<scope>): <subject>") and the
example blocks that start with "feat(auth): add RefreshTokenService class" and
"feat(auth): integrate token rotation in middleware" to use ```text (or
```gitcommit) instead of bare ``` so lint warnings are cleared.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/commit/SKILL.md:
- Line 36: Update the skill documentation to use US English by replacing the
phrase "Analyse the changes above" with "Analyze the changes above" (and scan
the rest of .agents/skills/commit/SKILL.md for other UK spellings); keep the
existing note that line 179 allows UK English for commit messages but ensure the
skill documentation text itself follows US spelling conventions.

---

Duplicate comments:
In @.agents/skills/ccusage-development/SKILL.md:
- Around line 77-83: Update the wording that currently suggests running "pnpm
run format", "pnpm typecheck", and "pnpm run test" in parallel: change it to
instruct running "pnpm run format" first (since it mutates files), then run
"pnpm typecheck" and "pnpm run test" afterward — and note that those two may be
executed in parallel if desired; ensure the commands "pnpm run format", "pnpm
typecheck", and "pnpm run test" are explicitly mentioned in the revised sentence
for clarity.

In @.agents/skills/commit/SKILL.md:
- Around line 131-137: Add a language identifier (e.g., text or gitcommit) to
the fenced code blocks in the commit examples so they pass markdownlint; update
the generic commit template block (the triple-backtick block containing
"<type>(<scope>): <subject>") and the example blocks that start with
"feat(auth): add RefreshTokenService class" and "feat(auth): integrate token
rotation in middleware" to use ```text (or ```gitcommit) instead of bare ``` so
lint warnings are cleared.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a770481-c202-4bda-8b5f-06fb575062ba

📥 Commits

Reviewing files that changed from the base of the PR and between bd06550 and b65b868.

📒 Files selected for processing (5)
  • .agents/skills/ccusage-development/SKILL.md
  • .agents/skills/commit/SKILL.md
  • .agents/skills/pr-ai-review-workflow/SKILL.md
  • .claude/skills/pr-ai-review-workflow
  • CLAUDE.md
✅ Files skipped from review due to trivial changes (2)
  • .claude/skills/pr-ai-review-workflow
  • CLAUDE.md

Comment thread .agents/skills/commit/SKILL.md Outdated

@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.

6 issues found across 45 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/tdd/SKILL.md">

<violation number="1" location=".agents/skills/tdd/SKILL.md:22">
P2: The pytest detection condition has incorrect boolean grouping, so repos with only `pytest.ini` are misdetected as `unknown`.</violation>
</file>

<file name=".agents/skills/ccusage-development/SKILL.md">

<violation number="1" location=".agents/skills/ccusage-development/SKILL.md:48">
P2: The documented `pnpm run start ...` examples are invalid at repo root because root `package.json` has no `start` script.</violation>
</file>

<file name=".agents/skills/pr-ai-review-workflow/SKILL.md">

<violation number="1" location=".agents/skills/pr-ai-review-workflow/SKILL.md:60">
P2: The reviewThreads query is not paginated, so it can miss comments beyond the first 100 threads.</violation>

<violation number="2" location=".agents/skills/pr-ai-review-workflow/SKILL.md:95">
P2: The inline review reply endpoint is incorrect; it must include `<pull_number>` in the path.</violation>
</file>

<file name=".agents/skills/ccusage-agent-sources/SKILL.md">

<violation number="1" location=".agents/skills/ccusage-agent-sources/SKILL.md:157">
P2: This dependency guidance is too broad for deprecated wrapper packages: those wrappers resolve `ccusage` at runtime, so `ccusage` must stay in `dependencies`.

(Based on your team's feedback about keeping `ccusage` in dependencies for deprecated runtime wrappers.) [FEEDBACK_USED]</violation>
</file>

<file name=".agents/skills/commit/SKILL.md">

<violation number="1" location=".agents/skills/commit/SKILL.md:201">
P1: The push workflow should enforce the "never push main" rule before executing `git push`; currently it can still push directly to `main` when upstream is configured.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic

Comment thread .agents/skills/commit/SKILL.md Outdated
Comment thread .agents/skills/tdd/SKILL.md Outdated
Comment thread .agents/skills/ccusage-development/SKILL.md Outdated
Comment thread .agents/skills/pr-ai-review-workflow/SKILL.md Outdated
Comment thread .agents/skills/pr-ai-review-workflow/SKILL.md Outdated
Comment thread .agents/skills/ccusage-agent-sources/SKILL.md Outdated
@ryoppippi

Copy link
Copy Markdown
Member Author

Fixed the spell-check failure in 775b9c4. Local validation: direnv exec . typos --config ./typos.toml; pnpm run sync:skills:check.

@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.

3 issues found across 58 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/pr-ai-review-workflow/references/gh-review-commands.md">

<violation number="1" location=".agents/skills/pr-ai-review-workflow/references/gh-review-commands.md:65">
P2: This query only reads the first 100 review threads, so large PRs can appear fully resolved while unresolved threads exist on later pages. Add pagination (`after` + `pageInfo`) or explicitly document that this command is partial.</violation>
</file>

<file name=".agents/skills/commit/SKILL.md">

<violation number="1" location=".agents/skills/commit/SKILL.md:18">
P2: The inline command syntax is malformed, so `git status --short` is unlikely to execute and the skill may miss current git-state context.</violation>

<violation number="2" location=".agents/skills/commit/SKILL.md:26">
P2: The inline command syntax is malformed, so `git log --oneline -10` is unlikely to execute and recent history context may be missing.</violation>
</file>

Partial review: This PR has more than 50 files, so cubic reviewed the highest-priority files first. During the trial, paid plans get a higher file limit.
You can try an ultrareview to bypass the file limit, comment @cubic-dev-ai ultrareview. Learn more.
Fix all with cubic | Re-trigger cubic

Comment thread .agents/skills/commit/SKILL.md Outdated
Comment thread .agents/skills/commit/SKILL.md Outdated
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 16, 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 May 16, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md ==="
cat CLAUDE.md

echo ""
echo "=== scripts/sync-skills.ts ==="
cat scripts/sync-skills.ts

echo ""
echo "=== .agents/skills/ top-level directory listing ==="
ls -la .agents/skills/

echo ""
echo "=== .claude/skills/ - check entries ==="
ls -la .claude/skills/

echo ""
echo "=== .agents/skills/tdd/SKILL.md ==="
cat .agents/skills/tdd/SKILL.md

echo ""
echo "=== .agents/skills/fs-fixture/SKILL.md ==="
cat .agents/skills/fs-fixture/SKILL.md

echo ""
echo "=== Recent commits ==="
git log --oneline -10

Length of output: 16110


@ryoppippi Here is the updated review for PR #1003.


✅ Issue 1 — tdd/SKILL.md missing companion files — Fixed

Rust and Zig bullets now use inline guidance instead of missing file references. ✅

✅ Issue 2 — fs-fixture/SKILL.md hard-coded version — Acceptably addressed

The fd fallback is now present. The static path remains but is recoverable. ✅

✅ Spell-check — Fixed (commit 775b9c4)


❌ Issue 3 — CLAUDE.md skill name mismatch — Still outstanding

CLAUDE.md still references check-similarity-ts, but the actual directory under .agents/skills/ is reduce-similarities and there is no check-similarity-ts anywhere:

- - `check-similarity-ts` - AST-based duplicate TypeScript/JavaScript detection.
+ - `reduce-similarities` - AST-based duplicate TypeScript/JavaScript detection.

⚠️ Nit — sync-skills.ts silent skip — Still unaddressed

The intent of the non-directory guard is still undocumented:

// Only directories become skills; loose files in AGENTS_SKILLS are intentionally ignored
if (!s.isDirectory()) {
    return null;
}

One required fix (CLAUDE.md skill name) and one optional nit remaining.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

3 issues found across 58 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/ccusage-agent-sources/references/claude-code.md">

<violation number="1" location=".agents/skills/ccusage-agent-sources/references/claude-code.md:13">
P2: The documented Claude file shape is inconsistent with current session parsing behavior; session IDs are derived from a session directory, not a flat `{sessionId}.jsonl` path.</violation>
</file>

<file name=".agents/skills/ccusage-agent-sources/SKILL.md">

<violation number="1" location=".agents/skills/ccusage-agent-sources/SKILL.md:49">
P2: This dependency guidance is too broad and can break deprecated wrapper binaries. Wrapper runtime dependencies (for example `ccusage`) must remain in `dependencies`; only internal workspace runtime libraries should default to `devDependencies`.

(Based on your team's feedback about internal workspace deps vs deprecated wrapper package exceptions.) [FEEDBACK_USED]</violation>
</file>

<file name="apps/pi/CLAUDE.md">

<violation number="1" location="apps/pi/CLAUDE.md:18">
P3: The documented deprecated wrapper name is incorrect for this package (`ccusage-pi`). The actual compatibility wrapper binary here is `pi`, so this line can mislead docs/tests toward the wrong command.</violation>
</file>

Partial review: This PR has more than 50 files, so cubic reviewed the highest-priority files first. During the trial, paid plans get a higher file limit.
You can try an ultrareview to bypass the file limit, comment @cubic-dev-ai ultrareview. Learn more.
Fix all with cubic | Re-trigger cubic

Comment thread .agents/skills/ccusage-agent-sources/references/claude-code.md
Comment thread .agents/skills/ccusage-agent-sources/SKILL.md Outdated
Comment thread apps/pi/CLAUDE.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/commit/SKILL.md:
- Line 36: The SKILL.md references three missing docs which break links: create
the referenced files or remove/update the references; specifically add new files
named references/revertable-commits.md, references/git-apply.md, and
references/push.md with the intended guidance content (examples, commands, and
best-practices) or edit .agents/skills/commit/SKILL.md to point to existing docs
or inline the necessary guidance where the links appear; ensure the filenames
match the identifiers used in the file so the links resolve.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6feaa92d-4170-4513-b75e-1dd3acf4d991

📥 Commits

Reviewing files that changed from the base of the PR and between 775b9c4 and addb8c0.

📒 Files selected for processing (2)
  • .agents/skills/commit/SKILL.md
  • .agents/skills/pr-ai-review-workflow/references/gh-review-commands.md
✅ Files skipped from review due to trivial changes (1)
  • .agents/skills/pr-ai-review-workflow/references/gh-review-commands.md

Comment thread .agents/skills/commit/SKILL.md
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 16, 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 May 16, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md ==="
cat CLAUDE.md

echo ""
echo "=== scripts/sync-skills.ts ==="
cat scripts/sync-skills.ts

echo ""
echo "=== .agents/skills/ top-level directory listing ==="
ls -la .agents/skills/

echo ""
echo "=== Recent commits ==="
git log --oneline -10

Length of output: 7925


@ryoppippi Here is the updated review for PR #1003.


✅ Issue 1 — tdd/SKILL.md missing companion files — Fixed

✅ Issue 2 — fs-fixture/SKILL.md hard-coded version — Acceptably addressed

✅ Spell-check — Fixed (commit 775b9c4)


❌ Issue 3 — CLAUDE.md skill name mismatch — Still outstanding

CLAUDE.md still lists check-similarity-ts, but the actual directory under .agents/skills/ is reduce-similarities (confirmed from the directory listing — no check-similarity-ts entry exists):

- - `check-similarity-ts` - AST-based duplicate TypeScript/JavaScript detection.
+ - `reduce-similarities` - AST-based duplicate TypeScript/JavaScript detection.

This is the only remaining required fix — it will cause a silent runtime failure for any agent that tries to load the skill by that name.


⚠️ Nit — sync-skills.ts non-directory skip — Still unaddressed

// Only directories become skills; loose files in AGENTS_SKILLS (e.g. README.md) are intentionally ignored
if (!s.isDirectory()) {
    return null;
}

Optional, but the one-liner saves future contributors from wondering why a README.md dropped in .agents/skills/ is silently ignored in check mode.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 58 files

You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].

Partial review: This PR has more than 50 files, so cubic reviewed the highest-priority files first. During the trial, paid plans get a higher file limit.
You can try an ultrareview to bypass the file limit, comment @cubic-dev-ai ultrareview. Learn more.
Re-trigger cubic

Update the commit skill push reference so the executable push workflow checks the current branch before inspecting upstream state or running git push.

This makes the documented push path enforce the existing never-push-main policy instead of relying only on the higher-level principle in SKILL.md.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 16, 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 May 16, 2026

Copy link
Copy Markdown

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md ==="
cat CLAUDE.md

echo ""
echo "=== scripts/sync-skills.ts ==="
cat scripts/sync-skills.ts

echo ""
echo "=== .agents/skills/ top-level directory listing ==="
ls -la .agents/skills/

echo ""
echo "=== Recent commits ==="
git log --oneline -10

Length of output: 7942


@ryoppippi Here is my updated review for PR #1003.


✅ Issue 1 — tdd/SKILL.md missing companion files — Fixed

✅ Issue 2 — fs-fixture/SKILL.md hard-coded version — Acceptably addressed

✅ Spell-check — Fixed (commit 775b9c4)


❌ Issue 3 — CLAUDE.md skill name mismatch — Still outstanding

CLAUDE.md still lists check-similarity-ts, but the actual directory in .agents/skills/ is reduce-similarities (confirmed from the directory listing — no check-similarity-ts entry exists). Any agent that tries to load the skill by the listed name will fail silently.

- - `check-similarity-ts` - AST-based duplicate TypeScript/JavaScript detection.
+ - `reduce-similarities` - AST-based duplicate TypeScript/JavaScript detection.

⚠️ Nit — sync-skills.ts non-directory skip — Still unaddressed (optional)

// Only directories become skills; loose files in AGENTS_SKILLS (e.g. README.md) are intentionally ignored
if (!s.isDirectory()) {
    return null;
}

One required fix remaining before this is fully clean.

Rename the repo-local similarity skill metadata to reduce-similarities so CLAUDE.md, the skill directory, and the Claude symlink all use the same loadable skill name.

This avoids routing agents through the old check-similarity-ts name while keeping the similarity-ts tool description in the skill metadata.
@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review
@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented May 16, 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 May 16, 2026

Copy link
Copy Markdown

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== CLAUDE.md ==="
cat CLAUDE.md

echo ""
echo "=== scripts/sync-skills.ts ==="
cat scripts/sync-skills.ts

echo ""
echo "=== .agents/skills/ top-level directory listing ==="
ls -la .agents/skills/

echo ""
echo "=== Recent commits ==="
git log --oneline -10

echo ""
echo "=== .agents/skills/fs-fixture/SKILL.md ==="
cat .agents/skills/fs-fixture/SKILL.md

Length of output: 9312


@ryoppippi Here is the final updated review for PR #1003.


✅ Issue 1 — tdd/SKILL.md missing companion files — Fixed

✅ Issue 2 — fs-fixture/SKILL.md hard-coded version — Acceptably addressed

✅ Spell-check — Fixed (commit 775b9c4)

✅ Issue 3 — CLAUDE.md skill name mismatch — Fixed (commit affb635)

CLAUDE.md now correctly references reduce-similarities. All required fixes are in.


⚪ Nit — sync-skills.ts non-directory skip — Still optional, no blocker

// Only directories become skills; loose files in AGENTS_SKILLS (e.g. README.md) are intentionally ignored
if (!s.isDirectory()) {
    return null;
}

This is entirely optional — the logic is correct as-is.


All required issues are resolved. The migration is clean and the skill structure is solid. 🐰✨

[approve]

@ryoppippi
ryoppippi merged commit 502798a into main May 16, 2026
22 of 23 checks passed
@ryoppippi
ryoppippi deleted the chore/migrate-claude-guidance-to-skills branch May 16, 2026 13:15
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