Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/camilooscargbaptista/cto-toolkit/feature-flagsnpx skills add camilooscargbaptista/cto-toolkit --skill feature-flagsgit clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/feature-flags)<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/feature-flags"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/feature-flags.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01199 |
| Opus 5 | $0.00009 | $0.00600 |
| Sonnet 5 | $0.00003 | $0.00240 |
| Haiku 4.5 | $0.00002 | $0.00120 |
Grade A, and why
feature-flags scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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<FeatureFlag>,
private cache: CacheManager,
) {}
async isEnabled(
key: string,
context: { userId?: string; tenantId?: string },
): Promise<boolean> {
const flag = await this.getFlag(key);
if (!flag || !flag.enabled) return false;
// Check expiration
if (flag.expires_at && flag.expires_at < new Date()) return false;
// Check specific tenant
if (flag.allowed_tenants?.includes(context.tenantId)) return true;
// Check specific user
if (flag.allowed_users?.includes(context.userId)) return true;
// Check percentage rollout (deterministic by userId)
if (flag.rollout_percentage > 0 && context.userId) {
const hash = this.hashUserId(context.userId);
return (hash % 100) < flag.rollout_percentage;
}
// No specific rules + globally enabled
return flag.allowed_tenants?.length === 0 && flag.allowed_users?.length === 0;
}
private hashUserId(userId: string): number {
let hash = 0;
for (let i = 0; i < userId.length; i++) {
hash = ((hash << 5) - hash) + userId.charCodeAt(i);
hash |= 0;
}
return Math.abs(hash);
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 166 lines · 17 tokens per session scan A dbdbf54a9340
feature-flags is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 1,199 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
feature-flags-architect
Use when adding, retiring, or auditing feature flags. Triggers on "add a flag", "ship behind a flag", "rollout plan", "kill switch", "stale flags", "flag debt", "LaunchDarkly", "GrowthBook", "Statsig", "Unleash", "Flipt", or any progressive-delivery question. Ships flag debt scanner, rollout planner, and kill-switch…
feature-flags-architect
Use when adding, retiring, or auditing feature flags. Triggers on "add a flag", "ship behind a flag", "rollout plan", "kill switch", "stale flags", "flag debt", "LaunchDarkly", "GrowthBook", "Statsig", "Unleash", "Flipt", or any progressive-delivery question. Ships flag debt scanner, rollout planner, and kill-switch…
Feature Flag Testing
Testing feature flag implementations including flag evaluation, gradual rollout verification, fallback behavior, and flag cleanup detection.
feature-flag-strategy
Use feature flags to decouple deploy from release, then clean them up. Invoke when shipping any risky change, a gradual rollout, or a kill-switch.
featurevisor
Author, query, and integrate Featurevisor — Git-based feature flags, A/B experiments, and remote config. Use whenever the user mentions Featurevisor, works in a project containing featurevisor.config.js, edits files under attributes/, segments/, features/, variables/, groups/, schemas/, targets/, sets/, or tests/…
project-dashboard
Build and maintain auto-refreshing project health dashboards that aggregate git activity, CRM deal status, and manual notes into a single scanable view. Uses marker-delimited auto-sections with a watchdog cron pattern.