agentcairn-setup — Claude Code skill: what it does, how to install
Manages installation, updates, and diagnostics for AgentCairn persistent memory across coding agents. It coordinates setup through the native installer.
npx skills add ccf/agentcairn --skill agentcairn-setup -a claude-codeWhat agentcairn-setup does
This skill acts as a management layer for setting up AgentCairn local-first memory across developer hosts like Claude Code, Codex, or Cursor. It verifies whether recall and remember tools exist, selects the target host ID, and invokes the official CLI. The skill itself does not bundle the runtime, hooks, or MCP server code.
The execution relies on Astral's uv. Instead of manual configuration edits, it performs dry runs using uvx --from agentcairn cairn install <host> --print to inspect generated commands and files. For Claude Code and Codex, it routes setup to the host's native plugin manager. For MCP-based hosts, it merges entries into configuration files with automated backups, exposing tools like search, recent, and build_context after a session restart.
Running plain uvx cairn breaks setup by pulling an unrelated package from the registry. You must have uvx installed beforehand, and every command requires the explicit --from agentcairn flag.
What it helps with
- Connect AgentCairn local memory to Claude Code or Cursor
- Inspect generated MCP and plugin configurations before applying changes
- Recover missing recall and remember tools
- Update the AgentCairn integration using native plugin managers
Example prompts for the agent
- Check if AgentCairn memory is active in Claude Code and set it up if needed
- Preview the AgentCairn MCP configuration for Cursor before writing files
- Repair missing recall and remember tools in this environment
How to install agentcairn-setup
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill agentcairn-setup -a claude-code2Manually: put the files in place
~/.claude/skills/agentcairn-setup/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agentcairn-setup/
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill agentcairn-setup -a codex2Manually: put the files in place
.agents/skills/agentcairn-setup/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill agentcairn-setup -a cursor2Manually: put the files in place
.cursor/skills/agentcairn-setup/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ccf/agentcairn agentcairn-setup2Manually: put the files in place
.github/skills/agentcairn-setup/SKILL.md1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill agentcairn-setup -a gemini-cli2Platform CLI
gemini skills install https://github.com/ccf/agentcairn --path skills/agentcairn-setupManually: put the files in place
.devin/skills/agentcairn-setup/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill agentcairn-setup -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agentcairn-setup
How to install agentcairn-setup in Claude Code?
Run npx skills add ccf/agentcairn --skill agentcairn-setup -a claude-code. Alternatively, add the skill file directly to ~/.claude/skills/agentcairn-setup/SKILL.md.
What does the agentcairn-setup skill do?
It discovers the target harness, runs the AgentCairn CLI installer via uvx, checks memory tool availability, and handles safe upgrades without manual edits.
Why is running plain uvx cairn prohibited?
Running uvx cairn resolves an entirely different package. You must specify --from agentcairn, as in uvx --from agentcairn cairn install <host>.
Source text
SKILL.md · Apache-2.0
--- name: agentcairn-setup description: Install, configure, verify, upgrade, or repair AgentCairn persistent cross-agent memory. Use when a user wants shared local-first memory in Claude Code, Codex, Cursor, OpenCode, Antigravity, VS Code, Claude Desktop, or another supported harness; when AgentCairn recall or remember tools are missing; or when its plugin, MCP server, skill, or ambient hooks need setup diagnostics. --- # AgentCairn setup Set up the full AgentCairn integration by delegating to AgentCairn's native, preview-first installer. Treat this skill as a management layer only: installing this skill does not install the AgentCairn runtime, MCP server, plugin, or hooks. ## Preserve the boundary - Use `uvx --from agentcairn cairn install` as the source of truth for supported hosts and generated configuration. - Do not copy plugin files, write MCP configuration by hand, or reproduce the installer's host-specific logic. - Do not claim AgentCairn is ready merely because this setup skill is present. - Do not use plain `uvx cairn`; that resolves an unrelated package. Use `uvx --from agentcairn cairn ...`. - Use `--vault` only for MCP hosts. Configure plugin-host vaults through the plugin or AgentCairn's shared configuration. - Do not install or repair every detected host unless the user explicitly asks. - Do not write a test memory without the user's approval. ## 1. Establish the target Check whether AgentCairn's `recall` and `remember` MCP tools are already loaded. If they are available and the user did not request an upgrade or repair, report that the full integration is active and move to verification. Identify the current or requested host. Use these installer IDs: | Host | Installer ID | Integration | |---|---|---| | Claude Code | `claude-code` | Native plugin, MCP tools, skill, and hooks | | Codex | `codex` | Native plugin, MCP tools, skill, and hooks | | Cursor | `cursor` | MCP configuration and memory skill | | OpenCode | `opencode` | MCP configuration, commands, and native plugin | | Antigravity | `antigravity` | Native plugin; requires a local plugin source | | VS Code / Copilot | `vscode` | MCP configuration | | Claude Desktop | `claude-desktop` | MCP configuration | | Gemini CLI | `gemini` | MCP configuration | Treat Hermes Agent separately because it uses a native `MemoryProvider`, not `cairn install`: ```bash hermes plugins install ccf/agentcairn/integrations/hermes hermes memory setup agentcairn ``` If the target is still ambiguous after inspecting the current harness and installed CLIs, ask the user which one to configure. Never choose `--all` as a shortcut. ## 2. Check the prerequisite Run: ```bash uvx --version ``` If `uvx` is missing, explain that AgentCairn uses Astral's `uv` and ask before installing a system-level prerequisite. Do not silently run a remote installer. Confirm the AgentCairn package and CLI resolve: ```bash uvx --from agentcairn cairn --version ``` ## 3. Preview without changing host configuration Use discovery mode to list detected hosts. It writes no AgentCairn host configuration, but detection proves only that a host is present—not that AgentCairn is installed or healthy: ```bash uvx --from agentcairn cairn install ``` For a plugin host, preview the exact target: ```bash uvx --from agentcairn cairn install <host> --print ``` This prints only the native plugin commands. For MCP hosts, the same `--print` operation prints the complete merged configuration and may include credentials from unrelated MCP servers. Do not run it directly through a chat-visible tool or paste its output into an agent transcript. Ask the user to review it in their own terminal, or redirect it to a mode-`0600` temporary file, inspect only the AgentCairn entry locally, and remove the temporary file. For Antigravity, first locate a local checkout of the AgentCairn plugin and preview with its path: ```bash uvx --from agentcairn cairn install antigravity --source <repo>/plugin --print ``` Summarize the plugin commands or configuration path shown by the preview without exposing unrelated configuration values. If the user has not already authorized the installation or repair, get approval before continuing. ## 4. Apply one targeted installation Run the same operation without `--print`: ```bash uvx --from agentcairn cairn install <host> ``` For Antigravity, retain the reviewed local source: ```bash uvx --from agentcairn cairn install antigravity --source <repo>/plugin ``` For Claude Code and Codex, let the installer delegate to the host's plugin CLI. Confirm the requested plugin host's CLI is available before applying. For MCP hosts, let the installer perform its backup-first, merge-preserving configuration write. Treat a failed command as a failed install; report its last useful error instead of continuing as though setup succeeded. ## 5. Verify the full integration Verify each layer that the host supports: 1. Confirm the install command exited successfully. 2. For Claude Code, run `claude plugin list --json`; for Codex, run `codex plugin list --json`. Confirm `agentcairn` is installed and enabled. 3. For an MCP-configured host, confirm its AgentCairn entry matches the privately reviewed targeted `--print` preview without removing unrelated configuration. 4. Restart the host. A running session cannot reliably hot-load a new plugin, MCP server, skill, or hook. 5. In a fresh session, confirm the AgentCairn `search`, `recall`, `build_context`, `recent`, and `remember` tools are present. Use `recent` or a focused read-only recall to exercise the MCP server. Ask before writing and recalling a synthetic memory. 6. If a vault index already exists, optionally run `uvx --from agentcairn cairn doctor --vault <vault>` to check index health. Do not treat an empty, not-yet-indexed vault as a plugin failure. Report partial support honestly. MCP tools working does not prove ambient hooks loaded; a setup skill loading does not prove the MCP tools exist. ## Repair or upgrade Start again from the targeted `--print` preview and preserve the same host ID and vault. For MCP hosts, rerun the targeted installer; its writes are idempotent, backup-first, and preserve unrelated servers. For native plugin hosts, refresh through the host's own plugin manager before restarting: ```bash # Codex codex plugin marketplace upgrade agentcairn codex plugin add agentcairn@agentcairn # Claude Code claude plugin marketplace update agentcairn claude plugin update agentcairn@agentcairn ``` Do not remove an existing integration, delete a vault, or overwrite a malformed configuration as a repair shortcut. Surface the conflict and ask before any destructive recovery.
© ccf · Apache-2.0 · ccf/agentcairn