Skills Best Practices

Audit and refactor PostHog skills-store skills against spec rules and house patterns.

1|1|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/PostHog/community-skills --skill skills-best-practices-posthog
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Skills Best Practices
Source: https://github.com/PostHog/community-skills/tree/main/skills/skills-best-practices
Command: npx skills add https://github.com/PostHog/community-skills --skill skills-best-practices-posthog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Skills in a PostHog skills store rot over time: vague descriptions that never get retrieved, bloated bodies, unbounded changelogs, and stale content. This Skill provides a compliance checklist, a 16-pattern house style guide, and a structured refactoring workflow to bring messy skills back into shape or start new ones correctly. ## Core Features & Use Cases - Spec compliance checklist: Statically verifiable rules from the Agent Skills spec and Anthropic best practices covering frontmatter, name format, description limits, body budget, link hygiene, and secrets. - 16 house patterns: Trigger-rich descriptions, thin index bodies, progressive-disclosure file maps, HANDOVER.md clobber files, rolling-window changelogs, issues/ backlogs, and maintenance contracts. - Refactoring workflow: An audit → design → execute → verify → log process with a smell checklist and reliable write mechanics (smallest edit primitive, base_version chaining, sentinel appends for large files). - Use Case: Given a store skill whose changelog grew to 66 KB and whose body mixes session state with reference content, run the audit checklist, split content into bundled files, convert the changelog to a rolling window, and rewrite the description with concrete trigger phrases. ## Quick Start Ask the agent to audit my PostHog store skill against the spec checklist and house patterns, then refactor it into a thin index body with bundled reference files.

Frequently Asked Questions about Skills Best Practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a messy PostHog store skill?▼

Follow the audit → design → execute → verify → log workflow in refactoring-workflow.md. First run the spec checklist for the compliance floor, then apply the smell checklist, create bundled files, shrink the body, and rewrite the description last.

What makes a good skill description for agent retrieval?▼

A good description states the job-to-be-done, what the skill covers, companions, and concrete trigger phrases, since it is the only thing an agent sees before deciding to load the skill. Keep it under 1024 characters for spec and community publishing compliance.

How do I stop a skill CHANGELOG from growing unbounded?▼

Use the rolling-window pattern: state the window size in the file header, trim on every append, drop old entries instead of archiving them, and keep each entry to one line with detail moved to an owning file like issues/ or investigations/.

When should a skill use HANDOVER.md versus CHANGELOG.md?▼

HANDOVER.md holds in-flight session state and is overwritten each session, while CHANGELOG.md records what happened as a bounded rolling window. Durable facts belong in reference files or issues/, not in either one.

Why did my skill write fail or drop content?▼

Full-body replaces can silently drop unrelated content, so prefer edits or file_edits find/replace primitives. Chain base_version between writes, and for files over ~10K chars use sentinel-based chunk appends with a round-trip diff to verify.