ClaudeSuperPower

copying-endpoints-across-projects

Skill

Copy a PostHog endpoint (a saved HogQL/insight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's q

Install

git clone https://github.com/PostHog/ai-plugin.git ~/.claude/skills/copying-endpoints-across-projects

What is copying-endpoints-across-projects?

Copy a PostHog endpoint (a saved HogQL/insight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query/variables/freshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Inherit all session tools

Declares no tool restrictions — inherits every session tool

~216 tokens of context used while enabled, before you invoke anything

Documentation

README · ~6 min read

Copying endpoints across projects

This skill duplicates a PostHog endpoint — a saved HogQL or insight query exposed as a callable API route — either into another project in the same organization, or under a new name in the same project.

The one thing to know first

There is no server-side endpoint copy operation. Feature flags have feature-flags-copy-flags-create and experiments have experiment-copy-to-project; endpoints have neither. Copying an endpoint means:

  1. Read the full source config with endpoint-get.
  2. Recreate it with endpoint-create (in the target project, or under a new name in the same project).

Both endpoint-get and endpoint-create operate only on the active MCP project — neither takes a project id. So a cross-project copy requires the active project to be switched between the read (source) and the write (target). Read the source first, capture the config, then switch to the target and create. If you cannot switch projects in this session, tell the user rather than creating the copy in the wrong project.

When to use this skill

  • "Copy this endpoint to another project", "duplicate this endpoint", "clone the endpoint"
  • "Promote the endpoint from staging to production" (projects-as-environments)

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just skills.