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 skills add cass-2003/local-workflow-skill --skill feature-flagsgit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote 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/cass-2003/local-workflow-skill/feature-flags)<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/feature-flags"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/feature-flags/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/feature-flags"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/feature-flags.svg" alt="Reviewed on agentmods" width="80" 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.00157 | $0.02878 |
| Opus 5 | $0.00078 | $0.01439 |
| Sonnet 5 | $0.00031 | $0.00576 |
| Haiku 4.5 | $0.00016 | $0.00288 |
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 7d 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 — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Feature Flags Skill — 特性开关
何时使用
- 想发布一个功能但能立即关闭(不重新部署)
- 灰度放量(先 1% 用户 → 10% → 50% → 100%)
- A/B 测试不同版本效果
- 给特定客户 / 内部用户开放预览
- 故障应急:紧急关闭某条线路
- 业务参数调优(库存阈值 / 限额 / 折扣率)不想发版
一、五类 Toggle(Pete Hodgson 分类)
| 类型 | 寿命 | 例子 | 清理紧迫性 |
|---|---|---|---|
| Release Toggle | 短(数天-周) | "新支付流程" 灰度 | 高 — 上线后立刻清 |
| Experiment Toggle | 中(实验周期) | A/B 测试两种结账 UI | 中 — 实验结束清 |
| Ops Toggle | 长(月-永久) | "降级关闭推荐算法" | 低 — kill switch 永久保留 |
| Permission Toggle | 长(永久) | "premium 用户看新报表" | 低 — 业务逻辑 |
| Kill Switch | 永久 | "支付通道熔断" | 永久保留 |
核心原则:Release Toggle 必须有清理 deadline。否则代码库充满死代码,开关数指数膨胀。
二、Toggle Point 抽象
// ✅ 抽象层
interface FeatureFlags {
isEnabled(key: string, ctx: EvalContext): Promise<boolean>
getVariant(key: string, ctx: EvalContext): Promise<string> // 多变体
getNumber(key: string, ctx: EvalContext, dflt: number): Promise<number>
getJSON<T>(key: string, ctx: EvalContext, dflt: T): Promise<T>
}
// 业务代码不直接读环境变量 / 配置文件 / Redis
if (await flags.isEnabled('new-checkout-flow', { userId, country })) {
return newCheckoutFlow()
}
return oldCheckoutFlow()
调用点叫 Toggle Point,决策代码(取值 / targeting)叫 Toggle Router。业务代码只见 Toggle Point。
三、Targeting Rules(决策规则)
{
"key": "new-checkout-flow",
"default": false,
"rules": [
// 优先级从上到下
{ "if": { "userId": { "in": ["u_admin", "u_test1"] } }, "then": true },
{ "if": { "country": { "eq": "JP" } }, "then": false }, // 日本暂不开
{ "if": { "isPremium": true }, "then": true }, // premium 用户先开
{ "if": { "userId": { "rolloutPercentage": 10 } }, "then": true }, // 其余 10%
{ "if": { "anyOf": [...] }, "then": true }
]
}
Percentage rollout 的稳定性
// ❌ 错:Math.random() — 同一用户每次结果不同
function isInRollout(pct: number) {
return Math.random() * 100 < pct
}
// ✅ 对:基于 user ID hash — 同用户始终同结果
function isInRollout(userId: string, flagKey: string, pct: number) {
const hash = crc32(`${flagKey}:${userId}`)
return (hash % 100) < pct
}
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.
- 7d ago First seen · 283 lines · 157 tokens per session scan A 830840350de3
feature-flags is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 2mo ago), licensed MIT. It adds 157 tokens to every session and 2,878 once invoked, about $0.0008 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-09-03.
Other skills, from other repositories
recipe-create-meet-space
Create a Google Meet meeting space and share the join link.
workthreads
SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…
atmos-config
Atmos root configuration: atmos.yaml discovery, precedence, deep merging, basepath, imports, minimal bootstrap, and routing to narrower Atmos skills.
story-readiness
Validate that a story file is implementation-ready. Checks for embedded GDD requirements, ADR references, engine notes, clear acceptance criteria, and no open design questions. Produces READY / NEEDS WORK / BLOCKED verdict with specific gaps. Use when user says 'is this story ready', 'can I start on this story', 'is…
autotask-creator
Rules for automation CRUD from the group-chat commander. The commander does not call mutation tools and does not edit cloud/autotasks files directly. It emits one or more top-level ... containers in its final text; the bus parses and applies them after the turn.
remove
Remove a deployed framework or addon from the current workspace.