Agent skill

Add CLI Command

by lbedner in lbedner/aegis-stack

A skill your agent uses when adding a command to the aegis tool CLI (the framework's own aegis ...

MITAuto-check passedFrontend & Design

Install Add CLI Command

skills CLI
$ npx skills add lbedner/aegis-stack --skill add-cli-command -a claude-code

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

GitHub CLI
$ gh skill install lbedner/aegis-stack add-cli-command --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/lbedner/aegis-stack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-cli-command .claude/skills/add-cli-command && 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
add-cli-command
GitHub stars
143
Token cost
~2.4k tokens
SKILL.md length
1,163 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when adding a command to the aegis tool CLI (the framework's own aegis ...

  • Works in 9 steps: Write the failing test first:… → Add aegis/commands/.py with… → Register it in aegis/main.py: import the… → …
  • Adding a command to the aegis tool CLI (the frameworks own aegis ..
  • SKILL.md covers When to use, Files that change, Procedure and Gates, plus 1 more section
  • Calls make and python

What it does

Add CLI Command is an agent skill from lbedner/aegis-stack. Use when adding a command to the aegis tool CLI (the framework's own aegis ... entry point, not a generated project's CLI). Covers Typer registration, the sync-plus-asyncio.run rule, brand help theming, i18n strings, optional guided/interactive wiring, tests, and the CLI reference doc that must change together.

Its SKILL.md is about 2.4k 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 Frontend & Design, covering Theming and dark mode, Project scaffolding and Internationalization. It works with FastAPI. The repository describes itself as: A production-ready FastAPI platform with modular components and a built-in control plane. The licence is MIT.

When your agent uses it

  • Adding a command to the aegis tool CLI (the frameworks own aegis ..
  • Tasks that involve Theming and dark mode
  • Tasks that involve Project scaffolding

Example prompts

  • “s own aegis ... entry point, not a generated project”
  • “/add-cli-command”

Requirements

  • Python 3

Workflow steps

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

  1. Write the failing test first: tests/cli/test__command.py (or a
  2. Add aegis/commands/.py with _command(...) -> None. Keep
  3. Register it in aegis/main.py: import the function, add
  4. Add the command's i18n keys to aegis/i18n/locales/en.py (help strings
  5. Use brand.success/warn/error/accent/muted for all status output; never
  6. If the command takes project-shaping options, wire the guided/interactive
  7. Add or extend the test coverage in tests/cli/ from step 1, including an
  8. Add the ### aegis section to docs/cli-reference.md.
  9. Run the gates below and fix anything red.

What it can do on your machine

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

    • make
    • python

    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

Add CLI Command loads about 2.4k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 1,163 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
~2.4k

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 lbedner/aegis-stack at commit c8cbfad, republished under its MIT licence (© lbedner). 1,163 words, ~2,396 tokens.

Download SKILL.mdSave it as .claude/skills/add-cli-command/SKILL.md (or your agent's skills folder).
name
add-cli-command
description
Use when adding a command to the aegis tool CLI (the framework's own `aegis ...` entry point, not a generated project's CLI). Covers Typer registration, the sync-plus-asyncio.run rule, brand help theming, i18n strings, optional guided/interactive wiring, tests, and the CLI reference doc that must change together.

Add CLI command

Adds a new top-level command to the aegis tool's own CLI (aegis <command>), as opposed to a command inside a generated project. Traced from aegis/commands/update.py and its registration in aegis/__main__.py.

When to use

Use when the task is "add a new aegis <command>" to the framework's own CLI surface (the tool that generates and updates projects).

Do NOT use for adding a subcommand to a generated project's CLI (app/cli/*.py.jinja in the template tree) - that is template work with its own conventions, not this skill. Do NOT use for adding a component or service (aegis add <component> / aegis add-service <name>); those already have dedicated commands and belong to the add-component / add-service skills. Do NOT use for a plugin-provided CLI sub-app mounted via aegis/core/plugins/discovery.py; that is a separate, plugin-owned registration path.

Files that change

Command implementation and registration:

  • aegis/commands/<name>.py: the command function, e.g. <name>_command (see update_command in aegis/commands/update.py for the shape: Typer options via typer.Option(...), lazy_t(...) for help strings, t(...) for runtime messages, brand.success/warn/error for status lines).
  • aegis/__main__.py: import the command function and register it with the module-level Typer app. The exact registration point is the block of app.command(name="...")(...) calls after app.add_typer(plugins_app, name="plugins") - add app.command(name="<name>")(<name>_command) there, next to the existing entries (update, deploy-init, ingress-enable, and so on). This is the single place a new command becomes reachable as aegis <name>.

Help/UX theming (no new files, just correct usage):

  • aegis/cli/brand.py is the single source of the CLI palette: AEGIS_TEAL (#17CCBF, typeable tokens and success state), AEGIS_WARNING (#F5A623, amber), AEGIS_ERROR (#E23E3E, red). Call sites never hardcode colors; they call brand.success(...), brand.warn(...), brand.error(...), brand.accent(...), brand.muted(...) (or the _text variants for inline composition) to express intent. brand.apply_help_theme() themes Typer's rich --help rendering globally (teal for command names and flags, dim for metavars/env-var hints, neutral for prose); it runs once at CLI startup and needs no per-command change.

Strings (i18n):

  • All user-facing text goes through i18n keys in aegis/i18n/locales/en.py (the real English string), with the same key stubbed into every other locale file for parity. Use lazy_t("<name>.help_opt_...") for Typer help= strings (lazy because locale isn't resolved until the --lang callback runs) and t("<name>....") for runtime echo strings. Follow the <command>.<thing> naming already used by update.* and common.* (for example common.help_yes, common.help_project_path_full for options shared across commands). See the i18n skill for the full add-a-key procedure and locale list; do not attempt real (non-English) translation in the same change.

Init-style options (only if the new command takes project-shaping options, the way init/add/add-service do):

  • aegis/cli/guided.py: add a choose_<thing>(...) method on the guided-setup UI class if the command should offer a guided prompt step, following the existing choose_worker_backend() / choose_database_engine() pattern (a list of _Choice(value, label, description) fed to self._select(...), i18n-backed via _g(...)).
  • aegis/cli/interactive.py: add an interactive_<name>_selection(...) / interactive_<name>_config(...) function if the command needs a non-guided interactive prompt fallback, following interactive_component_add_selection / interactive_ai_service_config.
  • aegis/cli/validators.py: input validation for CLI-supplied values (project names, component/service name lists) - add a validate_<thing>(...) here if the new option needs syntactic validation, following validate_project_name.
  • aegis/cli/validation.py: shared cross-command checks that are not raw input validation, such as validate_copier_project(target_path, command_name) (confirms the target is a Copier-generated project before proceeding). Call this if the new command operates on an existing project directory, mirroring how update_command and others gate on it.
  • Most new commands (a status check, a report, a one-shot action) need none of this; skip the whole section if the command takes no project-shaping options.

Tests:

  • tests/cli/test_<name>_command.py (or add to an existing file if the command is small): typer.testing.CliRunner against aegis.__main__.app (see tests/cli/test_utils.py for CLI_RUNNER, timeouts, and run_aegis_command / run_cli_help_command helpers). Cover --help text, success path, and error path.
  • tests/cli/test_cli_basic.py: add a test_<name>_help case asserting the command's help text and options appear, following test_init_help.

Docs:

  • docs/cli-reference.md: add a ### aegis <name> section in command order (matches the registration order in aegis/__main__.py), with a **Usage:** code block and an **Example Output:** block, following the existing ### aegis update / ### aegis services sections. No mkdocs.yml nav change is needed; this page is already wired under Reference: CLI Reference.
Show full SKILL.md (510 more words)Show less

Procedure

  1. Write the failing test first: tests/cli/test_<name>_command.py (or a case in test_cli_basic.py) asserting aegis <name> --help exits 0 and shows the expected help text. Confirm it fails because the command doesn't exist yet.
  2. Add aegis/commands/<name>.py with <name>_command(...) -> None. Keep it a plain sync def; if it needs to await anything, call asyncio.run(...) inside the function body (see Pitfalls - Typer has no native async command support).
  3. Register it in aegis/__main__.py: import the function, add app.command(name="<name>")(<name>_command) next to the existing app.command(...) calls.
  4. Add the command's i18n keys to aegis/i18n/locales/en.py (help strings via lazy_t, runtime strings via t), then stub the same keys into every other locale file for parity (see the i18n skill).
  5. Use brand.success/warn/error/accent/muted for all status output; never call typer.secho with a raw color inline.
  6. If the command takes project-shaping options, wire the guided/interactive flows (aegis/cli/guided.py, aegis/cli/interactive.py) and validation (aegis/cli/validators.py for input shape, aegis/cli/validation.py for shared project-state checks like validate_copier_project). Skip this step for options-free or simple-flag commands.
  7. Add or extend the test coverage in tests/cli/ from step 1, including an error-path case.
  8. Add the ### aegis <name> section to docs/cli-reference.md.
  9. Run the gates below and fix anything red.

Gates

  • make check (lint, typecheck, test) must pass.
  • A command that touches aegis init or project generation also needs make test-stacks: make check no longer generates the stack matrix (CI does, in its generation jobs).
  • make cli-test for a manual smoke: runs python -m aegis --help and confirms the CLI still loads with the new command registered.

Pitfalls

  • Typer has no native async command support in any version: a command function must be a sync def. If it needs async work, call asyncio.run(...) from inside the sync function body rather than trying to declare the command itself async def - Typer will not await it.
  • Forgetting the app.command(name="...")(...) line in aegis/__main__.py leaves the command fully implemented but unreachable; aegis <name> --help fails with "no such command" even though aegis/commands/<name>.py imports and type-checks cleanly.
  • Don't hardcode a color (typer.secho(msg, fg="red")) at a call site; use brand.error/brand.warn/brand.success so the palette stays defined in exactly one place (aegis/cli/brand.py) and stays in sync with the generated frontend's theme.
  • Adding a key to en.py only fails tests/core/test_i18n.py, which requires the same key in every other locale file; stub the key everywhere in the same change and leave real translation to the separate translator-reviewed pass (see the i18n skill).
  • lazy_t(...) is for help= strings evaluated before the --lang option is resolved (Typer short-circuits its main callback on --help); using plain t(...) for a help string can render against the wrong locale on a fresh process. Use t(...) for anything echoed at runtime, after the callback has already set the locale.
  • A command that takes a --project-path and operates on an existing project should call validate_copier_project (or the equivalent check) before doing any work, the way update_command does immediately after resolving the target path - skipping it lets the command run against a directory that was never generated by Copier and fail with a confusing downstream error instead of a clear one.

© lbedner, 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/add-cli-command of lbedner/aegis-stack.

Open the folder on GitHubat commit c8cbfad

Compare with similar skills

Add CLI Command 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.

Add CLI Command compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add CLI Command this skilllbedner/aegis-stack143—~2.4kAutomated safety check: PassMIT
Kmp Starter Resources ThemeDevAtrii/Kmp-Starter-Template167—~587Automated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Create Docsvictorgarciaesgi/nuxt-typed-router4132 repos~2.8kAutomated safety check: PassMIT
Igniteui Angular ComponentsIgniteUI/igniteui-angular599—~1.7kAutomated safety check: PassMIT
Dotnet UInovotnyllc/dotnet-artisan233—~1.3kAutomated safety check: PassMIT

Similar skills

  • Kmp Starter Resources Theme

    DevAtrii/Kmp-Starter-Template

    Resources and theming on the KMP Starter Template — centralized resources module, string externalization, localization, theme via ThemeDataStore, and colors/typography.

    167 GitHub stars~587 tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Create Docs

    victorgarciaesgi/nuxt-typed-router

    Create complete documentation sites for projects. An agent skill from victorgarciaesgi/nuxt-typed-router.

    413 GitHub starsUsed in 2 repos~2.8k tokens
    Frontend & DesignAuto-check passed
  • Igniteui Angular Components

    IgniteUI/igniteui-angular

    Covers all non-grid Ignite UI for Angular UI components: application scaffolding and setup, form controls (inputs, combos, selects, date/time pickers, calendar, checkbox, radio, switch, slider)…

    599 GitHub stars~1.7k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Dotnet UI

    novotnyllc/dotnet-artisan

    Builds .NET UI apps across Blazor (Server, WASM, Hybrid, Auto), MAUI (XAML, MVVM, Shell, Native AOT), Uno Platform (MVUX, Extensions, Toolkit), WPF (.NET 8+, Fluent theme), WinUI 3 (Windows App SDK…

    233 GitHub stars~1.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Theming Components

    ancoleman/ai-design-components

    Provides design token system and theming framework for consistent, customizable UI styling across all components.

    526 GitHub stars~2.3k tokensUpdated 10 mo ago
    Frontend & DesignAuto-check passed

More from lbedner/aegis-stack

All 9 skills in this repo
  • Release

    lbedner/aegis-stack

    A skill your agent uses when cutting a release of the aegis-stack package.

    143 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Template Dev

    lbedner/aegis-stack

    A skill your agent uses when developing or modifying Copier templates in aegis/templates, or backporting a change from a generated project (e.g.

    143 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Create Plugin

    lbedner/aegis-stack

    A skill your agent uses when building an Aegis Stack plugin, a separate package (aegis-stack-<name) that renders files into a project through aegis add <name.

    143 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Execute Issue

    lbedner/aegis-stack

    A skill your agent uses when handed a GitHub issue (number or URL) to execute end to end.

    143 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • I18n

    lbedner/aegis-stack

    A skill your agent uses when a code or template change introduces a new translation message key, in either the framework CLI (aegis/i18n/locales/) or a generated project's CLI (the app/i18n/locales/…

    143 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Squash Branch

    lbedner/aegis-stack

    A skill your agent uses when collapsing a feature branch into a single commit before opening or merging a PR.

    143 GitHub stars~660 tokensUpdated today
    Auto-check passed

Works with

Questions about Add CLI Command

What does Add CLI Command do?

A skill your agent uses when adding a command to the aegis tool CLI (the framework's own aegis ... Add CLI Command is an agent skill from lbedner/aegis-stack. Use when adding a command to the aegis tool CLI (the framework's own aegis ...

When should I use Add CLI Command?

Add CLI Command fits situations like: adding a command to the aegis tool CLI (the frameworks own aegis .; tasks that involve Theming and dark mode; tasks that involve Project scaffolding.

How do I install Add CLI Command in Claude Code?

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

How do I install Add CLI Command in Codex?

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

Can I use Add CLI Command 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 lbedner/aegis-stack --skill add-cli-command -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-cli-command, .gemini/skills/add-cli-command, .github/skills/add-cli-command and .opencode/skills/add-cli-command in your project.

What does Add CLI Command need to run?

Going by SKILL.md and its folder, Add CLI Command needs the command-line tools its instructions call (make and python). Our summary lists: Python 3.

Does Add CLI Command 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 Add CLI Command 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 Add CLI Command use?

Add CLI Command 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 Add CLI Command use?

About 2.4k tokens (SKILL.md is roughly 9.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 Add CLI Command?

Skills that share tags, products or a category with Add CLI Command: Kmp Starter Resources Theme (DevAtrii/Kmp-Starter-Template, 167 stars), Impeccable (bestofjs/bestofjs, 3.1k stars), Create Docs (victorgarciaesgi/nuxt-typed-router, 413 stars) and Igniteui Angular Components (IgniteUI/igniteui-angular, 599 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add CLI Command?

lbedner (a GitHub user) maintains it in lbedner/aegis-stack, which has 143 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

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