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.
git clone --depth 1 https://github.com/atretyak1985/swarmeryWrote 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/commands/atretyak1985/swarmery/sweep-stale-flags)<a href="https://agentmods.dev/commands/atretyak1985/swarmery/sweep-stale-flags"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/sweep-stale-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/commands/atretyak1985/swarmery/sweep-stale-flags"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/sweep-stale-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.00029 | $0.01562 |
| Opus 5 | $0.00015 | $0.00781 |
| Sonnet 5 | $0.00006 | $0.00312 |
| Haiku 4.5 | $0.00003 | $0.00156 |
Grade A, and why
sweep-stale-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 — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sweep Stale Flags (Dynamic Workflow)
Scope hint: $ARGUMENTS (optional — restrict to one repo, e.g. the main app or the device repo; see project.json → mainApp / device)
When to use
Periodic hygiene sweep across the codebase to find:
- Feature flags read in code but never set in any deployment environment
- Env vars referenced in
process.env.X/os.getenv('X')but absent fromenv.example/values.*.yaml - Config keys that exist in
values.yamlbut no code reads them (rot)
This is breadth-first work — independent files, no mid-run user input needed. Perfect for Dynamic Workflow substrate.
For a targeted check on one variable, use the env-check skill directly.
Pre-flight (mandatory)
- Phase 1 user-only gaps RESOLVED
- No code changes intended — discovery + report only
- Scope is closed (single repo or "all project repos" —
project.json → repos)
Instructions to @tech-lead
Generate a Dynamic Workflow that:
- Discovery stage (parallel per repo) — extract:
- Code references:
grep -rE "process\.env\.[A-Z_]+|os\.getenv\(['\"]?[A-Z_]+"per repo - Code references for feature flags:
grep -rE "growthbook\.feature\(|isEnabled\(['\"]"(or whatever flag library is in use) - Declared env vars: parse
env.example,.env.example, allvalues*.yaml, allChart.yamldefaults - Declared flags: parse
growthbook.jsonor equivalent
- Code references:
- Cross-reference stage (sequential reduce) — compute three sets:
- Stale reads = used in code, absent everywhere → likely dead code
- Orphan declarations = declared, never read → likely dead config
- Schema drift = declared in some envs but missing in others
- Artifact —
sweep-stale-flags-{date}.mdin${AGENT_WORKSPACE_ROOT}/${AGENT_PROJECT}/workspace/working/.
Categories
- Stale env-var reads — code reads
process.env.X/os.getenv('X')but no env declares X - Stale flag reads — code calls
isEnabled('foo')but no flag config declaresfoo - Orphan declarations — declared in
values.yaml/env.examplebut no code reads - Schema drift — declared in
values.<envAlias>.yamlbut missing invalues.prod.yaml(or vice versa) — high incident risk - Sensitive-name without secret — variable name contains
KEY|SECRET|TOKEN|PASSWORDbut declared with a plaintext default (should source from the cloud provider's secret manager)
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 · 145 lines · 29 tokens per session scan A c3088ec4b0a2
sweep-stale-flags is a command published in the GitHub repository atretyak1985/swarmery (5 stars, last pushed today), licensed Apache-2.0. It adds 29 tokens to every session and 1,562 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-09-03.
Other commands, from other repositories
debug
Systematic debugging with automated investigation and 4-phase methodology. Default: inline evidence gathering and diagnosis. --deep: spawns systematic-debugger agent for full autonomous debugging. Use for errors, stack traces, test failures, or unexpected behavior.
fix-renovate-mr
Fix renovate issues.
gws-keep
List and read Google Keep notes.
bug
Reproduce then TDD-fix a ready-for-agent bug ticket in this checkout. Web bugs get a browser repro first.
excalidraw
Create or modify an editable Excalidraw diagram.
debugger
Systematic debugging with TodoWrite and Memory integration.