copying-endpoints-across-projects — Claude Code skill
copying-endpoints-across-projects duplicates PostHog API endpoints across projects in the same organization or clones them under a new name. Useful for promoting HogQL endpoints between environments.
no license 183 installs ★ 101 updated 2026-10-24
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a claude-codeWhat copying-endpoints-across-projects does
PostHog does not provide a native server-side endpoint cloning action. Moving an endpoint requires pulling its configuration through endpoint-get and recreating the route with endpoint-create.
Both MCP tools only touch the currently active project. The agent must switch active projects between the read and write stages. To avoid silent conflicts, it checks for existing names using endpoints-get-all and leaves materialization turned off (is_materialized: false) by default so fresh endpoints do not incur background computation fees.
The routine requires editor access in both workspaces within the same organization. Copying endpoints between distinct organizations is unsupported, and bulk-duplicating entire projects at once is excluded.
What it helps with
- promote a PostHog API endpoint from staging to production
- duplicate an endpoint under a new name for local query iteration
- replicate HogQL queries and query variables into another project
- validate the new endpoint payload with
endpoint-run
Example prompts for the agent
- Copy the retention_metric endpoint from staging to production
- Duplicate the daily_active_users endpoint as daily_active_users_v2 in this project
How to install copying-endpoints-across-projects
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a claude-code2Manually: put the files in place
~/.claude/skills/copying-endpoints-across-projects/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/copying-endpoints-across-projects/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a codex2Manually: put the files in place
.agents/skills/copying-endpoints-across-projects/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a cursor2Manually: put the files in place
.cursor/skills/copying-endpoints-across-projects/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/copying-endpoints-across-projects2Manually: put the files in place
.github/skills/copying-endpoints-across-projects/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/copying-endpoints-across-projectsManually: put the files in place
.devin/skills/copying-endpoints-across-projects/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -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 copying-endpoints-across-projects
How to install copying-endpoints-across-projects in Claude Code?
Run npx skills add PostHog/ai-plugin --skill copying-endpoints-across-projects -a claude-code in your terminal.
What does copying-endpoints-across-projects do?
It reads an existing PostHog endpoint definition in one project and recreates it in another project or under an alternate name.
Why is materialization disabled on the duplicated endpoint?
Fresh copies have no verified traffic in the target project. Keeping is_materialized: false avoids unnecessary storage and compute costs until usage is confirmed.