copying-endpoints-across-projects
Skill by PostHog
Copies a PostHog endpoint to another project in the same organization, or duplicates it under a new name in the same project. Useful for promoting endpoints from staging to production or cloning one to iterate safely.
Install copying-endpoints-across-projects
Built from the published package, never by AI.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/endpoints/skills/copying-endpoints-across-projects ~/.claude/skills/copying-endpoints-across-projectsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install copying-endpoints-across-projects in Claude Code
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/products/endpoints/skills/copying-endpoints-across-projects ~/.gemini/antigravity-cli/skills/copying-endpoints-across-projectsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install copying-endpoints-across-projects in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill copies a PostHog endpoint, which is a saved HogQL or insight query exposed as an API route. It can copy the endpoint to another project in the same organization, or duplicate it under a new name in the same project. PostHog has no server-side endpoint copy operation, so the skill reads the source with endpoint-get and recreates it with endpoint-create. Both tools act only on the active MCP project, so the skill switches projects between the read and the write and checks for name collisions first.
New copies default to unmaterialised, and the skill verifies the result with endpoint-run before reporting back. It is aimed at users promoting an endpoint from staging to production, or cloning one to iterate without touching the live version. Editing endpoint versions and creating new endpoints from scratch are covered by other skills.
Written from the project's SKILL.md and checked against it.
What it can do
- endpoint-getReads the full source endpoint config, including query, freshness, materialisation and tags.
- endpoint-createCreates the copy in the active project with the captured query and settings.
- endpoints-get-allLists endpoints in a project to resolve a source name and check for collisions.
- endpoint-runRuns the new endpoint to confirm the response shape matches the source.
- project-getShows which project is currently active before reading or creating.
- Name collision checksStops before creating over an existing endpoint name in the target project.
What you need
- Editor access on the target project
- Access to the same PostHog organization for cross-project copies
- PostHog MCP with the ability to switch the active project
Try asking
- Copy the weekly_active_users endpoint to the production project
- Duplicate this endpoint as weekly_active_users_staging
- Check the staging project's endpoints before promoting one to production
Good to know
- PostHog has no native endpoint copy, so the skill recreates the endpoint from its config.
- The copy owns its own query, so later source edits do not propagate.
- Copies are made one at a time, not in bulk.
- Cohort breakdowns, compare mode and Funnels cannot be materialised.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: products/endpoints/skills/copying-endpoints-across-projects/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB
Alternatives to copying-endpoints-across-projects
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
copying-endpoints-across-projects: common questions
Does PostHog have a built-in endpoint copy?
No. Feature flags and experiments have native copy tools, but endpoints do not, so this skill reads the source and recreates it.
Are copied endpoints linked to the original?
No. The target endpoint keeps its own copy of the query, so later edits to the source do not carry over.
Why does the copy start unmaterialised?
Materialisation costs recompute and storage on a schedule, and a new copy has no proven traffic yet, so the default is off.
How do I install copying-endpoints-across-projects?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is copying-endpoints-across-projects free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is copying-endpoints-across-projects safe to use?
It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to copying-endpoints-across-projects?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
