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/.testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.