AI agent skills
What skills are, how they ship inside packages, and how lpm installs them.
Agent skills are markdown files that ship inside a package and tell an AI editor / agent how to use it correctly — usage examples, gotchas, common patterns, integration steps. When you install a skill-shipping package, LPM extracts the skills into .lpm/skills/<package>/ in your project and (optionally) auto-integrates them with your editor.
Skills are LPM's native answer to the "the AI hallucinates this library's API" problem. The package author writes the skill at publish time; consumers get authoritative usage docs the agent can read directly.
Status
Skills are currently a lpm.dev-only API behavior. Non-lpm.dev packages are skipped (no per-tarball skills declaration yet). Package authors publish skills via the lpm.dev UI; LPM runs LLM security scans on shipped skill content at publish time, so consumed skills are attested.
On the consumer side
Skills get installed automatically by lpm install and lpm add — you don't usually need to touch them by hand.
Manage them explicitly with lpm skills:
lpm skills list # list installed skills, grouped by package
lpm skills install @lpm.dev/owner.pkg # install skills for one package
lpm skills validate # local size + shape sanity check
lpm skills clean # wipe .lpm/skills/ entirelyvalidate is a local check, not a registry round-trip — it enforces the same per-skill 15 KB / 100-char-minimum / 100 KB-total / required-frontmatter rules that the publisher had to satisfy. clean is a blunt rm -rf on .lpm/skills/; it's not orphan-aware (re-run lpm install afterward to repopulate from your dependency closure). Skip skill installation per-invocation with --no-skills on lpm install or lpm add.
On-disk layout
my-project/
├── .lpm/
│ └── skills/
│ └── owner.pkg/
│ ├── usage.md
│ ├── gotchas.md
│ └── …
└── …When skills install via lpm install or lpm add, LPM auto-adds .lpm/skills/ to your project's .gitignore (commitable by hand if you want the skills in source control). The standalone lpm skills install command does not touch .gitignore — add the entry yourself if you go through that path.
Editor auto-integration
After a successful skill install, LPM detects which AI editor your project is using (by looking for one of the marker files below) and appends a one-time reference block to its rules file pointing the agent at .lpm/skills/. The block is idempotent — re-installs don't duplicate it. Skip with --no-editor-setup on lpm install / lpm add.
| Editor | Detected via |
|---|---|
| Claude Code | CLAUDE.md at the project root |
| Cursor | .cursor/rules/ directory |
| Cursor (legacy) | .cursorrules file |
| Windsurf | .windsurfrules file |
| GitHub Copilot | .github/copilot-instructions.md |
| Augment | .augment/instructions.md |
| Cline | .clinerules file |
If none of these markers exist, the auto-integration step is a no-op — your skills still install to .lpm/skills/<package>/, but no editor-side rules file is touched. Create the matching marker for your editor and re-run lpm install (or lpm skills install <pkg>) to opt in.
lpm skills
Full command reference, including the validation rules, JSON envelope, and .gitignore nuance, lives on lpm skills.
See also
lpm skills— command referencelpm install --no-skills— skip skill installation per-invocationlpm add --no-skills— same, for source delivery- MCP servers — different mechanism for AI integration (tool calls vs. ambient docs)