Agent skill

Control Flow Clarity

by yokki-vans in yokki-vans/InkPointX

Branching and state-modeling clarity in C/C++. An agent skill from yokki-vans/InkPointX.

MITAuto-check passedDevelopment

Install Control Flow Clarity

skills CLI
$ npx skills add yokki-vans/InkPointX --skill control-flow-clarity -a claude-code

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

GitHub CLI
$ gh skill install yokki-vans/InkPointX control-flow-clarity --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/yokki-vans/InkPointX.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/control-flow-clarity .claude/skills/control-flow-clarity && 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-clarity
GitHub stars
107
Token cost
~737 tokens
SKILL.md length
386 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Branching and state-modeling clarity in C/C++. An agent skill from yokki-vans/InkPointX.

  • Refactoring logic that branches on discrete values: if/else-if ladders
  • SKILL.md covers Core moves, When NOT to switch, Enum hygiene and Self-review
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Anything that should be an enum plus an exhaustive switch

What it does

Control Flow Clarity is an agent skill from yokki-vans/InkPointX. Branching and state-modeling clarity in C/C++. Use when writing or refactoring logic that branches on discrete values: if/else-if ladders, status flags, mode or state ints, or anything that should be an enum plus an exhaustive switch. Covers enum class over magic ints, exhaustive switch over nested if, early-return guard clauses, table dispatch, and when each is the right call.

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

It sits in Development, covering Refactoring. It works with C++. The repository describes itself as: Firmware for Xteink X3/X4. Personal fork of Crosspoint and CrossInk. The licence is MIT.

When your agent uses it

  • Refactoring logic that branches on discrete values: if/else-if ladders
  • Anything that should be an enum plus an exhaustive switch

Example prompts

  • “/control-flow-clarity”

What it can do on your machine

Read from SKILL.md and the folder at commit d272143. 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.

    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 Clarity loads about 737 tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 386 words of instructions outside code blocks.

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

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

The full file from yokki-vans/InkPointX at commit d272143, republished under its MIT licence (© yokki-vans). 386 words, ~737 tokens.

Download SKILL.mdSave it as .claude/skills/control-flow-clarity/SKILL.md (or your agent's skills folder).
name
control-flow-clarity
description
Branching and state-modeling clarity in C/C++. Use when writing or refactoring logic that branches on discrete values: if/else-if ladders, status flags, mode or state ints, or anything that should be an enum plus an exhaustive switch. Covers enum class over magic ints, exhaustive switch over nested if, early-return guard clauses, table dispatch, and when each is the right call.

Control-Flow Clarity

The goal: a reviewer verifies correctness by reading, not by tracing. Branching that mirrors the problem's shape is self-evident; branching that encodes it in ad-hoc ints and nesting forces the reader to reconstruct intent.

Core moves

  • Model a closed set of states/modes as an enum class, not ints or bools. A variable kept honest by a comment ("0 = hidden, 1 = showing, 2 = confirm") is a latent bug. Make it an enum and the comment becomes the type.
  • Dispatch on an enum with an exhaustive switch, no default. This codebase relies on it: omitting default lets the compiler flag the unhandled case when someone adds an enum value. A default: that swallows the unknown case throws that safety away. Add default only when "every other value does nothing" is a deliberate, documented decision.
  • Replace nested if/else-if ladders that branch on one discriminant with a switch. If each branch only maps input to a value, prefer a lookup table (static constexpr array) over both.
  • Prefer early-return guard clauses over nested success bodies. Handle the error/empty/skip cases first and return; keep the main path at the left margin.

When NOT to switch

  • Branches test unrelated conditions, not one discriminant: a guarded if sequence is honest; a switch would be forced.
  • Two outcomes on a genuine boolean: keep the if.
  • The discriminant is an open or unbounded set (arbitrary ints, strings): table or map, not a switch.
Show full SKILL.md (151 more words)Show less

Enum hygiene

  • enum class by default for type safety. Plain enum only when values must implicitly convert (e.g. a value that doubles as a UI dropdown index), and then give it a trailing _COUNT sentinel for safe bounds/iteration, matching the existing settings enums.
  • Name the discriminant after what it selects, not its storage: Orientation orientation, not uint8_t mode.
  • No magic numeric codes for states. If you write a comment mapping numbers to meanings, you owe an enum.

Self-review

  • No int/bool standing in for a closed set of modes; it is an enum class.
  • Enum dispatch is an exhaustive switch with no catch-all default (or the default is a documented deliberate choice).
  • No nested if/else-if ladder on a single discriminant that should be a switch or a table.
  • Error/skip cases are early-return guards; the happy path is not buried.
  • No magic numbers where a named enum or constexpr would state the intent.

© yokki-vans, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/control-flow-clarity of yokki-vans/InkPointX.

Open the folder on GitHubat commit d272143

Compare with similar skills

Control Flow Clarity 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 Clarity compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Control Flow Clarity this skillyokki-vans/InkPointX107—~737Automated safety check: PassMIT
Embedded Cpp14 MisraBlueAndi/Pixelix443—~2kAutomated safety check: PassMIT
Ss Cpp ModernSerial-Studio/Serial-Studio7.2k—~1.6kAutomated safety check: PassCustom licence
Cpp ProYikai-Liao/symusic1891 repos~1.1kAutomated safety check: PassMIT
Readable Cppcrazyguitar/cppcheatsheet290—~6.4kAutomated safety check: PassMIT
Cpp Codingtimeplus-io/proton2.3k—~582Automated safety check: PassApache-2.0

Similar skills

  • Embedded Cpp14 Misra

    BlueAndi/Pixelix

    A skill your agent uses when writing, reviewing, or refactoring C/C++ firmware code in this repository (src/, lib/, test/) — creating or editing .h/.hpp/.cpp files, applying MISRA-oriented and…

    443 GitHub stars~2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Ss Cpp Modern

    Serial-Studio/Serial-Studio

    Modern C++20 authoring guidance for Serial Studio (Qt 6.11, C++20): concepts, ranges, move/RAII, std smart pointers, constexpr, lock-free SPSC atomics.

    7.2k GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Cpp Pro

    Yikai-Liao/symusic

    Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques.

    189 GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Readable Cpp

    crazyguitar/cppcheatsheet

    Readable C/C++/Rust/CUDA code rules inspired by The Art of Readable Code.

    290 GitHub stars~6.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Cpp Coding

    timeplus-io/proton

    Write or review Timeplus/Proton C++20 code covering naming conventions, Proton fences, clang-format, IProcessor patterns, and checkpointing.

    2.3k GitHub stars~582 tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Qt Qml

    Serial-Studio/Serial-Studio

    QML authoring best practices for Serial Studio (Qt 6.11). An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from yokki-vans/InkPointX

  • Hal And Abstractions

    yokki-vans/InkPointX

    Layering and abstraction discipline for the firmware. An agent skill from yokki-vans/InkPointX.

    107 GitHub stars~791 tokensUpdated 17 days ago
    Auto-check passed
  • Heap Discipline

    yokki-vans/InkPointX

    Memory allocation discipline for the ESP32-C3 (~380KB RAM, no PSRAM, single 48KB framebuffer).

    107 GitHub stars~889 tokensUpdated 17 days ago
    Auto-check passed
  • Refactor For Review

    yokki-vans/InkPointX

    Producing small, single-concern, reviewable changes. An agent skill from yokki-vans/InkPointX.

    107 GitHub stars~791 tokensUpdated 17 days ago
    Auto-check passed
  • Scope Discipline

    yokki-vans/InkPointX

    Feature-scope discipline for a dedicated e-reader (not a Swiss Army knife).

    107 GitHub stars~691 tokensUpdated 17 days ago
    Auto-check passed

Works with

Categories

Questions about Control Flow Clarity

What does Control Flow Clarity do?

Branching and state-modeling clarity in C/C++. An agent skill from yokki-vans/InkPointX. Control Flow Clarity is an agent skill from yokki-vans/InkPointX. Branching and state-modeling clarity in C/C++.

When should I use Control Flow Clarity?

Control Flow Clarity fits situations like: refactoring logic that branches on discrete values: if/else-if ladders; anything that should be an enum plus an exhaustive switch.

How do I install Control Flow Clarity in Claude Code?

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

How do I install Control Flow Clarity in Codex?

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

Can I use Control Flow Clarity 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 yokki-vans/InkPointX --skill control-flow-clarity -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-clarity, .gemini/skills/control-flow-clarity, .github/skills/control-flow-clarity and .opencode/skills/control-flow-clarity in your project.

What does Control Flow Clarity need to run?

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

Does Control Flow Clarity 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 Clarity 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 Clarity use?

Control Flow Clarity is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Control Flow Clarity use?

About 737 tokens (SKILL.md is roughly 2.9k 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 Clarity?

Skills that share tags, products or a category with Control Flow Clarity: Embedded Cpp14 Misra (BlueAndi/Pixelix, 443 stars), Ss Cpp Modern (Serial-Studio/Serial-Studio, 7.2k stars), Cpp Pro (Yikai-Liao/symusic, 189 stars) and Readable Cpp (crazyguitar/cppcheatsheet, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Control Flow Clarity?

yokki-vans (a GitHub user) maintains it in yokki-vans/InkPointX, which has 107 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 24, 2026.

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