building-workflows — Claude Code skill: what it does, how to install
building-workflows is a Claude Code skill for building, patching, and testing PostHog automation graphs over MCP before publishing them in the visual editor.
no license 204 installs ★ 101 updated 2026-11-16
npx skills add PostHog/ai-plugin --skill building-workflows -a claude-codeWhat building-workflows does
The skill constructs PostHog workflows as directed graphs made of action nodes and edges starting from a single trigger. PostHog stores raw node JSON flexibly, but the visual editor enforces a strict structure. Any schema mistake breaks the entire canvas view in the browser.
Automation follows a gated workflow. It starts with a draft via workflows-create, moves into single-step simulation through workflows-test-run, and inspects issues with workflows-logs. Async actions stay mocked unless explicitly changed. Live activation requires direct user confirmation before workflows-enable touches real audiences.
Updates use targeted surgery via workflows-patch-graph instead of rewriting full graphs. The endpoint applies atomic node changes and immediately echoes the updated state. Email bodies and subjects use workflows-patch-action-email, which automatically recompiles the server-side HTML.
What it helps with
- compose event-driven automation graphs for PostHog
- test workflow branches step by step with mock payloads
- patch individual action nodes without rewriting the full graph
- schedule recurring batch broadcasts with safety checks
Example prompts for the agent
- Create a draft onboarding drip sequence triggered by user signups
- Step-test the trigger event payload against the first workflow action
- Patch the email subject in the notification node without modifying the edges
How to install building-workflows
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-workflows -a claude-code2Manually: put the files in place
~/.claude/skills/building-workflows/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/building-workflows/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-workflows -a codex2Manually: put the files in place
.agents/skills/building-workflows/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-workflows -a cursor2Manually: put the files in place
.cursor/skills/building-workflows/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/building-workflows2Manually: put the files in place
.github/skills/building-workflows/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-workflows -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/building-workflowsManually: put the files in place
.devin/skills/building-workflows/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-workflows -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about building-workflows
How do I install building-workflows in Claude Code?
Run npx skills add PostHog/ai-plugin --skill building-workflows -a claude-code. The skill writes its instructions into ~/.claude/skills/building-workflows/SKILL.md.
Why does the skill refuse to enable workflows automatically?
Enabling starts executing actions on live user data. The tool keeps workflows in draft status until a human explicitly approves the release.
Why does graph editing require patch operations instead of full updates?
Supplying partial node lists to top-level update calls silently drops omitted actions. The workflows-patch-graph tool updates specific node IDs without risking data loss.