skills-store

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PostHog Skills Store

PostHog技能存储库

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.
技能是遵循Agent Skills specification存储在PostHog中的可复用Agent工作流——包含一组指令(SKILL.md)以及可选的捆绑文件(脚本、参考资料、资源)、结构化元数据和
allowed_tools
列表。
PostHog是团队共享技能的主要存储库——请始终使用PostHog MCP技能工具来管理它们。

Available tools

可用工具

ToolPurpose
posthog:llma-skill-list
List all available skills (Level 1 — names + descriptions)
posthog:llma-skill-get
Fetch a skill by name (Level 2 — body + file manifest)
posthog:llma-skill-file-get
Fetch a single bundled file by path (Level 3 — on demand)
posthog:llma-skill-create
Store a new skill (optionally with bundled files)
posthog:llma-skill-update
Publish a new version (body,
edits
, or
file_edits
)
posthog:llma-skill-file-create
Add one bundled file to a skill (publishes a new version)
posthog:llma-skill-file-delete
Remove one bundled file from a skill
posthog:llma-skill-file-rename
Rename one bundled file (move without rewriting content)
posthog:llma-skill-duplicate
Duplicate an existing skill under a new name
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.
工具名称用途
posthog:llma-skill-list
列出所有可用技能(一级——名称+描述)
posthog:llma-skill-get
根据名称获取技能(二级——主体内容+文件清单)
posthog:llma-skill-file-get
根据路径获取单个捆绑文件(三级——按需获取)
posthog:llma-skill-create
存储新技能(可附带捆绑文件)
posthog:llma-skill-update
发布新版本(更新主体内容、
edits
file_edits
posthog:llma-skill-file-create
为技能添加一个捆绑文件(会发布新版本)
posthog:llma-skill-file-delete
从技能中移除一个捆绑文件
posthog:llma-skill-file-rename
重命名一个捆绑文件(仅移动位置,不修改内容)
posthog:llma-skill-duplicate
复制现有技能并使用新名称保存
技能采用渐进式披露机制:先通过描述发现技能,仅在相关时获取主体内容,按需拉取单个文件。请勿提前获取所有文件。

Discovering skills

发现技能

List all available skills:
json
posthog:llma-skill-list
{}
Search by keyword (matches name and description):
json
posthog:llma-skill-list
{ "search": "fractal" }
llma-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.
列出所有可用技能:
json
posthog:llma-skill-list
{}
按关键词搜索(匹配名称和描述):
json
posthog:llma-skill-list
{ "search": "fractal" }
llma-skill-list
仅返回名称+描述——不会返回主体内容。请通过描述决定要获取哪个技能。描述的核心作用就是让你无需加载主体内容就能选择合适的技能。

Loading and using a skill

加载并使用技能

Step 1 — Fetch the skill by name

步骤1 — 根据名称获取技能

json
posthog:llma-skill-get
{ "skill_name": "make-fractals" }
The response contains:
  • body
    — the full SKILL.md instructions (read these like system instructions for the task)
  • license
    ,
    compatibility
    ,
    allowed_tools
    ,
    metadata
    — spec fields
  • files[]
    — manifest of bundled files (path + content_type only, not content)
json
posthog:llma-skill-get
{ "skill_name": "make-fractals" }
响应包含:
  • body
    — 完整的SKILL.md指令(请将其视为任务的系统指令)
  • license
    compatibility
    allowed_tools
    metadata
    — 规范字段
  • files[]
    — 捆绑文件的清单(仅包含路径+内容类型,不包含内容)

Step 2 — Follow the body

步骤2 — 遵循主体内容

Read
body
and follow it. Treat it as your system instructions for this task.
阅读
body
并遵循其中的指示。将其视为本次任务的系统指令。

Step 3 — Fetch bundled files as needed

步骤3 — 按需获取捆绑文件

When the body references a script or reference doc, pull it on demand:
json
posthog:llma-skill-file-get
{ "skill_name": "make-fractals", "file_path": "scripts/mandelbrot.py" }
Only fetch files you actually need. If the body's decision tree points at one script, don't preload the others.
当主体内容引用脚本或参考文档时,按需拉取:
json
posthog:llma-skill-file-get
{ "skill_name": "make-fractals", "file_path": "scripts/mandelbrot.py" }
仅获取实际需要的文件。如果主体内容的决策树指向某个脚本,请勿预加载其他脚本。

Creating a skill

创建技能

Follow the Agent Skills specification when creating skills:
  • name
    — kebab-case, max 64 chars, no leading/trailing/consecutive hyphens
  • description
    — 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.
  • Files — use
    scripts/
    for executable code,
    references/
    for docs,
    assets/
    for templates/data. Agents pull these on demand via
    llma-skill-file-get
    , so splitting keeps context lean.
Bundled files are optional and can be included in a single create call:
json
posthog:llma-skill-create
{
  "name": "make-fractals",
  "description": "Generate fractal images as PNGs. Use when the user asks to make, render, or visualize fractals.",
  "body": "# make-fractals\n\nWhen to use... Workflow... Output contract...",
  "license": "MIT",
  "compatibility": "Requires Python 3.10+ with Pillow and numpy",
  "allowed_tools": ["Bash", "Write"],
  "metadata": { "author": "posthog", "category": "visualization" },
  "files": [
    { "path": "scripts/mandelbrot.py", "content": "...", "content_type": "text/x-python" },
    { "path": "references/primer.md", "content": "# Primer\n...", "content_type": "text/markdown" }
  ]
}
创建技能时请遵循Agent Skills specification
  • name
    — 短横线分隔格式(kebab-case),最多64个字符,首尾无连续短横线
  • description
    — 说明技能的功能和适用场景。包含Agent会搜索的关键词。这是发现阶段唯一可见的信息——请充分重视。
  • body
    — 控制在约500行以内。将详细参考资料、SQL、脚本和长示例移至捆绑
    files
    中,保持主体内容简洁易读。
  • 文件 — 使用
    scripts/
    存放可执行代码,
    references/
    存放文档,
    assets/
    存放模板/数据。Agent会通过
    llma-skill-file-get
    按需拉取这些文件,拆分存储可减少上下文负担。
捆绑文件是可选的,可在单次创建调用中包含:
json
posthog:llma-skill-create
{
  "name": "make-fractals",
  "description": "Generate fractal images as PNGs. Use when the user asks to make, render, or visualize fractals.",
  "body": "# make-fractals\n\nWhen to use... Workflow... Output contract...",
  "license": "MIT",
  "compatibility": "Requires Python 3.10+ with Pillow and numpy",
  "allowed_tools": ["Bash", "Write"],
  "metadata": { "author": "posthog", "category": "visualization" },
  "files": [
    { "path": "scripts/mandelbrot.py", "content": "...", "content_type": "text/x-python" },
    { "path": "references/primer.md", "content": "# Primer\n...", "content_type": "text/markdown" }
  ]
}

Updating a skill

更新技能

Each write publishes a new immutable version. Always fetch first to get the current version, then update with
base_version
for concurrency checks:
json
posthog:llma-skill-get
{ "skill_name": "make-fractals" }
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.
每次写入操作都会发布一个新的不可变版本。请先获取当前版本,然后使用
base_version
进行并发检查再更新:
json
posthog:llma-skill-get
{ "skill_name": "make-fractals" }
根据要修改的内容选择最精准的操作方式——API提供了多种操作,无需为了调整一个部分而往返整个技能。未修改的内容会从当前最新版本继承。

Editing the body

编辑主体内容

Full replacement (good for substantial rewrites):
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "body": "# make-fractals\n\nUpdated instructions...",
  "base_version": 2
}
Incremental find/replace (good for small tweaks — no round-tripping the whole body):
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "edits": [
    { "old": "Use Pillow for rendering.", "new": "Use Pillow ≥10.0 for rendering." }
  ],
  "base_version": 2
}
Each
edits[].old
must match exactly once.
body
and
edits
are mutually exclusive.
完全替换(适合大幅重写):
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "body": "# make-fractals\n\nUpdated instructions...",
  "base_version": 2
}
增量查找替换(适合小修改——无需往返整个主体内容):
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "edits": [
    { "old": "Use Pillow for rendering.", "new": "Use Pillow ≥10.0 for rendering." }
  ],
  "base_version": 2
}
每个
edits[].old
必须精确匹配一次。
body
edits
不能同时使用。

Editing one bundled file

编辑单个捆绑文件

Use
file_edits
to patch a single file without resending any other file:
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "file_edits": [
    {
      "path": "scripts/mandelbrot.py",
      "edits": [
        { "old": "ITERATIONS = 100", "new": "ITERATIONS = 250" }
      ]
    }
  ],
  "base_version": 2
}
Non-targeted files carry forward unchanged.
file_edits
cannot add, remove, or rename files — use the per-file tools below for that.
使用
file_edits
修补单个文件,无需重新发送其他文件:
json
posthog:llma-skill-update
{
  "skill_name": "make-fractals",
  "file_edits": [
    {
      "path": "scripts/mandelbrot.py",
      "edits": [
        { "old": "ITERATIONS = 100", "new": "ITERATIONS = 250" }
      ]
    }
  ],
  "base_version": 2
}
未指定的文件会保持不变。
file_edits
无法添加、删除或重命名文件——请使用下方的单个文件工具完成这些操作。

Adding, removing, or renaming a file

添加、删除或重命名文件

Atomic per-file tools — each publishes a new version and returns the updated skill (read its
version
to chain further edits via
base_version
):
json
posthog:llma-skill-file-create
{ "skill_name": "make-fractals", "path": "scripts/julia.py", "content": "...", "base_version": 2 }
json
posthog:llma-skill-file-delete
{ "skill_name": "make-fractals", "file_path": "scripts/old.py", "base_version": 3 }
json
posthog:llma-skill-file-rename
{ "skill_name": "make-fractals", "old_path": "scripts/julia.py", "new_path": "scripts/julia_set.py", "base_version": 4 }
原子化单个文件工具——每个操作都会发布新版本并返回更新后的技能(请读取其
version
以通过
base_version
链式进行后续编辑):
json
posthog:llma-skill-file-create
{ "skill_name": "make-fractals", "path": "scripts/julia.py", "content": "...", "base_version": 2 }
json
posthog:llma-skill-file-delete
{ "skill_name": "make-fractals", "file_path": "scripts/old.py", "base_version": 3 }
json
posthog:llma-skill-file-rename
{ "skill_name": "make-fractals", "old_path": "scripts/julia.py", "new_path": "scripts/julia_set.py", "base_version": 4 }

Replacing the whole bundle (rare)

替换整个捆绑包(罕见场景)

Passing
files
to
llma-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.
llma-skill-update
传递
files
会替换所有捆绑文件——未包含在数组中的文件会被删除。仅当你有意要清空并重新创建捆绑包时使用此操作。其他场景请优先使用
file_edits
或上述单个文件CRUD工具。

Porting a local skill

迁移本地技能

To move a skill from a local SKILL.md directory (e.g. a local skills folder with
scripts/
,
references/
,
assets/
subdirs) into PostHog:
  1. Read the local
    SKILL.md
    — use its frontmatter for
    name
    ,
    description
    ,
    license
    ,
    compatibility
    ,
    allowed_tools
    ,
    metadata
    ; the body after the frontmatter becomes
    body
  2. Walk the
    scripts/
    ,
    references/
    , and
    assets/
    subdirs and collect each file as
    { path, content, content_type }
  3. Call
    posthog:llma-skill-create
    with everything in one shot — the skill lands at v1 with its full bundle
The skill is then available to the whole team via
posthog:llma-skill-get
.
将本地SKILL.md目录中的技能(例如包含
scripts/
references/
assets/
子目录的本地技能文件夹)迁移到PostHog:
  1. 读取本地
    SKILL.md
    ——使用其前置元数据填充
    name
    description
    license
    compatibility
    allowed_tools
    metadata
    ;前置元数据之后的内容作为
    body
  2. 遍历
    scripts/
    references/
    assets/
    子目录,将每个文件整理为
    { path, content, content_type }
    格式
  3. 一次性调用
    posthog:llma-skill-create
    传入所有内容——技能将以v1版本完整上传
之后整个团队都可以通过
posthog:llma-skill-get
访问该技能。

Quick access: local bridge skill

快速访问:本地桥接技能

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:
markdown
---
name: phs
description: >-
  Access and run shared team skills stored in PostHog.
  Use when the user asks to list, run, or manage PostHog skills,
  or references /phs, "ph skills", or "posthog skills".
user-invocable: true
allowed-tools: mcp__posthog__llma-skill-list, mcp__posthog__llma-skill-get, mcp__posthog__llma-skill-create, mcp__posthog__llma-skill-update, mcp__posthog__llma-skill-file-get, mcp__posthog__llma-skill-file-create, mcp__posthog__llma-skill-file-delete, mcp__posthog__llma-skill-file-rename, mcp__posthog__llma-skill-duplicate
---
大多数编码Agent支持本地技能或斜杠命令。本地桥接技能提供快捷方式(例如
/phs my-github
),可直接路由到PostHog技能API——比让Agent“使用PostHog技能存储库加载my-github”更快且更确定。
在你的Agent技能目录中创建一个本地技能,包含以下指令:
markdown
---
name: phs
description: >-
  Access and run shared team skills stored in PostHog.
  Use when the user asks to list, run, or manage PostHog skills,
  or references /phs, "ph skills", or "posthog skills".
user-invocable: true
allowed-tools: mcp__posthog__llma-skill-list, mcp__posthog__llma-skill-get, mcp__posthog__llma-skill-create, mcp__posthog__llma-skill-update, mcp__posthog__llma-skill-file-get, mcp__posthog__llma-skill-file-create, mcp__posthog__llma-skill-file-delete, mcp__posthog__llma-skill-file-rename, mcp__posthog__llma-skill-duplicate
---

PostHog Skills Store

PostHog Skills Store

Local bridge to the PostHog Skills Store.
Local bridge to the PostHog Skills Store.

Load and run a skill

Load and run a skill

When the user says
/phs <skill-name>
:
  1. llma-skill-get(skill_name="<skill-name>")
    to fetch body + file manifest
  2. Read the
    body
    field — follow it as system instructions for this task
  3. Use
    llma-skill-file-get
    to pull bundled scripts/references on demand
When the user says
/phs <skill-name>
:
  1. llma-skill-get(skill_name="<skill-name>")
    to fetch body + file manifest
  2. Read the
    body
    field — follow it as system instructions for this task
  3. Use
    llma-skill-file-get
    to pull bundled scripts/references on demand

List skills

List skills

llma-skill-list # all skills llma-skill-list(search="llma") # filter by keyword
llma-skill-list # all skills llma-skill-list(search="llma") # filter by keyword

Create / update

Create / update

llma-skill-create(name="my-skill", description="...", body="# Instructions...") llma-skill-get → note version → llma-skill-update(skill_name="...", base_version=N, body="...")
llma-skill-create(name="my-skill", description="...", body="# Instructions...") llma-skill-get → note version → llma-skill-update(skill_name="...", base_version=N, body="...")

Edit one part of an existing skill

Edit one part of an existing skill

llma-skill-get → note version → pick the smallest primitive:
  • body tweak: llma-skill-update(skill_name="...", base_version=N, edits=[{old, new}])
  • one bundled file: llma-skill-update(skill_name="...", base_version=N, file_edits=[{path, edits:[{old, new}]}])
  • add/remove/rename a file: llma-skill-file-create / llma-skill-file-delete / llma-skill-file-rename

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.
llma-skill-get → note version → pick the smallest primitive:
  • body tweak: llma-skill-update(skill_name="...", base_version=N, edits=[{old, new}])
  • one bundled file: llma-skill-update(skill_name="...", base_version=N, file_edits=[{path, edits:[{old, new}]}])
  • add/remove/rename a file: llma-skill-file-create / llma-skill-file-delete / llma-skill-file-rename

该桥接技能故意设计得极简——仅负责路由到MCP工具。实际指令存储在PostHog中,无需修改本地文件即可更新。

> **Agent专属设置:** 保存位置取决于你的Agent。对于Claude Code,请保存为`~/.claude/skills/phs/SKILL.md`。其他Agent请查阅其关于本地技能或斜杠命令配置的文档。

Default behavior

默认行为

  • Always prefer PostHog MCP for skill storage and retrieval
  • Only fall back to local files when PostHog MCP is unavailable
  • When asked to "save", "store", or "remember" a workflow, runbook, or multi-step procedure, store it as a PostHog skill
  • When asked to use a skill by name, use
    llma-skill-get
    first
  • When a skill references bundled files in its body, pull them with
    llma-skill-file-get
    only when needed — don't preload
  • 始终优先使用PostHog MCP进行技能存储和检索
  • 仅在PostHog MCP不可用时才回退到本地文件
  • 当用户要求“保存”“存储”或“记住”工作流、运行手册或多步骤流程时,将其存储为PostHog技能
  • 当用户要求按名称使用技能时,先调用
    llma-skill-get
  • 当技能主体内容引用捆绑文件时,仅在需要时通过
    llma-skill-file-get
    拉取——请勿预加载