Agent skill

Sake CLI Architecture

by kattouf in kattouf/Sake

A skill your agent uses when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution.

MITAuto-check passedMobile

Install Sake CLI Architecture

skills CLI
$ npx skills add kattouf/Sake --skill sake-cli-architecture -a claude-code

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

GitHub CLI
$ gh skill install kattouf/Sake sake-cli-architecture --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/kattouf/Sake.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/sake-cli-architecture .claude/skills/sake-cli-architecture && 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
sake-cli-architecture
GitHub stars
116
Token cost
~1.1k tokens
SKILL.md length
246 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution.

  • Works in 4 steps: validateProject() — checks Package.swift… → buildExecutableIfNeeded() — compares… → buildExecutable() — swift build, touches… → …
  • Working on SakeCLI
  • SKILL.md covers Module Split, CLI Entry Point, CLI Commands and SakeAppManager — Phantom Types, plus 6 more sections
  • Calls swift

What it does

Sake CLI Architecture is an agent skill from kattouf/Sake. Use when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution.

Its SKILL.md is about 1.1k 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 Mobile, covering iOS development. It works with Bash. The repository describes itself as: 🍶 Swift-based utility for managing project commands, inspired by Make. The licence is MIT.

When your agent uses it

  • Working on SakeCLI
  • SakeCLILibrary targets — CLI entry point
  • Config resolution
  • SakeAppManager build/run lifecycle

Example prompts

  • “/sake-cli-architecture”

Workflow steps

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

  1. validateProject() — checks Package.swift exists, dumps it, verifies SakeApp executable product
  2. buildExecutableIfNeeded() — compares executable mtime vs source files, checks Swift version changes
  3. buildExecutable() — swift build, touches executable, saves Swift version
  4. Binary cached at SakeApp/.build/debug/SakeApp

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • swift

    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

Sake CLI Architecture loads about 1.1k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 246 words of instructions outside code blocks.

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

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 kattouf/Sake at commit 80a3e98, republished under its MIT licence (© kattouf). 246 words, ~1,121 tokens.

Download SKILL.mdSave it as .claude/skills/sake-cli-architecture/SKILL.md (or your agent's skills folder).
name
sake-cli-architecture
description
Use when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution.

Sake CLI Architecture

Reference for the CLI side of Sake (the sake binary users install).

Module Split

SakeCLI          → Thin executable. @main struct, ArgumentParser commands.
SakeCLILibrary   → All logic. Testable. Config, SakeAppManager, shell execution.
SakeShared       → Types shared between CLI and Sake library.

SakeCLI was split from SakeCLILibrary specifically for testability (SakeCLILibraryTests).

CLI Entry Point

swift
// Sources/SakeCLI/SakeCLI.swift
@main struct SakeCLI: AsyncParsableCommand {
    static let configuration = CommandConfiguration(
        commandName: "sake",
        subcommands: [InitCommand, CleanCommand, BuildCommand, RunCommand, ListCommand] + platformSpecific,
        defaultSubcommand: RunCommand.self,  // `sake myCommand` == `sake run myCommand`
    )
}

Platform-specific: EditCommand only on macOS.

CLI Commands

CommandDoes
initCreates SakeApp/ from template (UninitializedMode → InitializedMode)
buildCompiles SakeApp, --show-bin-path to print binary path
cleanRemoves SakeApp build artifacts
runBuilds if needed → executes command in SakeApp binary
listBuilds if needed → lists commands (human-readable or --json)
editOpens SakeApp in Xcode (macOS only)

SakeAppManager — Phantom Types

swift
package enum UninitializedMode {}
package enum InitializedMode {}
package struct SakeAppManager<Mode>: ~Copyable { ... }
  • makeInUninitializedMode(sakeAppPath:) — for init command
  • makeInInitializedMode(sakeAppPath:) — validates SakeApp exists, for all other commands
  • initializeProject() consumes UninitializedMode, returns InitializedMode

Build Lifecycle (InitializedMode)

  1. validateProject() — checks Package.swift exists, dumps it, verifies SakeApp executable product
  2. buildExecutableIfNeeded() — compares executable mtime vs source files, checks Swift version changes
  3. buildExecutable() — swift build, touches executable, saves Swift version
  4. Binary cached at SakeApp/.build/debug/SakeApp

Prebuilt binary path: skips build entirely, used in CI.

How CLI Runs a Command

sake myCommand arg1 arg2
  → RunCommand parses: command="myCommand", args=["arg1","arg2"]
  → ConfigManager resolves config (CLI > ENV > .sake.yml)
  → SakeAppManager builds SakeApp if needed
  → Executes: SakeApp run --case-converting-strategy X myCommand arg1 arg2
  → SakeApp binary (Sake library) handles actual command execution

Config System

See sake-config-system skill for details. Key types:

  • CommonOptions — --config-path, --sake-app-path
  • CommandRelatedCommonOptions — --sake-app-prebuilt-binary-path, --case-converting-strategy
  • CLIConfig, ENVConfig, FileConfig → ConfigResolver → Config

Error Handling

Two layers:

SakeAppManagerError (CLI level):

  • sakeAppNotInitialized, sakeAppAlreadyInitialized
  • sakeAppNotValid(ValidationError) — Package.swift issues
  • failedToBuildSakeApp, failedToReadSwiftVersion
  • sakeAppError(.businessError | .unexpectedError) — wraps SakeApp exit codes

SakeAppError (Sake library level, inside SakeApp binary):

  • commandNotFound — with closest match suggestions (Levenshtein distance ≤ 2)
  • commandRunFailed, commandDuplicate, commandArgumentsParsingFailed
  • All conform to LocalizedError

Exit codes: SakeAppExitCode (101-105) in SakeShared.

Shell Execution

ShellExecutor wraps swift-subprocess. SakeAppManagerCommandExecutor protocol abstracts shell calls for testing:

  • packageDump(), packageClean(), buildExecutable()
  • callRunCommandOnExecutable(...), callListCommandOnExecutable(...)
  • swiftVersionDump(), packageShowBinPath()

Key Files

Sources/SakeCLI/SakeCLI.swift                              — entry point
Sources/SakeCLI/RunCommand.swift                           — default subcommand
Sources/SakeCLILibrary/SakeAppManager/SakeAppManager.swift — phantom type factory
Sources/SakeCLILibrary/SakeAppManager/SakeAppManager+InitializedMode.swift — build/run logic
Sources/SakeCLILibrary/Config/ConfigManager.swift          — config resolution
Sources/SakeCLILibrary/SakeAppManager/SakeAppManagerError.swift — error types

© kattouf, 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/sake-cli-architecture of kattouf/Sake.

Open the folder on GitHubat commit 80a3e98

Compare with similar skills

Sake CLI Architecture 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.

Sake CLI Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sake CLI Architecture this skillkattouf/Sake116—~1.1kAutomated safety check: PassMIT
UI Automation Workflowsconorluddy/xclaude-plugin183—~2.2kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.1k2 repos~1.5kAutomated safety check: PassMIT
Swiftui UI PatternsAFK-surf/OpenBridge4304 repos~887Automated safety check: PassMIT
Swiftui Performance Auditharperreed/dotfiles3348 repos~1.4kAutomated safety check: PassNone
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • UI Automation Workflows

    conorluddy/xclaude-plugin

    Accessibility-first UI automation using IDB. An agent skill from conorluddy/xclaude-plugin.

    183 GitHub stars~2.2k tokensUpdated 26 days ago
    Frontend & DesignAuto-check passed
  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.1k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • Swiftui UI Patterns

    AFK-surf/OpenBridge

    Best practices and example-driven guidance for building SwiftUI views and components.

    430 GitHub starsUsed in 4 repos~887 tokens
    MobileAuto-check passed
  • Swiftui Performance Audit

    harperreed/dotfiles

    Audit and improve SwiftUI runtime performance from code review and architecture.

    334 GitHub starsUsed in 8 repos~1.4k tokens
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

    143 GitHub starsUsed in 5 repos~1.3k tokens
    MobileAuto-check passed

More from kattouf/Sake

All 8 skills in this repo
  • Sake CI Release

    kattouf/Sake

    A skill your agent uses when working on CI workflows, GitHub Actions, release process, changelog generation (git-cliff), or dependabot configuration.

    116 GitHub stars~731 tokensUpdated 6 mo ago
    Auto-check passed
  • A skill your agent uses when writing or modifying Sake commands, CommandGroups, SakeApp files, or SakeApp/ directory code.

    116 GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • Sake Config System

    kattouf/Sake

    A skill your agent uses when working on Sake configuration — .sake.yml, environment variables, CLI options, ConfigManager, ConfigResolver, or adding new config options.

    116 GitHub stars~687 tokensUpdated 6 mo ago
    Auto-check passed
  • Sake Docs

    kattouf/Sake

    A skill your agent uses when writing or updating Sake documentation — VitePress site structure, existing pages, how to add new docs, documentation conventions.

    116 GitHub stars~778 tokensUpdated 6 mo ago
    Auto-check passed
  • A skill your agent uses when modifying the @CommandGroup macro in SakeMacros target — SwiftSyntax ExtensionMacro, code generation patterns, testing with assertMacroExpansion.

    116 GitHub stars~844 tokensUpdated 6 mo ago
    Auto-check passed
  • Sake Testing

    kattouf/Sake

    A skill your agent uses when writing or running tests for the Sake project — unit tests, macro expansion tests, integration tests, test helpers, and CI test commands.

    116 GitHub stars~743 tokensUpdated 6 mo ago
    Auto-check passed

Works with

Categories

Questions about Sake CLI Architecture

What does Sake CLI Architecture do?

A skill your agent uses when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution. Sake CLI Architecture is an agent skill from kattouf/Sake. Use when working on SakeCLI or SakeCLILibrary targets — CLI entry point, config resolution, SakeAppManager build/run lifecycle, error handling, shell execution.

When should I use Sake CLI Architecture?

Sake CLI Architecture fits situations like: working on SakeCLI; sakeCLILibrary targets — CLI entry point; config resolution; sakeAppManager build/run lifecycle.

How do I install Sake CLI Architecture in Claude Code?

Run `npx skills add kattouf/Sake --skill sake-cli-architecture -a claude-code`. Or copy the skill folder (.claude/skills/sake-cli-architecture in kattouf/Sake) into .claude/skills/sake-cli-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Sake CLI Architecture in Codex?

Run `npx skills add kattouf/Sake --skill sake-cli-architecture -a codex`. Or copy the skill folder (.claude/skills/sake-cli-architecture in kattouf/Sake) into .agents/skills/sake-cli-architecture in your project. Codex loads it when a task matches its description.

Can I use Sake CLI Architecture 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 kattouf/Sake --skill sake-cli-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sake-cli-architecture, .gemini/skills/sake-cli-architecture, .github/skills/sake-cli-architecture and .opencode/skills/sake-cli-architecture in your project.

What does Sake CLI Architecture need to run?

Going by SKILL.md and its folder, Sake CLI Architecture needs the command-line tools its instructions call (swift).

Does Sake CLI Architecture 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 Sake CLI Architecture 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 Sake CLI Architecture use?

Sake CLI Architecture 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 Sake CLI Architecture use?

About 1.1k tokens (SKILL.md is roughly 4.5k 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 Sake CLI Architecture?

Skills that share tags, products or a category with Sake CLI Architecture: UI Automation Workflows (conorluddy/xclaude-plugin, 183 stars), Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.1k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars) and Swiftui Performance Audit (harperreed/dotfiles, 334 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sake CLI Architecture?

kattouf (a GitHub user) maintains it in kattouf/Sake, which has 116 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on April 5, 2026.

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