Unified primitives for AI coding agents.
- Detect 45+ AI coding agents by env vars or config
- Discover and parse markdown-based skill files
- Parse GitHub/GitLab URLs, owner/repo shortcuts, local paths
- Clone repos, manage temp dirs, check git status
- Copy directories, create symlinks safely
- Track installed skills with lockfile and hashes
npm install unagentimport { detectCurrentAgent, discoverSkills, parseSource } from 'unagent'
// Detect which agent is running
const agent = detectCurrentAgent()
if (agent) {
console.log(`Running in ${agent.config.name}`)
}
// Discover skills
const skills = discoverSkills('~/.claude/skills', { recursive: true })
// Parse source strings
parseSource('unjs/unagent') // github
parseSource('github:user/repo#main') // github with ref
parseSource('./local/path') // localMIT