Command Palette

Search for a command to run...

Назад к скиллам
скилл № 76483

writing-skills

Guide for writing PostHog agent skills — job-to-be-done templates that teach agents how to use MCP tools to achieve a goal. Use when adding new product…

БесплатноБез исполняемых скриптов
PostHogот PostHog★ 41 278 звёзд на GitHub

Установить writing-skills в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Writing skills for PostHog agents

Read the full guide at docs/published/handbook/engineering/ai/writing-skills.md.

Choose a location

  • Use products/<product>/skills/ for work through PostHog tools, APIs, or customer code. These skills are published.
  • Use .agents/skills/ for work that requires a checkout of the PostHog repository. These skills stay in the repository.
  • A skill that only PostHog staff can use still goes in products/<product>/skills/ when it needs no checkout. Mark it audience: internal, as the next section describes.
  • For mixed skills, keep customer diagnosis published and move PostHog development steps into an existing internal skill or reference.
  • Published workflows must not depend on internal skill files.

hogli lint:skills checks both locations. The scaffold, build, and sync commands below apply to published product skills.

Say who the skill is for

Every skill under products/*/skills/ states its audience in its frontmatter. hogli lint:skills fails without one.

metadata:
  audience: customer
  • customer: a customer's agent can follow the skill with only what a customer has: no staff access, no PostHog checkout, and no tool or product that customers cannot use.
  • scout: the instructions that a scheduled scout run follows.
  • internal: any other PostHog job, or staff.

The MCP learn command serves customer and scout skills. Two optional fields under metadata limit who gets a served skill:

  • feature_flag: <flag>: only callers with that flag. Set it when the product's MCP tools need the flag.
  • consumers: slack: only the PostHog-run agents you name (slack, posthog_ai), separated by commas.

When a header changes who gets a skill, run hogli lint:skills -- --fix and commit services/mcp/src/generated/served-skills.json. CODEOWNERS requires a review from team-context-and-mcp for that file.

Quick workflow

# 1. Scaffold
hogli init:skill

# 2. Write your skill in products/{product}/skills/{skill-name}/SKILL.md

# 3. Lint
hogli lint:skills

# 4. Build to verify
hogli build:skills

# 5. Test locally with PostHog Desktop or a coding agent
hogli sync:skill -- --name <skill-name>

# 6. Delete the test skill (optional)
hogli unsync:skill -- --name <skill-name>

Distribution is automatic after merge — CI publishes to PostHog/skills.

This repo is not the only source. PostHog/context-mill publishes the omnibus skills — instrument-integration, instrument-product-analytics, instrument-feature-flags, instrument-error-tracking, instrument-llm-analytics, instrument-logs, instrument-metrics — and every shipping consumer overlays them on top of this repo's, so context-mill wins on a same-named skill. hogli lint:skills fails if you add one of those names under products/*/skills/; change the context-mill source instead. Local builds are the opposite case: they carry no omnibus skills at all, so anything that depends on one has to overlay it or fail loudly. See Context-mill skills override this repo's for the merge sites.

When to write a skill

When new functionality is added to a product and agents need to know how to work with it. A skill is not about what tools exist (that's the MCP server) — it's about how an experienced person would approach a job using those tools.

Ask: "If a customer asked an agent to do X with my feature, would the agent know the right approach?" If not, write a skill.

Docs or skill?

A skill holds only what an agent needs on top of the docs: the steps of one job, the checks before it reports done, and the decisions it must not make alone. How a system works, its setup, options and gotchas go in docs (a README next to the code, or an existing page under docs/), and the skill links to them. If an engineer would look it up without an agent, it is docs.

How many is too many?

Skill count is a budgeted, shared resource — agents pick from a list of all skill descriptions, and many harnesses truncate that list once it grows long, so every extra skill makes the others less likely to fire. Prefer a small set of focused skills, each with rich references/, over many thin ones:

  • New trigger → new skill. A skill earns its own entry point only when its "when to use it" is clearly distinct from every existing skill.
  • More detail → references/, not a new skill. Another failure mode, SDK variant, or query catalog is depth on an existing job — add it to that skill's references/ instead of spending a new slot.
  • Consolidate near-duplicate siblings. Skills sharing a diagnosis, bug class, or trigger should be one skill with references, not two.

Key ru

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл writing-skills?

Guide for writing PostHog agent skills — job-to-be-done templates that teach agents how to use MCP tools to achieve a goal. Use when adding new product functionality that agents should know how to work with, creating a new skill, or updating existing skills in products/*/skills/ or .agents/skills/.

Как установить скилл writing-skills?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл writing-skills запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить writing-skills с