copying-flags-across-projects
यह क्या करती है
यह स्किल एक फ़ीचर फ़्लैग को एक या अधिक प्रोजेक्ट में, उसी संगठन के भीतर, कॉपी करती है। यह उन टीमों के लिए है जो स्टेजिंग प्रोजेक्ट में परखते हैं और फ़्लैग प्रोडक्शन में ले जाना चाहती हैं।
कब इस्तेमाल करें
- ✓जब आप फ़्लैग को स्टेजिंग प्रोजेक्ट से प्रोडक्शन प्रोजेक्ट में ले जाना चाहें।
- ✓जब आपको दूसरे वर्कस्पेस में वही फ़्लैग चाहिए, उसके कोहॉर्ट बरकरार रखते हुए।
- ✓जब आपको दूसरे प्रोजेक्ट में फ़्लैग की एक कॉपी चाहिए ताकि देख सकें कि वहाँ वह कैसे काम करता है।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/products/feature_flags/skills/copying-flags-across-projects/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“नए प्राइसिंग फ़्लैग को मेरे स्टेजिंग प्रोजेक्ट से प्रोडक्शन में कॉपी कीजिए, पर वहाँ उसे बंद रखिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह फ़्लैग की और स्रोत प्रोजेक्ट खोजती है, फिर फ़्लैग को लक्ष्य प्रोजेक्ट में कॉपी करती है। डिफ़ॉल्ट रूप से कॉपी लक्ष्य में बंद होती है, और निर्धारित बदलाव साथ नहीं लाती।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Copying feature flags across projects
This skill guides you through duplicating a feature flag from a source project into one or more target projects within the same PostHog organization.
When to use this skill
- The user asks to "copy a flag to another project", "duplicate this flag", or "sync a flag between projects"
- The user wants to promote a flag from a staging project to a production project (or vice versa)
- The user wants to replicate a flag configuration in a different workspace and keep cohort dependencies intact
- The user is working around the absence of true environments by using projects-as-environments
What this skill does not cover
- Cross-organization copy is not supported. The endpoint requires source and target projects to belong to the same org.
- Bulk copying every flag in a project. The tool copies one flag at a time. For batch copies, loop through flag keys; each call is independent.
- Cleaning up old or stale flags — see the
cleaning-up-stale-feature-flagsskill instead.
Workflow
1. Resolve the source flag
You need the flag's key and the source project's id.
- If the user gave a flag key and a project id, use them directly.
- If the user gave a flag name (e.g. "the new pricing flag"), call
posthog:feature-flag-get-allin the source project to find the matching flag and read itskey. - If the user only gave a flag and not a project, ask which project it lives in. Don't assume the active MCP project — copying out of the wrong source is a common foot-gun.
2. Resolve target project ids
Targets must be in the same organization as the source. Call posthog:projects-get to list available projects and confirm membership before issuing the copy.
For a multi-target copy, the tool accepts up to 50 target project ids in a single call. Successes and failures are reported per target, so a partial failure does not block the rest.
3. Preview the source flag and its dependencies
Call posthog:feature-flag-get-definition on the source flag. Then always call posthog:feature-flags-copy-dependencies-check with feature_flag_key, from_project, and target_project_ids, rather than trying to detect dependencies first — it copies nothing, and returns an empty result with no warnings when the flag has none, so running it on every copy is cheap and never skips a real dependency.
A false can_copy_dependencies does not always mean the copy is blocked. It is also false when there is nothing to copy. Report a problem only when warnings is non-empty.
Present a concise summary to the user before copying:
- Flag key, name, and active state in the source
- Filter groups (rollout %, property filters, variant splits)
- Any cohort references in
filters.groups[].properties[]— these will be remapped server-side, but the user should know whether the target project already has matching cohorts - Whether the flag has encrypted payloads (
has_encrypted_payloads) or is remote configuration (is_remote_configuration) - Whether scheduled changes exist (the user can opt to copy them in step 4)
- The dependency check's
copied_dependency_keys(dependencies a copy would create in a target),reused_dependency_keys(dependencies a target already satisfies), and anywarnings
4. Confirm copy options
One confirmation covers all three options. Default to the safest combination and ask the user to override only if they explicitly want different behavior:
disable_copied_flag: true— the copied flag lands disabled in the target. Recommended by default; turning a flag on in a new project should be a deliberate, observed action.copy_schedule: false— scheduled changes do not come along. Recommended by default; schedules are usually project-specific.copy_dependencies: false— dependency flags do not come along. Set it totrueonly when the user approves copying the keys step 3's check reported.
If the user says "promote it as-is" or "turn it on in prod", switch disable_copied_flag to false. If they say "include the rollout schedule" or "with the scheduled rollout", switch copy_schedule to true.
5. Execute the copy
Call posthog:feature-flags-copy-flags-create with:
feature_flag_key: the source flag's keyfrom_project: the source project idtarget_project_ids: the resolved list of target project idsdisable_copied_flag: from step 4 (defaulttrue)copy_schedule: from step 4 (defaultfalse)- `
अक्सर पूछे जाने वाले सवाल
क्या मैं फ़्लैग किसी दूसरे संगठन में कॉपी कर सकता हूँ?
नहीं। स्रोत और लक्ष्य प्रोजेक्ट एक ही संगठन के होने चाहिए।
क्या कॉपी किया गया फ़्लैग लक्ष्य प्रोजेक्ट में चालू होगा?
नहीं। लक्ष्य प्रोजेक्ट में कॉपी डिफ़ॉल्ट रूप से बंद होती है।
क्या यह सारे फ़्लैग एक साथ कॉपी कर सकती है?
नहीं। यह एक बार में एक फ़्लैग कॉपी करती है, इसलिए कई फ़्लैग के लिए हर एक की अलग कॉपी बनानी होगी।
जानकारी
लेखक का मूल विवरण
Copy a feature flag from one PostHog project to one or more target projects in the same organization. Use when the user wants to duplicate a flag, promote a flag from staging to production, sync flags across projects, or replicate a flag configuration in a different workspace. Covers cohort remapping, scheduled-change handling, encrypted payloads, and the safe defaults (disabled in target, no scheduled changes).
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6884
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।