Classifies every feature flag, removes what's safe (fully rolled out or long dead), and flags partial-rollout flags for a human.
beeuni marketplace install beeuni-starter:flag-cleanup-skill# Read the durable ledger first — known flags, their last-seen rollout state,
# what's already been removed, and what's already flagged for human review.
cat memory/flag-cleanup-log.md 2>/dev/null || echo "(no ledger yet — first run)"
# Check any open cleanup PRs from a prior run.
gh pr list --repo {{target_repo}} --state open \
--search 'in:title "chore(flags)" OR label:feature-flags' \
--json number,title,headRefName,statusCheckRollup,url
DEFAULT_BRANCH=$(gh repo view {{target_repo}} --json defaultBranchRef -q .defaultBranchRef.name)
if [ -d /workspace/repo/.git ]; then
cd /workspace/repo && git fetch origin && git checkout "$DEFAULT_BRANCH" && git reset --hard "origin/$DEFAULT_BRANCH"
else
git clone --filter=blob:none https://github.com/{{target_repo}}.git /workspace/repo
cd /workspace/repo
git checkout "$DEFAULT_BRANCH"
fi
cd /workspace/repo
# Flag definitions/registry — adapt the path to this repo's convention
# (e.g. flags.ts, feature-flags.json, a flags/ directory).
grep -rnE "(defineFlag|registerFlag|FEATURE_FLAGS|flags\.(json|ya?ml))" --include="*.ts" --include="*.tsx" --include="*.json" . 2>/dev/null
# Call sites — every place a flag is actually read.
grep -rnE "(isEnabled|useFeatureFlag|getFlag|flags\.[a-zA-Z_]+)\(" --include="*.ts" --include="*.tsx" . 2>/dev/null
git log -1 --format=%ai -- <flag file or last touched call site> for the flag's last-touched date.| Classification | Criteria | Action |
|---|---|---|
| Fully rolled out | Rollout is 100% / hardcoded true with no variant left, or explicitly marked GA | Remove — inline the "on" branch, delete the "off" branch |
| Long dead | No call site found anywhere in the repo, or unchanged (declaration and all call sites) for more than {{min_flag_age_days}} days with a rollout that was already at 0% or 100% | Remove entirely, including the dead declaration |
| Partial rollout | Rollout between 0% and 100% exclusive, percentage-based, or user/cohort-targeted | Do not touch. Log in the ledger for human review |
| Active experiment | Tied to an A/B test, gradual ramp still in progress, or flag age under {{min_flag_age_days}} days with no clear rollout signal | Do not touch. Log in the ledger for human review |
cd /workspace/repo
BRANCH="chore/flag-cleanup-$(date +%Y-%m-%d)"
git checkout -b "$BRANCH" "origin/$DEFAULT_BRANCH" # or check out an existing branch from this run
if (flags.x), useFeatureFlag('x'), etc.).cd /workspace/repo
pnpm install 2>&1 | tee /tmp/flag-install.log
pnpm typecheck 2>&1 | tee /tmp/flag-typecheck.log
pnpm lint 2>&1 | tee /tmp/flag-lint.log
pnpm build 2>&1 | tee /tmp/flag-build.log
pnpm test 2>&1 | tee /tmp/flag-unit.log
pnpm test:integration 2>&1 | tee /tmp/flag-integration.log # if < ~10 min
| Failure | Action |
|---|---|
| Typecheck/build error from a removed branch's dependency | Fix the mechanical fallout (unused import, dangling type); if non-mechanical, revert that one flag's removal and log it |
| Test failure for the removed flag | Expected if the test only covered the dead branch — delete it; if it covered the surviving branch, fix the test |
| Test failure in an UNRELATED area | File it as a note (likely pre-existing); don't revert unless you can prove causation |
| Any failure you can't resolve in a few lines | Revert that flag's removal, log it as deferred with the reason, keep the rest of the batch |
cd /workspace/repo
git add -A
git commit -m "chore(flags): remove stale feature flags $(date +%Y-%m-%d)
Removed: <flag-a> (fully rolled out), <flag-b> (long dead)
Verification: typecheck ✓ lint ✓ build ✓ unit ✓ integration ✓"
cd /workspace/repo
git push origin "$BRANCH"
gh pr create --repo {{target_repo}} --base "$DEFAULT_BRANCH" --head "$BRANCH" \
--title "chore(flags): remove stale feature flags ($(date +%Y-%m-%d))" \
--label feature-flags \
--body "Generated by the flag-cleanup agent. The full suite passed in the
sandbox before this PR was opened.
**Removed (fully rolled out or long dead):**
- <flag-a> — fully rolled out, last touched <date>
- <flag-b> — long dead, no live call site found
**Left untouched (flagged for human review):**
- <flag-c> — partial rollout at <percentage>%
- <flag-d> — active experiment
A human owns the merge."
memory/flag-cleanup-log.md (see
<ledger-format>), then open + self-merge a scoped change request for the
ledger update only.Get a complete picture of any company or person before outreach. This skill always works with web search, and gets significantly better with enrichment and CRM data.
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
Route code, repository, and data/SQL work to isolated Beeuni sessions instead of burning your main context on it. Use when asked to implement a feature, fix a bug, make failing tests pass, work a ticket/issue, refactor, navigate or change a codebase, ship a PR, review a pull request, or run SQL/warehouse analysis against a dataset — and when the user wants two agents or parallel reviewers/investigators on the same work. Covers the explore-vs-session routing call, deciding where the code lives (this project's repo vs cloning an external GitHub repo) or where the data lives, finding the repo with gh, spawning sessions in parallel, dual PR reviews, and reporting results back. Triggers: 'implement', 'fix the bug', 'make the tests pass', 'work this ticket', 'refactor this', 'open a PR', 'review this PR', 'run two agents on it', 'query the warehouse', 'analyze this dataset'.
Convert Word (.doc, .docx), PowerPoint (.ppt, .pptx), Excel (.xls, .xlsx), OpenDocument (.odt, .ods, .odp), RTF, EPUB, CSV, and PDF files to GitHub-Flavored Markdown. Use when a task needs the contents of an office document, spreadsheet, presentation, ebook, or PDF you cannot read directly.
Deep research agent skill. Use when the user needs thorough, scientific, truth-seeking research on any topic -- investigating claims, finding primary sources, synthesizing evidence, producing cited reports. Triggers on: 'research this', 'investigate', 'deep dive', 'find sources', 'what does the evidence say', 'literature review', 'fact check', 'analyze the research on', any request requiring multi-source investigation with citations.
Artifact-agnostic design guidance — works for CSS, PowerPoint, matplotlib, PDF, or any visual output. Also includes a curated catalog of named font/color themes for slides, docs, and reports (non-web assets).