Skip to main content

Overview

Auto-Skill supports 10 AI coding agents with automatic cross-agent skill sharing. When a skill is generated or installed, Auto-Skill creates symlinks in all detected agent skill directories, enabling any agent to benefit from skills learned by another.
Cross-agent learning: A skill generated while using Claude Code becomes instantly available to Cursor, Aider, Windsurf, and all other installed agents.

Supported Agents

Auto-Skill detects and supports the following coding agents:

Claude Code

Anthropic’s CLI for ClaudeSkill Dir: ~/.claude/skills

OpenCode

Open-source coding agentSkill Dir: ~/.opencode/skills

Cursor

AI-first code editorSkill Dir: ~/.cursor/skills

Aider

AI pair programming toolSkill Dir: ~/.aider/skills

Windsurf

Codeium’s AI IDESkill Dir: ~/.windsurf/skills

Continue

Continue.dev IDE extensionSkill Dir: ~/.continue/skills

Cline

AI coding agent for VS CodeSkill Dir: ~/.cline/skills

Codex CLI

OpenAI’s Codex CLI agentSkill Dir: ~/.codex/skills

Amp

Sourcegraph’s AI coding agentSkill Dir: ~/.amp/skills

GitHub Copilot

GitHub’s AI coding assistantSkill Dir: ~/.copilot/skills

Agent Detection

Auto-Skill detects installed agents using three strategies:
1

Environment Variables

Checks for agent-specific environment variables (e.g., CLAUDE_SESSION_ID)
2

Configuration Files

Looks for agent config files (e.g., ~/.claude/settings.json)
3

Skill Directories

Checks if the agent’s skill directory exists
const KNOWN_AGENTS: AgentConfig[] = [
  {
    id: "claude-code",
    name: "Claude Code",
    skillDir: path.join(HOME, ".claude", "skills"),
    envVar: "CLAUDE_SESSION_ID",
    configFile: "~/.claude/settings.json",
    description: "Anthropic's CLI for Claude",
  },
  {
    id: "cursor",
    name: "Cursor",
    skillDir: path.join(HOME, ".cursor", "skills"),
    configFile: "~/.cursor/settings.json",
    description: "AI-first code editor",
  },
  {
    id: "aider",
    name: "Aider",
    skillDir: path.join(HOME, ".aider", "skills"),
    configFile: "~/.aider.conf.yml",
    description: "AI pair programming tool",
  },
  // ... 7 more agents
];

Detection Implementation

function isInstalled(agent: AgentConfig): boolean {
  // 1. Check env var (indicates agent is running)
  if (agent.envVar && process.env[agent.envVar]) {
    return true;
  }

  // 2. Check config file existence
  if (agent.configFile) {
    const expanded = expandHome(agent.configFile);
    if (fs.existsSync(expanded)) {
      return true;
    }
  }

  // 3. Check skill directory existence
  return fs.existsSync(agent.skillDir);
}
When a skill is created, Auto-Skill automatically creates symlinks in all detected agent directories:
function createSkillSymlinks(
  skillPath: string,
  skillName: string,
  excludeAgentId?: string,
): string[] {
  const created: string[] = [];

  // Determine source directory to link to
  const stat = fs.existsSync(skillPath) ? fs.statSync(skillPath) : null;
  const source = stat?.isDirectory() ? skillPath : path.dirname(skillPath);

  for (const agent of detectInstalledAgents()) {
    if (agent.id === excludeAgentId) {
      continue; // Skip source agent
    }

    const targetDir = path.join(agent.skillDir, skillName);

    // Skip if already exists
    if (fs.existsSync(targetDir)) {
      continue;
    }

    try {
      fs.mkdirSync(path.dirname(targetDir), { recursive: true });
      fs.symlinkSync(source, targetDir, "dir");
      created.push(targetDir);
    } catch {
      // Best-effort: continue on failure
    }
  }

  return created;
}

Example

When Claude Code generates a skill at ~/.claude/skills/react-testing/SKILL.md, Auto-Skill creates symlinks:
~/.cursor/skills/react-testing -> ~/.claude/skills/react-testing
~/.aider/skills/react-testing -> ~/.claude/skills/react-testing
~/.windsurf/skills/react-testing -> ~/.claude/skills/react-testing
# ... and so on for all installed agents
Symlinks ensure that all agents reference the same skill file. Updates to the skill are instantly reflected across all agents.

Agent Registry API

createAgentRegistry()

Factory function to create an agent registry instance.
import { createAgentRegistry } from "auto-skill";

const registry = createAgentRegistry();

Methods

listAgents
() => AgentConfig[]
List all known agent configurations (all 10 agents).
detectInstalledAgents
() => AgentConfig[]
Detect which agents are currently installed on this system.
const installed = registry.detectInstalledAgents();
console.log(`Found ${installed.length} installed agents`);
// Output: Found 3 installed agents
detectCurrentAgent
() => AgentConfig | null
Detect which agent is currently running based on environment variables.
const current = registry.detectCurrentAgent();
if (current) {
  console.log(`Running in ${current.name}`);
}
getAgent
(agentId: string) => AgentConfig | null
Get a specific agent configuration by ID.
const claude = registry.getAgent("claude-code");
console.log(claude?.skillDir); // ~/.claude/skills
getAgentSkillDir
(agentId: string) => string | null
Get the skill directory path for a specific agent.
const dir = registry.getAgentSkillDir("cursor");
console.log(dir); // /home/user/.cursor/skills
Create symlinks to a skill in all installed agents’ skill directories.Parameters:
  • skillPath - Path to the skill file or directory
  • skillName - Name of the skill (used as symlink directory name)
  • excludeAgentId - Agent to exclude (typically the source agent)
Returns: Array of created symlink paths
const links = registry.createSkillSymlinks(
  "~/.claude/skills/react-testing",
  "react-testing",
  "claude-code" // Exclude source agent
);
console.log(`Created ${links.length} symlinks`);
Remove symlinks for a skill from all agent directories.Returns: Number of symlinks removed
const removed = registry.removeSkillSymlinks("react-testing");
console.log(`Removed ${removed} symlinks`);
registerAgent
(agent: AgentConfig) => void
Register a new agent configuration (for custom agents).
registry.registerAgent({
  id: "my-agent",
  name: "My Custom Agent",
  skillDir: "/path/to/skills",
  description: "Custom agent",
});
unregisterAgent
(agentId: string) => boolean
Remove an agent from the registry.Returns: True if removed, false if not found

CLI Commands

List Agents

List all known and detected agents:
npx auto-skill agents
Known Agents (10):

✓ Claude Code      ~/.claude/skills       [INSTALLED]
✓ Cursor           ~/.cursor/skills       [INSTALLED]
✓ Aider            ~/.aider/skills        [INSTALLED]
○ Windsurf         ~/.windsurf/skills
○ Continue         ~/.continue/skills
○ Cline            ~/.cline/skills
○ Codex CLI        ~/.codex/skills
○ OpenCode         ~/.opencode/skills
○ Amp              ~/.amp/skills
○ GitHub Copilot   ~/.copilot/skills

Installed: 3 agents
Current: Claude Code (detected via CLAUDE_SESSION_ID)

View Agent Details

npx auto-skill agents --agent claude-code

Custom Agents

You can register custom agents at runtime:
import { createAgentRegistry } from "auto-skill";

const registry = createAgentRegistry();

registry.registerAgent({
  id: "my-agent",
  name: "My Agent",
  skillDir: "/path/to/my-agent/skills",
  envVar: "MY_AGENT_SESSION",
  configFile: "~/.my-agent/config.json",
  description: "My custom coding agent",
});

const installed = registry.detectInstalledAgents();
// Now includes your custom agent if detected

Architecture Notes

From CLAUDE.md:
Multi-Agent: Supports multiple coding agents with cross-agent skill sharing via symlinks
  • Implementation: Agent Plugin - Hooks for observation, skills for output, cross-agent symlinks
  • Skill storage: Local filesystem - Simplicity, matches existing skill system
Symlinks are the key to cross-agent compatibility. They ensure skills are stored once and referenced by all agents, avoiding duplication and keeping all agents in sync.

See Also

Skill Graduation

Promote external skills to local

Lock File

Track installed skills with integrity verification

Build docs developers (and LLMs) love