Agent Skills › getsentry/sentry › feature-flags

feature-flags

GitHub

提供 FlagPole 功能标志的全生命周期管理指南,涵盖注册、Python/前端检查、测试及上线流程。

.agents/skills/feature-flags/SKILL.md getsentry/sentry

Trigger Scenarios

添加新功能标志 将功能隐藏于标志后 注册新标志 查询或启用标志

Install

npx skills add getsentry/sentry --skill feature-flags -g -y
More Options

Non-standard path

npx skills add https://github.com/getsentry/sentry/tree/master/.agents/skills/feature-flags -g -y

Use without installing

npx skills use getsentry/sentry@feature-flags

指定 Agent (Claude Code)

npx skills add getsentry/sentry --skill feature-flags -a claude-code -g -y

安装 repo 全部 skill

npx skills add getsentry/sentry --all -g -y

预览 repo 内 skill

npx skills add getsentry/sentry --list

SKILL.md

Frontmatter
{
    "name": "feature-flags",
    "description": "Gate a Sentry feature behind a FlagPole feature flag. Use when adding a feature flag, registering a flag in temporary.py, checking a flag from Python or the frontend, enabling a flag in tests, or asking where FlagPole rollout config lives. Trigger on \"add a feature flag\", \"gate this behind a flag\", \"register a flag\", \"features.has\", \"api_expose\", \"OrganizationFeature\", \"ProjectFeature\", \"FlagPole\"."
}

Feature Flags (FlagPole)

New features should be gated behind a feature flag.

  1. Register the flag in src/sentry/features/temporary.py:

    manager.add("organizations:my-feature", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
    

    Use api_expose=True if the frontend needs to check the flag. Use ProjectFeature and a projects: prefix for project-scoped flags.

  2. Python check:

    if features.has("organizations:my-feature", organization, actor=user):
    
  3. Frontend check (requires api_expose=True):

    organization.features.includes('my-feature');
    
  4. Tests:

    with self.feature("organizations:my-feature"):
        ...
    
  5. Rollout: FlagPole YAML config lives in the sentry-options-automator repo, not here.

  6. Removal: once the rollout is finished, the flag comes out in a fixed three-PR order — see the remove-option-or-flag skill.

See https://develop.sentry.dev/feature-flags/ for full docs.

Version History

  • 946f25b Current 2026-08-29 07:36
  • d3c9056 2026-08-20 20:32

Same Skill Collection

.agents/skills/bump-sentry-dependency/SKILL.md
.agents/skills/cmdk-actions/SKILL.md
.agents/skills/design-system/SKILL.md
.agents/skills/frontend-data-fetching/SKILL.md
.agents/skills/generate-frontend-forms/SKILL.md
.agents/skills/generate-migration/SKILL.md
.agents/skills/generate-snapshot-tests/SKILL.md
.agents/skills/hybrid-cloud-rpc/SKILL.md
.agents/skills/hybrid-cloud-test-gen/SKILL.md
.agents/skills/lint-fix/SKILL.md
.agents/skills/lint-new/SKILL.md
.agents/skills/migrate-container-queries/SKILL.md
.agents/skills/migrate-frontend-forms/SKILL.md
.agents/skills/notification-platform/SKILL.md
.agents/skills/react-component-documentation/SKILL.md
.agents/skills/react-testing/SKILL.md
.agents/skills/scraps-review/SKILL.md
.agents/skills/seer-embed/SKILL.md
.agents/skills/sentry-backend-bugs/SKILL.md
.agents/skills/sentry-javascript-bugs/SKILL.md
.agents/skills/sentry-security/SKILL.md
.agents/skills/analytics/SKILL.md
.agents/skills/backend-conventions/SKILL.md
.agents/skills/cell-architecture/SKILL.md
.agents/skills/django-models/SKILL.md
.agents/skills/hybrid-cloud-outboxes/SKILL.md
.agents/skills/migrate-breadcrumb-list/SKILL.md
.agents/skills/remove-option-or-flag/SKILL.md
.agents/skills/setup-dev/SKILL.md

Metadata

Files
0
Version
991ee88
Hash
d617ce50
Indexed
2026-08-20 20:32

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-03 15:42
浙ICP备14020137号-1