Install
$ agentstack add skill-camilooscargbaptista-cto-toolkit-feature-flags ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Feature Flags
When to Use
- Gradual rollout of new features (canary, percentage)
- A/B testing
- Kill switch for risky features in production
- Trunk-based development (merge without releasing)
- Customer-specific feature enablement
Flag Types
| Type | Purpose | Lifespan | Example | |------|---------|----------|---------| | Release | Control feature rollout | Short (days-weeks) | ENABLE_NEW_BILLING_UI | | Experiment | A/B testing | Medium (weeks) | EXPERIMENT_CHECKOUT_V2 | | Ops | Kill switch | Permanent | ENABLE_EXTERNAL_PAYMENTS | | Permission | Per-customer features | Permanent | PREMIUM_ANALYTICS |
Implementation
Simple (Config-based)
// Feature flags from environment/config
const FLAGS = {
ENABLE_NEW_BILLING: process.env.FF_NEW_BILLING === 'true',
ENABLE_DARK_MODE: process.env.FF_DARK_MODE === 'true',
};
// Usage
if (FLAGS.ENABLE_NEW_BILLING) {
return this.newBillingService.process(order);
} else {
return this.legacyBillingService.process(order);
}
Advanced (Database-backed)
@Entity('feature_flags')
class FeatureFlag {
@PrimaryColumn()
key: string; // 'ENABLE_NEW_BILLING'
@Column({ default: false })
enabled: boolean; // Global toggle
@Column({ type: 'int', default: 0 })
rollout_percentage: number; // 0-100
@Column({ type: 'simple-array', nullable: true })
allowed_tenants: string[]; // Specific tenants
@Column({ type: 'simple-array', nullable: true })
allowed_users: string[]; // Specific users
@Column({ type: 'timestamp', nullable: true })
expires_at: Date; // Auto-disable date
}
@Injectable()
export class FeatureFlagService {
constructor(
@InjectRepository(FeatureFlag) private repo: Repository,
private cache: CacheManager,
) {}
async isEnabled(
key: string,
context: { userId?: string; tenantId?: string },
): Promise {
const flag = await this.getFlag(key);
if (!flag || !flag.enabled) return false;
// Check expiration
if (flag.expires_at && flag.expires_at 0 && context.userId) {
const hash = this.hashUserId(context.userId);
return (hash % 100) 3 months old)
- ❌ Testing only with flags ON (also test OFF)
- ❌ Using flags for permanent business logic (use permissions)
- ❌ Too many flags (> 20 active = confusion)
## Quality Gates
- [ ] Every flag has an owner and expiration date
- [ ] Cleanup task created when flag reaches 100%
- [ ] Dashboard showing all active flags and their rollout %
- [ ] Alert if flag is > 90 days old without cleanup
- [ ] Both flag-on and flag-off paths tested
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [camilooscargbaptista](https://github.com/camilooscargbaptista)
- **Source:** [camilooscargbaptista/cto-toolkit](https://github.com/camilooscargbaptista/cto-toolkit)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.