Agent skill

Control Flow

by EpicenterHQ in EpicenterHQ/epicenter

Linearize complex control flow with early returns, guard clauses, nested ifs, and natural-language conditions.

Custom licenceAuto-check passed

Install Control Flow

skills CLI
$ npx skills add EpicenterHQ/epicenter --skill control-flow -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install EpicenterHQ/epicenter control-flow --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/EpicenterHQ/epicenter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/control-flow .claude/skills/control-flow && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
control-flow
GitHub stars
4.8k
Token cost
~1.5k tokens
SKILL.md length
318 words
Files
1
Skills in repo
65
Repo updated
First seen
Licence
Custom licence

At a glance

Linearize complex control flow with early returns, guard clauses, nested ifs, and natural-language conditions.

  • Works in 5 steps: Ask the human question first: "Can I use… → Assess the situation: "What's my current… → Take action: "Get what I need" ->… → …
  • Flattening nested conditions
  • SKILL.md covers Core Pattern, Example: Early Returns with…, Example: Natural Language… and Example: Cleanup Check with…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Control Flow is an agent skill from EpicenterHQ/epicenter. Linearize complex control flow with early returns, guard clauses, nested ifs, and natural-language conditions. Use when flattening nested conditions, linearizing try/catch logic, or separating mixed throw-and-return handlers, not for a broad "simplify this" pass over a diff or package, which belongs to collapse-pass.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Open-source, local-first apps.

When your agent uses it

  • Flattening nested conditions
  • Linearizing try/catch logic
  • Separating mixed throw-and-return handlers
  • Not for a broad simplify this pass over a diff

Example prompts

  • “simplify this”
  • “/control-flow”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Ask the human question first: "Can I use what I already have?" -> early return for happy path
  2. Assess the situation: "What's my current state and what do I need to do?" -> clear, mutually exclusive conditions
  3. Take action: "Get what I need" -> consolidated logic at the end
  4. Use natural language variables: isUsingNavigator, isUsingLocalTranscription, needsOldFileCleanup: names that read like thoughts
  5. Avoid artificial constructs: No nested conditions that don't match how humans actually think through problems

What it can do on your machine

Read from SKILL.md and the folder at commit 9cc65c3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Control Flow loads about 1.5k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 318 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 318 words (~1,495 tokens).

“When refactoring complex control flow, mirror natural human reasoning patterns:”

— opening of SKILL.md by EpicenterHQ, Custom licence
name
control-flow
metadata.author
epicenter
metadata.version
1.0

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/control-flow of EpicenterHQ/epicenter.

Open the folder on GitHubat commit 9cc65c3

Compare with similar skills

Control Flow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Control Flow compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Control Flow this skillEpicenterHQ/epicenter4.8k—~1.5kAutomated safety check: PassCustom licence
Linearasgeirtj/system_prompts_leaks69k—~653Automated safety check: PassCC0-1.0
Linearyc-software/qm15k—~886Automated safety check: PassMIT
Safety Guardaffaan-m/ECC275k2 repos~554Automated safety check: NotesMIT
Linear Issue Workflowlobehub/lobehub83k—~1.5kAutomated safety check: PassCustom licence
Guard Modegarrytan/gstack136k—~919Automated safety check: NotesMIT

Similar skills

  • Linear

    asgeirtj/system_prompts_leaks

    Read and manage software issues, tickets, projects, and planning data in Linear.

    69k GitHub stars~653 tokensUpdated today
    Product & Project ManagementAuto-check passed
  • Linear

    yc-software/qm

    Search, read, create, and update the user's Linear issues, projects, and comments through per-user OAuth.

    15k GitHub stars~886 tokensUpdated today
    Backend & APIsAuto-check passed
  • Safety Guard

    affaan-m/ECC

    Guard against destructive operations with three modes: Careful intercepts dangerous commands (rm -rf, git push --force, DROP TABLE) for confirmation, Freeze locks writes to one directory, and Guard…

    275k GitHub starsUsed in 2 repos~554 tokens
    DevelopmentAuto-check: notes
  • Linear Issue Workflow

    lobehub/lobehub

    Handles Linear issues for the team: reading details and images, checking sub-issues, marking progress, labeling AI-created issues and writing completion comments.

    83k GitHub stars~1.5k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Guard Mode

    garrytan/gstack

    Switches on full safety by combining warnings before destructive commands with a block on edits outside one directory you choose, for work on production or live systems.

    136k GitHub stars~919 tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Safety Guard

    affaan-m/ECC

    本番システムでの作業時や、エージェントを自律的に実行する際に破壊的な操作を防ぐためにこのスキルを使用してください. An agent skill from affaan-m/ECC.

    275k GitHub stars~323 tokensUpdated 3 days ago
    Auto-check: notes

More from EpicenterHQ/epicenter

All 65 skills in this repo
  • Agent Instructions

    EpicenterHQ/epicenter

    Write and maintain repository guidance across AGENTS.md, CLAUDE.md, and .agents/skills.

    4.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Consult Claude

    EpicenterHQ/epicenter

    Assign Claude Code a read-only investigation, recommendation, or finished text draft.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Better Auth security hardening: rate limits, secrets, CSRF, trusted origins, cookies, sessions, OAuth tokens, and audit logging.

    4.8k GitHub stars~896 tokensUpdated today
    Auto-check passed
  • Cohesion Over Testability

    EpicenterHQ/epicenter

    Collapse test-shaped production boundaries while preserving behavior and coverage.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Collapse Pass

    EpicenterHQ/epicenter

    Remove indirection that does not earn its boundary across a diff or package.

    4.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Error Handling

    EpicenterHQ/epicenter

    Apply Wellcrafted Result patterns to fallible operations and preserve failures at boundaries.

    4.8k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Control Flow

What does Control Flow do?

Linearize complex control flow with early returns, guard clauses, nested ifs, and natural-language conditions. Control Flow is an agent skill from EpicenterHQ/epicenter. Linearize complex control flow with early returns, guard clauses, nested ifs, and natural-language conditions.

When should I use Control Flow?

Control Flow fits situations like: flattening nested conditions; linearizing try/catch logic; separating mixed throw-and-return handlers; not for a broad simplify this pass over a diff.

How do I install Control Flow in Claude Code?

Run `npx skills add EpicenterHQ/epicenter --skill control-flow -a claude-code`. Or copy the skill folder (.agents/skills/control-flow in EpicenterHQ/epicenter) into .claude/skills/control-flow in your project. Claude Code loads it when a task matches its description.

How do I install Control Flow in Codex?

Run `npx skills add EpicenterHQ/epicenter --skill control-flow -a codex`. Or copy the skill folder (.agents/skills/control-flow in EpicenterHQ/epicenter) into .agents/skills/control-flow in your project. Codex loads it when a task matches its description.

Can I use Control Flow in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add EpicenterHQ/epicenter --skill control-flow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/control-flow, .gemini/skills/control-flow, .github/skills/control-flow and .opencode/skills/control-flow in your project.

What does Control Flow need to run?

SKILL.md names no scripts, command-line tools or credentials: Control Flow is instructions for the agent only.

Does Control Flow access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Control Flow safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Control Flow use?

Control Flow has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Control Flow use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Control Flow?

Skills that share tags, products or a category with Control Flow: Linear (asgeirtj/system_prompts_leaks, 69k stars), Linear (yc-software/qm, 15k stars), Safety Guard (affaan-m/ECC, 275k stars) and Linear Issue Workflow (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Control Flow?

EpicenterHQ (a GitHub organization) maintains it in EpicenterHQ/epicenter, which has 4,819 GitHub stars. The repository holds 65 skills in this directory. The repository was last updated on October 8, 2026.

Source: EpicenterHQ/epicenter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.