copying-endpoints-across-projects
하는 일
이 스킬은 엔드포인트의 쿼리, 변수, 설정을 다른 프로젝트나 같은 프로젝트의 새 사본으로 복사합니다. 엔드포인트를 승격하거나 라이브 버전을 건드리지 않고 변경을 시도하려는 사람을 위한 것입니다.
사용하는 경우
- ✓스테이징 프로젝트에서 운영 프로젝트로 엔드포인트를 옮기고 싶을 때.
- ✓라이브 엔드포인트를 건드리지 않고 바꾸기 위해 사본이 필요할 때.
- ✓같은 조직의 다른 프로젝트에 엔드포인트 설정을 복제해야 할 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/copying-endpoints-across-projects/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“스테이징 프로젝트의 매출 엔드포인트를 운영 프로젝트로 복사해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
PostHog에는 기본 엔드포인트 복사 기능이 없으므로, 에이전트는 원본의 전체 설정을 읽고 대상 프로젝트에 다시 만듭니다. 이 두 단계 사이에 프로젝트를 전환해야 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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:
- Read the full source config with
endpoint-get. - 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)
- "Make a copy so I can iterate without touching the live one" (same-project duplicate under a new name)
- Replicating an endpoint's query, variables, and freshness config in a different workspace
What this skill does not cover
- Cross-organization copy. Endpoints (and their queries) can only be recreated in projects you have editor access to; there is no org-to-org path.
- Editing versions of an existing endpoint — see
managing-endpoint-versions. - Designing a new endpoint from scratch — see
creating-an-endpoint(this skill assumes the source endpoint already exists and is configured correctly). - Bulk-copying every endpoint in a project. Copy one at a time; loop
endpoints-get-all→ per-endpoint copy if the user really wants all of them, and tell them you're doing so.
Workflow
1. Resolve the source endpoint
You need the endpoint's name and the source project.
- If the user gave a name, use it. If they gave a fuzzy description, call
endpoints-get-allin the source project and match on name/description. - If the user didn't say which project the endpoint lives in, ask — don't assume the active MCP project is the source. Copying out of the wrong source is the most common foot-gun.
- Confirm the active project is the source (call
project-getwith no id to see the active project) before reading.
2. Read the full source config
Call endpoint-get with the source name. Capture everything you'll need to recreate it:
namequery(the whole HogQL/insight query definition — including any declared variables /code_names)descriptiondata_freshness_secondsis_materialized(source state — see step 5 for why you usually don't copy this as-is)tags
Present a short summary to the user before copying: what the query returns, its variables, its freshness setting, and whether the source is materialised.
3. Resolve the target and check for a name collision
Cross-project: confirm the target project belongs to the same org and the user has editor access there. The copy will be created in whatever project is active at endpoint-create time, so plan to switch the active project to the target between step 2 and step 6.
Same-project duplicate: the new endpoint needs a different name — names are unique within a project and the URL path (/api/projects/{team_id}/endpoints/{name}/run) depends on it. Agree a new name with the user.
Either way, run endpoints-get-all in the target project and check whether the intended name already exists. If it does, stop and ask: creating over an existing name is not a safe silent action. Get the name right up front — it's baked into the caller URL and not trivially renameable later.
4. Decide the name in the target
- Cross-project, same purpose: keep the same name so caller code ports unchanged.
- Same-project or "copy to iterate": pick a clearly-derived new name (e.g.
weekly_active_users_v2,weekly_active_users_staging). Snake_case, URL-safe, starts with a letter, max 128 chars.
5. Choose materialisation for the copy (default: OFF)
Default to is_materialized: false on the copy, even when the source is materialised. Rationale mirrors t
자주 묻는 질문
왜 엔드포인트를 바로 복사할 수 없나요?
PostHog에는 엔드포인트의 서버 측 복사 기능이 없으므로, 설정을 읽은 뒤 다시 만듭니다.
에이전트가 프로젝트를 바꿀 수 없으면 어떻게 되나요?
스킬은 잘못된 프로젝트에 사본을 만드는 대신 그 사실을 알려 줍니다.
다른 조직으로 엔드포인트를 복사할 수 있나요?
아니요. 이 스킬은 같은 조직 안의 프로젝트끼리만 다룹니다.
상세 정보
작성자의 원본 설명
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 req
repo: PostHog/posthog
인기도
- GitHub 스타
- 41k
- 순위
- #6859
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.