add-feature-flag
Skill by OpenCTI-Platform
Walks developers through putting a new or existing OpenCTI feature behind a dev feature flag. It covers attributes, GraphQL endpoints, managers and UI, and removing the flag later.
Install add-feature-flag
Built from the published package, never by AI.
git clone --depth 1 https://github.com/OpenCTI-Platform/opencti /tmp/opencti && mkdir -p ~/.claude/skills && cp -r /tmp/opencti/.github/skills/add-feature-flag ~/.claude/skills/add-feature-flagRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/OpenCTI-Platform/opencti /tmp/opencti && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/opencti/.github/skills/add-feature-flag ~/.gemini/antigravity-cli/skills/add-feature-flagAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a step-by-step procedure for hiding a new or existing feature behind a feature flag, called a dev feature, in the OpenCTI platform. It covers declaring the flag constant, flagging each new attribute, gating GraphQL endpoints and domain logic, and gating managers and UI screens. It also explains how to remove a flag once the feature is finished.
The skill links to a longer reference on feature flags and lists verification steps. These include grepping for the flag, starting the platform with the flag disabled, and then enabling it with APP__ENABLED_DEV_FEATURES to test the feature end to end. It is written for developers working in the opencti-graphql and opencti-front repositories.
Written from the project's SKILL.md and checked against it.
What it can do
- Declare the flag constantAdds an UPPER_SNAKE_CASE flag constant in the graphql config file.
- Flag new attributesAdds a featureFlag property to each new attribute and object mapping.
- Gate GraphQL endpointsAdds @ff directives to new queries, mutations and fields, then rebuilds the schema.
- Gate domain logicUses enforceEnableFeatureFlag and isFeatureEnabled checks in mutations and branches.
- Gate managersRegisters new managers only when the flag is enabled, and branches existing managers.
- Gate the UIUses isFeatureEnable in the front end to hide menus, routes, tabs and form fields.
- Verify flag behaviourChecks attribute mappings and startup behaviour with the flag off and on.
- Remove a flagLists the code locations to delete once a flag is no longer needed.
What you need
- Access to the OpenCTI opencti-graphql and opencti-front repositories
- yarn for the build:schema and relay commands
- A running OpenCTI platform with fresh test indices for verification
Try asking
- Put my new OpenCTI export feature behind a feature flag called EXPORT_V2
- Remove the MY_FEATURE flag and its guards from the OpenCTI codebase
- Gate my new GraphQL mutation and its UI menu behind a dev feature flag
Good to know
- Covers OpenCTI codebase changes only, not general feature flag systems
- New attributes must be flagged by hand, the source warns that a missed one is silently pushed to the index mapping
- A registered manager shows in logs even when the flag is off, so registration must be gated
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .github/skills/add-feature-flag/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB
Alternatives to add-feature-flag
All alternatives →Diagnoses slow React components and suggests targeted performance fixes. Built for developers who want to reduce re-renders or list lag in React UIs.
Diagnoses slow React components and suggests targeted performance fixes. Built for React developers who need to reduce re-renders, list lag, or expensive render work.
Designs masterclass-style lectures as slide courses with dense pages, long teacher narration and rare quizzes. Built for subjects where understanding matters more than hands-on practice.
Designs hands-on workshop courses in which the learner practises through exercise and quiz pages instead of watching. It suits workshops, bootcamp sessions and skills the learner should leave able to use.
Analyzes competition and develops market positioning strategies using Porter's Five Forces, Blue Ocean Strategy, and positioning maps. Useful for founders and teams evaluating competitors or preparing a startup or investor pitch.
Designs courses whose content depends on current or external facts. It researches the topic first, records each claim with its source, and builds the outline and pages from fetched material. Built for educators teaching time-sensitive subjects.
Compare with react-component-performance, react-component-performance or lecture-style
add-feature-flag: common questions
What happens if I forget to flag a new attribute?
The source says the field is pushed into the ElasticSearch index mapping at startup even when the flag is off, and nothing fails. The skill marks this step as one that must not be skipped.
How do I turn on a dev feature for testing?
The skill says to start the platform with APP__ENABLED_DEV_FEATURES set to a JSON array that contains the flag name, then check the feature works end to end.
How do I remove a feature flag after release?
Delete the constant, the featureFlag properties, the @ff directives and the enforce or isFeatureEnabled calls for it, then search opencti-graphql and opencti-front to confirm no guards remain.
How do I install add-feature-flag?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is add-feature-flag free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is add-feature-flag safe to use?
It scores 78 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 add-feature-flag?
Similar skills: react-component-performance, react-component-performance, lecture-style, workshop-style.
