skills/agent-setup/SKILL.md
This skill should be used when the user wants to "add a skill", "add MCP server", "add a hook", "configure agent", "setup tool for pi and claude", "add plugin", "create plugin", "sync pi and claude", "write harness", or mentions configuring Pi agent or Claude Code settings. Ensures every tool is registered in both Pi and Claude Code.
npx skillsauth add popoffvg/dotfiles agent-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Every tool (skill, MCP server, hook, plugin) MUST be configured for both Pi and Claude Code.
dotfiles/
├── skills/ ← standalone skills (shared, single source of truth)
│ └── <skill>/SKILL.md
├── harness/plugins/<plugin>/ ← plugins with agent-specific adapters
│ ├── common/ ← shared logic, MCP servers, core code
│ ├── pi/ ← Pi extension adapter (index.ts)
│ └── claude/ ← Claude Code plugin (.claude-plugin/, hooks, agents, commands)
├── .mcp.json ← global MCP servers (symlinked to both agents)
└── .pi/agent/settings.json ← Pi settings
~/.claude/skills/<skill> → symlink → dotfiles/skills/<skill>
~/.pi/agent/settings.json → skills: ["~/Documents/git/dotfiles/skills"]
~/.claude/.mcp.json → symlink → dotfiles/.mcp.json
~/.pi/agent/.mcp.json → symlink → dotfiles/.mcp.json
~/.claude/settings.json ← Claude Code hooks, permissions, env
A plugin is a feature that needs agent-specific adapters (MCP servers, hooks, commands).
harness/<plugin-name>/
├── common/ ← shared code used by both agents
│ ├── server/ ← MCP server (if any)
│ │ ├── index.ts
│ │ └── package.json
│ └── core/ ← shared logic, types, utilities
├── pi/ ← Pi extension
│ └── index.ts ← Pi extension entry point
└── claude/ ← Claude Code plugin
└── .claude-plugin/
└── plugin.json ← plugin metadata
├── .mcp.json ← plugin-local MCP servers (use ${CLAUDE_PLUGIN_ROOT})
├── agents/ ← agent .md files
├── commands/ ← slash command .md files
├── hooks/ ← hooks.json
├── skills/ ← plugin-scoped skills (SKILL.md per dir)
└── bin/ ← helper scripts
Create the directory structure:
mkdir -p harness/plugins/<name>/{common,pi,claude/.claude-plugin}
Write plugin.json (harness/plugins/<name>/claude/.claude-plugin/plugin.json):
{
"name": "<name>",
"version": "0.1.0",
"description": "<what the plugin does>",
"author": { "name": "popoffvg" }
}
Register in Pi — add extension to dotfiles/.pi/agent/settings.json:
"extensions": [
"~/Documents/git/dotfiles/harness/plugins/<name>/pi/index.ts"
]
Register in Claude Code — symlink plugin to ~/.claude/plugins/:
ln -sfn ~/Documents/git/dotfiles/harness/plugins/<name>/claude ~/.claude/plugins/<name>
Enable in Claude Code — add to ~/.claude/settings.json:
"enabledPlugins": {
"<name>": true
}
Plugin-scoped MCP servers go in harness/plugins/<name>/claude/.mcp.json.
Use ${CLAUDE_PLUGIN_ROOT} to reference paths relative to the claude/ dir.
The common server code lives in harness/plugins/<name>/common/server/.
{
"mcpServers": {
"<name>": {
"command": "npx",
"args": ["tsx", "${CLAUDE_PLUGIN_ROOT}/../common/server/index.ts"],
"env": { "CWD": "${CWD}" }
}
}
}
For Pi, reference the same server in the extension's index.ts.
harness/plugins/<name>/claude/.claude-plugin/plugin.json existsharness/plugins/<name>/pi/index.ts exists (even if minimal)dotfiles/.pi/agent/settings.json → extensions~/.claude/plugins/<name>~/.claude/settings.json → enabledPluginscommon/, not duplicatedFor simple skills without agent-specific adapters:
Create dotfiles/skills/<name>/SKILL.md with frontmatter:
---
name: <name>
description: <trigger phrases for when to activate>
---
Symlink for Claude Code:
ln -sfn ~/Documents/git/dotfiles/skills/<name> ~/.claude/skills/<name>
Pi picks it up automatically via "skills": ["~/Documents/git/dotfiles/skills"].
Checklist:
dotfiles/skills/<name>/SKILL.md~/.claude/skills/<name>Single config at dotfiles/.mcp.json — both agents read it via symlink.
{
"mcpServers": {
"<name>": { "command": "...", "args": [...] }
}
}
Checklist:
dotfiles/.mcp.json~/.claude/.mcp.json and ~/.pi/agent/.mcp.json → dotfiles/.mcp.jsonEdit ~/.claude/settings.json → hooks:
{
"hooks": {
"PreToolUse": [{ "matcher": "...", "hook": "..." }],
"PostToolUse": [{ "matcher": "...", "hook": "..." }],
"Stop": [{ "hook": "..." }]
}
}
Add extension to dotfiles/.pi/agent/settings.json → extensions array.
Checklist:
# Skills: check symlinks
ls -la ~/.claude/skills/<name>
ls ~/.pi/agent/skills/ | grep <name>
# Plugins: check both registrations
ls -la ~/.claude/plugins/<name>
grep '<name>' dotfiles/.pi/agent/settings.json
# MCP: verify symlinks
readlink ~/.claude/.mcp.json
readlink ~/.pi/agent/.mcp.json
dotfiles/skills/ — never directly in agent dirs.dotfiles/harness/plugins/<name>/ with common/, pi/, claude/ dirs.dotfiles/.mcp.json — never edit symlink targets directly.common/ — never duplicate between pi/ and claude/.tools
Improve a whole CLAUDE.local.md — the private, per-project rules captured from user corrections. Wraps each conditional rule in a <task-relevant> block so it only surfaces for matching work, merges duplicates, generalizes one-off facts, drops stale entries, and routes raw project facts to engram. Use when the user says "improve claude.local", "clean up the local rules", "claude.local is bloated", or after the Stop hook has appended many rules.
testing
WM pipeline and conventions shared across all phases. Agents must read this before spec, impl, or verify work.
development
One entry point for spec writing, implementation, and bug fixing. Default is new (write spec → grill loop → produce notes → author TODO bodies). Other subcommands: verify (audit), revise (sync to shipped), prototype (settle a decision), code-map (diagram), impl (execute one TODO), fix (analyze cause, correct thoughts, fix behavior), help (this page). Invoke as /code <subcommand>.
development
Red-Green-Refactor cycle for bug fixes. Before fixing a bug, first write a failing test that reproduces it (Red), then make the minimal change to pass (Green), then clean up the code (Refactor). Use on any bug fix, error correction, failing test repair, or when user says "fix this bug".