Skip to content
Skillpedia
Agents41k Β· #6953

working-with-skills

What it does

This skill gives practical rules for creating, reading and editing shared PostHog skills without wasting effort. It is for people and agents who maintain large skills with many files.

When to use it

  • βœ“When you are about to create, edit or update a shared PostHog skill.
  • βœ“When a skill change is rejected and you need to understand why.
  • βœ“When a large skill has many bundled files and you need to change only part of it.

Skill link

https://github.com/PostHog/posthog/blob/master/products/skills/skills/working-with-skills/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/skills/skills/working-with-skills/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œUpdate just one section of our large reporting skill without rewriting the whole thing.”

5 new skills a week. 1 minute to read.

How it works

It explains which tool to pick for each kind of change, such as a small targeted edit instead of a full rewrite, and how to avoid overwriting someone else's recent changes. It recommends reading the skill first to get its current version.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Working with PostHog skills

This skill teaches agents how to use the skill-* MCP tools well β€” minimum context, minimum round-trips, minimum mistakes. If you are not yet familiar with the tool surface itself, read the skills-store skill first for the catalog. This document is about how to choose between the tools and how to scale the workflow when skills get big.

Operating principles

  1. Progressive disclosure is non-negotiable. Lists return descriptions, get returns body + manifest, file-get returns one file. Never preload bundled files "just in case" β€” every preloaded script is wasted context for the actual task.
  2. Pick the smallest write primitive that does the job. A targeted edits or file_edits is cheaper, safer, and clearer in version history than a full body or full bundle replacement.
  3. Reads are cheap; concurrent overwrites are not. Always have a recent version from skill-get (or from the response of the previous write) before calling any write tool, and pass it as base_version.
  4. Authoring follows the Agent Skills spec. Keep name kebab-case, descriptions trigger-rich, body short, bulky material in bundled files.

Decision tree: which tool do I call?

Need to know what's available?
  └─► skill-list                    (names + descriptions only)

Need to use / inspect a specific skill?
  └─► skill-get                     (body + file manifest, NO file contents)
        └─► skill-file-get          (one file, on demand, only as referenced)

Authoring a brand new skill?
  └─► skill-create                  (body + all initial files in one call)

Editing an existing skill?
  β”œβ”€ Body change?
  β”‚    β”œβ”€ Substantial rewrite ............. update(body=...)
  β”‚    └─ Surgical tweak .................. update(edits=[{old, new}, ...])
  β”œβ”€ Bundled file content change?
  β”‚    └─ update(file_edits=[{path, edits:[...]}, ...])
  β”œβ”€ Add / remove / rename a file?
  β”‚    β”œβ”€ Add ............................. skill-file-create
  β”‚    β”œβ”€ Delete .......................... skill-file-delete
  β”‚    └─ Rename .......................... skill-file-rename
  └─ Wholesale bundle reset (rare!) ....... update(files=[...])  # replaces ALL files

Renaming the skill itself?
  └─► skill-rename                  (keeps versions, files, and owners)

Want a fork as the starting point?
  └─► skill-duplicate               (then update the copy)

Done with a skill entirely?
  └─► skill-archive                 (hides ALL versions; cannot be undone)

If you find yourself reaching for update(body=...) plus a sprawling files=[...] to change one paragraph and one script, stop β€” that's two narrower calls (update(edits=[...]) plus update(file_edits=[...])) or even a single update carrying both edits and file_edits.

Discover before you fetch

posthog:skill-list
{ "search": "fractal" }

skill-list is the right tool to "find a skill" β€” it returns names and descriptions only. Reading the descriptions is the entire point: pick the right skill before pulling any body. If search doesn't narrow it enough, list without it and scan, but do not start fetching candidate bodies blindly.

skill-get should be called once per skill per task, not per question. Cache the body in your working memory; fetch again only if you suspect the skill changed under you (e.g. a 409 on write β€” see "Concurrency" below).

Reading a large skill efficiently

Big skills (long body, many bundled files) are the case where lazy loading matters most.

  1. skill-get(skill_name=...) β€” read body + files[] manifest.
  2. Scan the body's table of contents / headings. The body should already tell you which file goes with which task β€” that's why bodies stay short and reference files by path.
  3. For each file the body explicitly points at for the current task, call skill-file-get(file_path=...). Skip everything else.
  4. If the body references "see scripts/X for the rare case Y" and you are not in case Y, do not fetch scripts/X.

When in doubt, fewer files. You can always fetch one more on the next turn.

Authoring a new skill

Use a single skill-create call with body and initial files β€” the skill lands at version: 1 complete. Do not create the skill empty and then make N follow-up skill-file-create calls; that's N extra versions and N extra round-trips for no benefit.

posthog:skill-create
{
  "nam
FAQ

Why avoid rewriting the whole skill?

Small targeted edits are safer and easier to review in the version history.

What if two people edit the same skill?

The skill includes a version check, so a recent change is not silently overwritten.

Does it explain the skill format?

It follows the Agent Skills specification, which keeps names simple and descriptions clear.

Details

Original description by the author

Best practices for agents managing PostHog skills via the MCP `skill-*` tools β€” how to discover, read, create, update, and refactor skills efficiently, especially large skills with many bundled files. Use whenever you are about to call any `skill-*` tool, asked to author or edit a shared skill, or troubleshoot why a skill write was rejected. Also use when asked what skills are good for or how to shape one (project hub, runbook, catalog, handover, daily driver). Pairs with `skills-store` (which covers the raw tool surface) by adding the decision-tree, efficiency, pattern, and pitfall guidance.

repo: PostHog/posthog

Popularity

GitHub stars
41k
Ranking position
#6953
License
β€”
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills