Skip to content

feat: skill command group + bundled SKILL.md#13

Merged
andyhtran merged 1 commit intomainfrom
cct-skill
May 1, 2026
Merged

feat: skill command group + bundled SKILL.md#13
andyhtran merged 1 commit intomainfrom
cct-skill

Conversation

@andyhtran
Copy link
Copy Markdown
Owner

Summary

  • Ship cct as a Claude Code skill so agents auto-discover the tool without the user manually copying SKILL.md into ~/.claude/skills/cct/. Skill content is embedded in the binary; cct skill install creates a symlink at ~/.claude/skills/cct -> ~/.cache/cct/skills/cct, and the live copy auto-syncs from the embedded version on every cct invocation — brew upgrade cct keeps the on-disk skill aligned with the binary, no reinstall needed.
  • Add cct skill install / uninstall / status / nudge subcommands. Install is idempotent and refuses to overwrite a foreign file or symlink. Uninstall removes only the symlink, preserves the live copy for fast reinstall. Status reports install/sync/nudge state with --json for tooling.
  • Until installed, every cct invocation prints a one-line install hint to stderr (rate-limited to once per 24h, dismissible via cct skill nudge off). Skill content is reordered by real session-history usage frequency (search > export > info > list) with explicit anti-triggers for grep ~/.claude/projects/ and the non-existent cct show. Includes references/commands.md and references/search-syntax.md with full JSON schemas for stats, list, and search so agents stop guessing field names.

Test plan

  • just ci passes (gofumpt + golangci-lint + go test)
  • On a fresh ~/.claude/skills/ (no existing cct/ entry), cct skill install succeeds and reports Installed cct skill at ~/.claude/skills/cct
  • cct skill status shows Installed: yes and Sync: in sync with embedded version
  • ls -la ~/.claude/skills/ shows cct as a symlink (not a regular directory) pointing at ~/.cache/cct/skills/cct
  • Frontmatter visible through the symlink: head -4 ~/.claude/skills/cct/SKILL.md shows the name: cct block
  • cct skill install a second time is a no-op (idempotent — no error, exit 0)
  • Pre-create a regular file at ~/.claude/skills/cct/SKILL.md and confirm cct skill install refuses with a clear error
  • cct skill uninstall removes the symlink; ~/.cache/cct/skills/cct/ survives
  • On a fresh state with no symlink, cct version prints the install nudge to stderr; running cct version again immediately is silent (24h rate limit)
  • cct skill nudge off silences the nudge persistently; cct skill nudge on re-enables; cct skill nudge status reports current state
  • cct skill status --json emits a stable, parseable schema with installed, embedded_hash, live_hash, in_sync, nudge_enabled

🤖 Generated with Claude Code

Ship cct as a Claude Code skill so agents auto-discover the tool without
the user manually copying SKILL.md into ~/.claude/skills/. The skill
content is embedded in the binary; cct skill install creates a symlink
at ~/.claude/skills/cct -> ~/.cache/cct/skills/cct, and the live copy
auto-syncs from the embedded version on every cct invocation so brew
upgrade cct keeps the on-disk skill aligned with the binary.

Until installed, every cct invocation prints a one-line install hint to
stderr (rate-limited to once per 24h, dismissible via cct skill nudge
off). Skill content is reordered by real usage frequency from session
history (search > export > info > list) and includes explicit
anti-triggers for grep ~/.claude/projects/ and the non-existent
cct show.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andyhtran andyhtran merged commit 045d449 into main May 1, 2026
3 checks passed
@andyhtran andyhtran deleted the cct-skill branch May 1, 2026 14:05
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