feat(skills): bunny skills install for AI coding tools - #160
Conversation
|
@codex review |
🦋 Changeset detectedLatest commit: ef0857f The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThe PR adds project and global installation/removal of the bundled bunny CLI agent skill.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/cli/src/core/agent-skill.ts | Implements marked-block management, project-boundary validation, and project/global skill file lifecycle; the previously reported functional marker and project-symlink issues are addressed. |
| packages/cli/src/commands/skills/install.ts | Adds project/global installation dispatch and structured JSON output. |
| packages/cli/src/commands/skills/remove.ts | Adds confirmed project/global removal with force and JSON modes. |
| packages/cli/src/commands/skills/content.ts | Embeds the shipped skill and reference documents as the installation payload. |
| packages/cli/src/core/agent-skill.test.ts | Covers idempotency, malformed markers, Claude detection, project symlink boundaries, and removal behavior. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
User["bunny skills install/remove"] --> Scope{"Project or global?"}
Scope -->|Project| Agents["Upsert/remove marked AGENTS.md block"]
Scope -->|Project + Claude detected| ProjectSkill["Write/remove .claude/skills/bunny-cli"]
Scope -->|Global| AgentsSkill["Write/remove ~/.agents/skills/bunny-cli"]
Scope -->|Global| ClaudeSkill["Write/remove ~/.claude/skills/bunny-cli"]
Reviews (3): Last reviewed commit: "refactor(skills): tighten comments and c..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c95da7ecab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lled guidance - refuse installer writes that a symlink would redirect outside the project (project scope only; in-project symlinks like AGENTS.md -> CLAUDE.md still work) - treat duplicated managed markers as malformed instead of slicing across them - installed AGENTS.md section no longer claims every command emits JSON or that prompts auto-skip without a TTY; it now tells agents to pass value flags and --force
…s and skills remove - --global now writes to both ~/.agents/skills/bunny-cli (the cross-tool Agent Skills directory read by Cursor, Codex, OpenCode, Copilot, and others) and ~/.claude/skills/bunny-cli - install gains an update alias since reinstalling refreshes in place - new skills remove (rm, uninstall) strips the AGENTS.md block (deleting the file only when the installer's own scaffold heading is all that remains), deletes the skill dirs for either scope, confirms unless --force, and reuses the symlink-escape guard
- collapse multi-line docstrings in agent-skill.ts to one-liners - writeSkillFiles iterates Object.entries, dropping the string cast - remove.ts drops the filesystem re-check for its AGENTS.md message - merge single-assertion marker/predicate tests; assertion count unchanged
What
bunny skills installinstalls the bunny agent skill so AI coding tools (Claude Code, Cursor, Codex, and anything else that reads AGENTS.md) know the CLI exists and how to drive it.Two scopes:
<!-- bunny-cli:start/end -->) into the project'sAGENTS.md, creating the file if missing and replacing the block in place on reinstall. When the project uses Claude Code (.claude/orCLAUDE.mdexists), it also writes the full skill with all references to.claude/skills/bunny-cli/.--global): writes the skill to~/.claude/skills/bunny-cli/so Claude Code picks it up in every project. This is the hook for "install the skill when you install the CLI" (the install script or a post-login nudge can invoke it later).How
core/agent-skill.ts(marker upsert, Claude detection, project/global writers). Markers are per-skill, so future per-resource skills (for example database migrations) can maintain their own blocks alongside this one and reuse the same installer.skills/bunny-cli/**, embedded at bundle time via Bun text imports incommands/skills/content.ts; there is a single source of truth and no runtime file lookup, so the compiled binaries and the npm launcher both carry it. A test fails ifSKILL.mdroutes to a reference that is not embedded.--help,--output json,--force, key namespaces,bunny apifallback).Notes
AGENTS.mdcontent is never touched outside the marked block..claude/litter; they get only theAGENTS.mdblock.db-migrationsPR (feat(db): migrations create, list, and apply #136) will build on this by documenting migrations in the database reference, and first-use prompts (for example after a firstmigrations create) can offer this install viaisProjectSkillInstalled().