ccf/agentcairn/plans
Claude Code and agent skill by ccf/agentcairn
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install ccf/agentcairn/plansSKILL.md
Complete Cursor Integration (MCP + Skill) Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.
Goal: cairn install cursor installs the using-agentcairn-memory SKILL.md into ~/.cursor/skills/ alongside the existing MCP write, so Cursor is first-class on the output side (recall/remember guidance + MCP tools).
Architecture: Ship the skill body as package data under src/cairn/assets/ (so a pip-installed cairn has it without the repo plugin/ dir), kept byte-identical to plugin/skills/using-agentcairn-memory/SKILL.md by a test. Add a Host.skill_dir field (cursor → ~/.cursor/skills) and a hosts/skills.py installer; the cairn install mcp-host branch installs the skill when h.skill_dir is set. No change to the MCP server, ingest, consolidation, or the Markdown contract.
Tech Stack: Python 3.11+, hatchling (packages = ["src/cairn"]), importlib.resources, Typer CLI, pytest, uv (uv run pytest / uv run ruff).
Reference: Spec docs/specs/2026-06-15-cursor-skill-design.md. Branch feat/cursor-skill is checked out with the spec committed.
File Structure
| File | Responsibility | |
|---|---|---|
src/cairn/assets/using-agentcairn-memory/SKILL.md | new — bundled (wheel-shipped) copy of the memory skill the CLI installs into Cursor | |
src/cairn/hosts/__init__.py | add Host.skill_dir field; set skill_dir="~/.cursor/skills" on the cursor entry | |
src/cairn/hosts/skills.py | new — cursor_skill_text() (read package data) + install_skill() (write <root>/using-agentcairn-memory/SKILL.md) | |
src/cairn/cli.py | install mcp-host branch installs the skill when h.skill_dir is set | |
tests/test_plugin_assets.py | asset-sync test (package copy byte-identical to plugin/ copy) | |
tests/test_hosts.py | skill_dir registry values; install_skill write + dry behavior | |
tests/test_cli.py | cairn install cursor writes the skill; --print shows a note and writes nothing | |
README.md, CLAUDE.md, website/src/lib/content.ts | Cursor gets the memory skill (MCP + skill), still an MCP host |
Task 1: Bundle the skill as package data + sync test
Files:
- Create:
src/cairn/assets/using-agentcairn-memory/SKILL.md - Test:
tests/test_plugin_assets.py(add one test)
The repo plugin/skills/using-agentcairn-memory/SKILL.md is the canonical content (it is what the Claude/Codex/Antigravity plugins bundle). A pip-installed cairn does NOT ship plugin/, so the CLI needs its own copy inside the package. We enforce they never drift with a byte-identical test.
- [ ] Step 1: Write the failing sync test
Add to tests/test_plugin_assets.py (note the existing ROOT/PLUGIN constants at the top of that file):
- [ ] Step 2: Run it to verify it fails
Run: uv run pytest tests/test_plugin_assets.py::test_bundled_cursor_skill_matches_plugin_copy -v Expected: FAIL — FileNotFoundError (the src/cairn/assets/... file does not exist yet).
- [ ] Step 3: Create the bundled asset as an exact copy
Create the directory and copy the file verbatim (do NOT hand-retype — copy the bytes):
- [ ] Step 4: Run the test to verify it passes
Run: uv run pytest tests/test_plugin_assets.py::test_bundled_cursor_skill_matches_plugin_copy -v Expected: PASS.
- [ ] Step 5: Verify the asset ships in the wheel
hatchling's packages = ["src/cairn"] includes non-Python files under the package. Confirm the built wheel actually contains the .md:
Expected: prints OK dist/agentcairn-*.whl. If the assert fails, add an explicit [tool.hatch.build.targets.wheel.force-include] for the asset in pyproject.toml and rebuild. Then clean up build artifacts so they aren't committed:
- [ ] Step 6: Commit
Task 2: Host.skill_dir field + cursor value
Files:
- Modify:
src/cairn/hosts/__init__.py(theHostdataclass + the cursorHOSTSentry) - Test:
tests/test_hosts.py
- [ ] Step 1: Write the failing test
Add to tests/test_hosts.py:
- [ ] Step 2: Run to verify it fails
Run: uv run pytest tests/test_hosts.py::test_cursor_host_has_skill_dir tests/test_hosts.py::test_non_skill_hosts_have_no_skill_dir -v Expected: FAIL — AttributeError: 'Host' object has no attribute 'skill_dir'.
- [ ] Step 3: Add the field and set it on cursor
In src/cairn/hosts/__init__.py, add a field to the Host dataclass (after plugin_add, keeping all fields with defaults so ordering is valid):
Then update the cursor entry in HOSTS:
- [ ] Step 4: Run to verify it passes
Run: uv run pytest tests/test_hosts.py -v Expected: PASS (both new tests + existing host tests).
- [ ] Step 5: Commit
Task 3: Skill installer (hosts/skills.py)
Files:
- Create:
src/cairn/hosts/skills.py - Test:
tests/test_hosts.py
- [ ] Step 1: Write the failing tests
Add to tests/test_hosts.py:
- [ ] Step 2: Run to verify they fail
Run: uv run pytest tests/test_hosts.py -k "skill_text or install_skill" -v Expected: FAIL — ModuleNotFoundError: No module named 'cairn.hosts.skills'.
- [ ] Step 3: Write the installer
Create src/cairn/hosts/skills.py:
- [ ] Step 4: Run to verify they pass
Run: uv run pytest tests/test_hosts.py -k "skill_text or install_skill" -v Expected: PASS.
- [ ] Step 5: Commit
Task 4: cairn install installs the skill for skill-aware MCP hosts
Files:
- Modify:
src/cairn/cli.py(theinstallcommand's mcp-hostelsebranch, ~lines 484-491) - Test:
tests/test_cli.py
- [ ] Step 1: Write the failing tests
Add to tests/test_cli.py (the file already imports runner and app; mirror the existing test_install_cursor_writes_entry style):
- [ ] Step 2: Run to verify they fail
Run: uv run pytest tests/test_cli.py -k "install_cursor_writes_skill or install_cursor_print_notes_skill" -v Expected: FAIL — the skill file is not written / the --print output lacks the note.
- [ ] Step 3: Add the skill install to the mcp-host branch
In src/cairn/cli.py, add the import to the existing from cairn.hosts.* import block at the top of install (alongside from cairn.hosts.writers import write_host):
Then extend the mcp-host else branch so it installs the skill when h.skill_dir is set:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/plans/2026-06-15-cursor-skill.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ccf/agentcairn/plans)