| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| name | go-feature-flag |
| description | GO Feature Flag (GOFF) self-hosted feature flags with OpenFeature integration โ config, relay proxy, targeting, rollouts. Use when working with GOFF or flags.goff.yaml. |
| user-invocable | false |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
GO Feature Flag
When to Use This Skill
| Use this skill when... | Use a sibling skill instead when... |
|---|
You need GOFF-specific configuration โ flags.goff.yaml, relay proxy, targeting rules | You only need the vendor-agnostic OpenFeature SDK API โ use openfeature |
| You are deploying or operating the self-hosted GOFF backend | You want to scaffold the full feature-flag stack including provider selection โ use configure-feature-flags |
| Another skill needs the canonical GOFF flag-file shape | You are evaluating which feature-flag provider to adopt โ start with configure-feature-flags |
Open-source feature flag solution with file-based configuration and OpenFeature integration. Use when setting up self-hosted feature flags, configuring flag files, or deploying the relay proxy.
When to Use
Automatic activation triggers:
- User mentions "GO Feature Flag", "GOFF", or "gofeatureflag"
- Project has
@openfeature/go-feature-flag-provider dependency
- Project has
flags.goff.yaml or similar flag configuration
- User asks about self-hosted feature flags
- Docker/K8s configuration includes
gofeatureflag/go-feature-flag image
Related skills:
openfeature - OpenFeature SDK usage patterns
container-development - Docker/K8s deployment
Architecture Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application โ
โ โ โ
โ OpenFeature SDK โ
โ โ โ
โ GO Feature Flag Provider โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GO Feature Flag Relay Proxy โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Retriever โโ
โ โ (File, S3, GitHub, HTTP, K8s ConfigMap, etc.) โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Exporter โโ
โ โ (Webhook, S3, Kafka, PubSub, etc.) โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Notifier โโ
โ โ (Slack, Discord, Teams, Webhook) โโ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Flag Configuration โ
โ (flags.goff.yaml) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Flag Configuration Format
Basic Structure
flag-name:
variations:
variation1: value1
variation2: value2
defaultRule:
variation: variation1
targeting:
- name: rule-name
query: 'expression'
variation: variation2
Boolean Flags
new-feature:
variations:
enabled: true
disabled: false
defaultRule:
variation: disabled
For String, Number, and Object/JSON flag examples, see REFERENCE.md.
Targeting Rules
Query Syntax
GO Feature Flag uses a CEL-like query syntax for targeting:
targeting:
- name: beta-users
query: 'groups co "beta"'
variation: enabled
- name: specific-user
query: 'targetingKey eq "user-123"'
variation: enabled
- name: email-domain
query: 'email ew "@company.com"'
variation: enabled
- name: premium-tier
query: 'plan in ["pro", "enterprise"]'
variation: enabled
Operators
| Operator | Description | Example |
|---|
eq | Equals | email eq "test@example.com" |
ne | Not equals | plan ne "free" |
co | Contains | groups co "admin" |
sw | Starts with | email sw "admin" |
ew | Ends with | email ew "@company.com" |
in | In list | country in ["US", "CA"] |
gt, ge, lt, le | Comparisons | age gt 18 |
and, or | Logical | plan eq "pro" and country eq "US" |
Priority
Rules are evaluated top-to-bottom. First matching rule wins:
targeting:
- name: test-user
query: 'targetingKey eq "test-user-id"'
variation: enabled
- name: admins
query: 'groups co "admin"'
variation: enabled
- name: beta
query: 'groups co "beta"'
variation: enabled
defaultRule:
variation: disabled
Rollout Strategies
Percentage Rollout
new-checkout:
variations:
enabled: true
disabled: false
defaultRule:
percentage:
enabled: 20
disabled: 80
For Progressive Rollout, Scheduled Changes, and A/B Testing patterns, see REFERENCE.md.
Relay Proxy Configuration
Docker Compose (Development)
services:
goff-relay:
image: gofeatureflag/go-feature-flag:latest
ports:
- "1031:1031"
- "1032:1032"
volumes:
- ./flags.goff.yaml:/goff/flags.yaml:ro
environment:
- RETRIEVER_KIND=file
- RETRIEVER_PATH=/goff/flags.yaml
- POLLING_INTERVAL_MS=10000
- LOG_LEVEL=info
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:1032/health"]
interval: 10s
timeout: 5s
retries: 3
Environment Variables
RETRIEVER_KIND=file|s3|http|github|gitlab|googlecloud|azureblob|k8s
RETRIEVER_PATH=/path/to/flags.yaml
RETRIEVER_BUCKET=my-bucket
RETRIEVER_ITEM=flags/production.yaml
AWS_REGION=us-east-1
RETRIEVER_REPOSITORY_SLUG=owner/repo
RETRIEVER_FILE_PATH=flags/production.yaml
RETRIEVER_BRANCH=main
GITHUB_TOKEN=ghp_xxxx
RETRIEVER_URL=https://api.example.com/flags.yaml
RETRIEVER_HEADERS=Authorization=Bearer xxx
POLLING_INTERVAL_MS=30000
HTTP_PORT=1031
ADMIN_PORT=1032
LOG_LEVEL=info|debug|warn|error
For Kubernetes deployment configuration, see REFERENCE.md.
Exporters
Export flag evaluation data for analytics. Supported kinds: webhook, s3, googlecloud, kafka, pubsub, log.
For detailed exporter environment variable configuration, see REFERENCE.md.
Notifiers
Send notifications on flag changes. Supported: Slack, Discord, Microsoft Teams, Webhook.
For webhook URL configuration, see REFERENCE.md.
CLI Tools
Validate Configuration
go install github.com/thomaspoignant/go-feature-flag/cmd/goff@latest
goff lint --config flags.goff.yaml
goff lint --config flags.goff.yaml --format json
Testing Flags Locally
docker run -p 1031:1031 -p 1032:1032 \
-v $(pwd)/flags.goff.yaml:/goff/flags.yaml:ro \
-e RETRIEVER_KIND=file \
-e RETRIEVER_PATH=/goff/flags.yaml \
gofeatureflag/go-feature-flag:latest
curl -X POST http://localhost:1031/v1/feature/new-feature/eval \
-H "Content-Type: application/json" \
-d '{"evaluationContext": {"targetingKey": "user-123"}}'
Best Practices
1. Flag Naming Convention
checkout.new-payment-form
dashboard.beta-widgets
api.v2-endpoints
*.enabled
*.config
*.percentage
2. Track Flag Lifecycle
new-feature:
variations:
enabled: true
disabled: false
3. Monitor and Clean Up
- Export evaluation data to track usage
- Set up alerts for flags at 100% (ready for removal)
- Review flags quarterly for cleanup
For GitOps CI/CD workflow and environment-specific flag patterns, see REFERENCE.md.
Troubleshooting
Flag Not Evaluating Correctly
docker logs goff-relay
curl -X POST http://localhost:1031/v1/feature/my-flag/eval \
-H "Content-Type: application/json" \
-d '{"evaluationContext": {"targetingKey": "test", "email": "test@example.com"}}'
Provider Connection Issues
const provider = new GoFeatureFlagProvider({
endpoint: process.env.GOFF_RELAY_URL,
timeout: 5000,
});
provider.on('PROVIDER_READY', () => console.log('Provider ready'));
provider.on('PROVIDER_ERROR', (e) => console.error('Provider error', e));
Configuration Not Updating
POLLING_INTERVAL_MS=10000
docker exec goff-relay cat /goff/flags.yaml
curl http://localhost:1032/info
Documentation
Related Commands
/configure:feature-flags - Set up complete feature flag infrastructure
/configure:dockerfile - Container configuration best practices