npx skills add ...
npx skills add posthog/ai-plugin --skill skills-store
Discover and use shared team skills stored in PostHog. Use when the user asks to list, browse, load, or manage "shared skills", "team skills", or references the "skills store" / "skill store".
npx skills add posthog/ai-plugin --skill skills-store
Skills are reusable agent workflows stored in PostHog following the Agent Skills specification — a body of instructions (SKILL.md) plus optional bundled files (scripts, references, assets), structured metadata, and an allowed_tools list.
PostHog is the primary store for team-shared skills — always use the PostHog MCP skill tools to manage them.
When the MCP exposes the learn command, use it for progressive-disclosure reads across both sources:
project: identifies skills in the current project's Skills store. posthog: identifies skills bundled and published by PostHog. Global search checks both and returns PostHog results first. Quote a file path when it contains spaces.
Use the skill tools below for writes, version management, and MCP clients that do not expose learn.
| Tool | Purpose |
|---|---|
posthog:skill-list | List all available skills (Level 1 — names + descriptions) |
posthog:skill-get | Fetch a skill by name (Level 2 — body + file manifest) |
posthog:skill-file-get | Fetch a single bundled file by path (Level 3 — on demand) |
posthog:skill-create | Store a new skill (optionally with bundled files) |
posthog:skill-update | Publish a new version (body, edits, or file_edits) |
posthog:skill-file-create | Add one bundled file to a skill (publishes a new version) |
posthog:skill-file-delete | Remove one bundled file from a skill |
posthog:skill-file-rename | Rename one bundled file (move without rewriting content) |
posthog:skill-duplicate | Duplicate an existing skill under a new name |
posthog:skill-rename | Rename a skill, keeping its versions, files, and owners |
posthog:skill-archive | Archive all versions of a skill by name (cannot be undone) |
Skills use progressive disclosure: discover by description, fetch the body only when relevant, and pull individual files on demand. Do not fetch every file eagerly.
List all available skills:
Search by keyword (matches name and description):
skill-list returns only name + description — never the body. Use descriptions to decide which skill to fetch. The whole point of descriptions is that you can pick the right skill without loading any bodies.
The response contains:
body — the full SKILL.md instructions (read these like system instructions for the task)license, compatibility, allowed_tools, metadata — spec fieldsfiles[] — manifest of bundled files (path + content_type only, not content)Read body and follow it. Treat it as your system instructions for this task.
When the body references a script or reference doc, pull it on demand:
Only fetch files you actually need. If the body's decision tree points at one script, don't preload the others.
Follow the Agent Skills specification when creating skills:
name — kebab-case, max 64 chars, no leading/trailing/consecutive hyphensdescription — explain what it does AND when to use it. Include keywords agents will search for. This is the only thing visible at discovery time — make it count.body — keep under ~500 lines. Move detailed reference material, SQL, scripts, and long examples into bundled files so the body stays scannable.scripts/ for executable code, references/ for docs, assets/ for templates/data. Agents pull these on demand via skill-file-get, so splitting keeps context lean.Bundled files are optional and can be included in a single create call:
Each write publishes a new immutable version. Always fetch first to get the current version, then update with base_version for concurrency checks:
Pick the most surgical primitive for what you're changing — the API offers several so you don't have to round-trip the whole skill to tweak one part. Anything you don't touch is carried forward from the current latest.
Full replacement (good for substantial rewrites):
Incremental find/replace (good for small tweaks — no round-tripping the whole body):
Each edits[].old must match exactly once. body and edits are mutually exclusive.
Use file_edits to patch a single file without resending any other file:
Non-targeted files carry forward unchanged. file_edits cannot add, remove, or rename files — use the per-file tools below for that.
The file-path parameter has two names depending on where it sits in the request, so don't guess:
file_path — skill-file-get and skill-file-delete (the path is part of the URL).path — skill-file-create, plus the files=[{path, …}] array and file_edits=[{path, …}] (body fields on a file object).old_path / new_path — skill-file-rename.Passing path to file-get produces a /files/undefined/ 404. When in doubt, check the tool's input schema.
Atomic per-file tools — each publishes a new version and returns the updated skill (read its version to chain further edits via base_version):
Passing files to skill-update replaces ALL bundled files — anything not in the array is dropped. Only use this when you intentionally want to wipe and reseed the bundle. For everything else, prefer file_edits or the per-file CRUD tools above.
skill-archive hides every active version of a skill by name. It cannot be undone — the skill disappears from skill-list and skill-get for the whole team. Use it to retire a skill entirely; to remove a single file use skill-file-delete, and to roll back content publish a new version instead.
To move a skill from a local SKILL.md directory (e.g. a local skills folder with scripts/, references/, assets/ subdirs) into PostHog:
SKILL.md — use its frontmatter for name, description, license, compatibility, allowed_tools, metadata; the body after the frontmatter becomes bodyscripts/, references/, and assets/ subdirs and collect each file as { path, content, content_type }posthog:skill-create with everything in one shot — the skill lands at v1 with its full bundleThe skill is then available to the whole team via posthog:skill-get.
Most coding agents support local skills or slash commands. A local bridge skill gives you a shortcut (e.g. /phs my-github) that routes straight to the PostHog skills API — faster and more deterministic than asking the agent to "use the PostHog skills store to load my-github".
Create a local skill in your agent's skills directory with these instructions:
The bridge is intentionally minimal — it just routes to the MCP tools. The real instructions live in PostHog and update without touching local files.
Agent-specific setup: Where to save this depends on your agent. For Claude Code, save as
~/.claude/skills/phs/SKILL.md. For other agents, consult your agent's docs on local skill or slash command configuration.
learn project:<name> in MCP cli mode and skill-get in tools modelearn project:<name> <path> or skill-file-get only when needed — don't preload