Agent skill

Aspens CLI Shell

by aspenkit in aspenkit/aspens

Project context for the aspens CLI entry point: Commander wiring, the welcome screen, missing-hook warnings, CliError exit handling and the public programmatic exports.

MITAuto-check passedDevelopment

Install Aspens CLI Shell

skills CLI
$ npx skills add aspenkit/aspens --skill cli-shell -a claude-code

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

GitHub CLI
$ gh skill install aspenkit/aspens cli-shell --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/aspenkit/aspens.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cli-shell .claude/skills/cli-shell && 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
cli-shell
GitHub stars
102
Token cost
~1.1k tokens
SKILL.md length
461 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Project context for the aspens CLI entry point: Commander wiring, the welcome screen, missing-hook warnings, CliError exit handling and the public programmatic exports.

  • Adding a new aspens subcommand and updating the welcome screen
  • SKILL.md covers Domain purpose, Business rules / invariants, Non-obvious behaviors and Critical files, plus 1 more section
  • Calls claude and codex
  • Changing how the CLI reports errors or sets exit codes

What it does

The skill briefs an agent working on the layer users actually invoke as aspens and that programmatic consumers import through src/index.js. This layer only parses arguments, routes to handlers in src/commands, and handles top-level errors and the welcome screen, while the real work lives elsewhere. Handlers must throw CliError instead of calling process.exit, and the top-level handler prints the message in red and exits with the error's exit code, which defaults to 1.

Other invariants listed: a logged flag means the message was already shown, so the process exits silently; checkMissingHooks warns without throwing before doc sync, add and customize when .claude/skills exists but the activation hook or skill-rules.json is missing; running with no command shows a welcome screen that has to be updated whenever a subcommand is added; the version is read from package.json with a 0.0.0 fallback; numeric option parsers throw Commander's InvalidArgumentError; and SIGINT and SIGTERM exit with codes 130 and 143.

When your agent uses it

  • Adding a new aspens subcommand and updating the welcome screen
  • Changing how the CLI reports errors or sets exit codes
  • Editing the missing-hook warning behavior
  • Changing what src/index.js exports for programmatic use

Example prompts

  • “Add a new subcommand to the aspens CLI and make sure the welcome screen lists it.”
  • “This handler calls process.exit, so change it to throw CliError with the right exit code.”
  • “Why does the CLI warn about missing hooks before doc sync, and when is that warning skipped?”
  • “Add a numeric option that rejects zero and negative values the way the other parsers do.”

Requirements

  • A checkout of the aspens repository

What it can do on your machine

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

    • claude
    • codex

    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

Aspens CLI Shell loads about 1.1k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
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 aspenkit/aspens at commit 8dde826, republished under its MIT licence (© aspenkit). 461 words, ~1,056 tokens.

Download SKILL.mdSave it as .claude/skills/cli-shell/SKILL.md (or your agent's skills folder).
name
cli-shell
description
Top-level Commander wiring, welcome screen, missing-hook warning, CliError exit handling, and the public programmatic API surface
triggers.files
bin/cli.js, src/index.js, src/lib/errors.js
triggers.keywords
CliError, commander, bin/cli.js, welcome, checkMissingHooks, parsePositiveInt, parseTimeout, SIGINT, SIGTERM, aspens public api

You are working on the CLI shell — the entry point that wires Commander subcommands, prints the welcome screen, warns about missing Claude hooks, dispatches to handlers, and translates CliError into a clean exit. Also the public programmatic surface re-exported from src/index.js.

Domain purpose

This layer is what a user actually invokes (aspens …) and what programmatic consumers import. It owns argument parsing, top-level error handling, and the welcome UX. All real work lives in src/commands/*.js — the shell only routes.

Business rules / invariants

  • Handlers must throw CliError, never call process.exit(). The top-level handler in bin/cli.js:250 catches it, prints Error: <message> (unless logged: true) in red, and exits with err.exitCode (default 1). Plain Error falls through to the same printer but always exits 1.
  • logged: true means "I already printed a user-friendly message" — top level then exits silently with the given code. Use it when the handler rendered a clack outro or multi-line failure already.
  • checkMissingHooks(repoPath) runs before doc sync, add, and customize — warns (does not throw) when .claude/skills/ exists but .claude/hooks/skill-activation-prompt.sh or .claude/skills/skill-rules.json is absent. Skipped entirely when .claude/skills/ is missing (nothing to activate).
  • No-command invocation shows showWelcome() — listing essential commands, generate/sync, Claude add-ons, utilities, options, typical workflow, and target notes. Adding a new subcommand requires updating this screen too.
  • Template counts in the welcome are filesystem-derived — countTemplates(subdir) reads src/templates/{agents,commands,hooks} and filters dotfiles; returns '?' on read failure (never throws).
  • Version comes from package.json at runtime via readFileSync; falls back to '0.0.0' silently if parse/read fails. Do not hardcode.
  • Numeric option parsers throw InvalidArgumentError (Commander-native) — parsePositiveInt rejects ≤0/NaN; parseCommits additionally caps at 50.
  • Signal handlers exit with conventional codes — SIGINT→130, SIGTERM→143. Used to clean up spawned claude -p / codex exec children.
Show full SKILL.md (183 more words)Show less

Non-obvious behaviors

  • Action wrappers chain checkMissingHooks before the handler for doc sync, add, customize — done inline via arrow (args, options) => { checkMissingHooks(resolve(path)); return handler(...) }. Don't move this into the handler — the warning should fire even if the handler later fails or short-circuits.
  • program.parseAsync() is required (not .parse()) — handlers are async; .catch() on the returned promise is the only place plain errors are surfaced.
  • src/index.js is the public programmatic API — only re-exports scanRepo, runClaude, loadPrompt, parseFileOutput, writeSkillFiles, buildContext, buildBaseContext, buildDomainContext, analyzeImpact. Adding/removing a re-export is a breaking change for embedders; treat it as such.

Critical files

  • bin/cli.js — Commander setup, option parsers, welcome screen, signal handlers, top-level CliError catch.
  • src/lib/errors.js — CliError class with exitCode and logged options (plus optional cause).
  • src/index.js — Stable programmatic surface for library consumers.

Critical Rules

  • New subcommand → register on program (or the doc subgroup) and add it to showWelcome() so users discover it.
  • Never swallow a handler error in the action wrapper — let it bubble to program.parseAsync().catch().
  • When a handler renders its own failure UX (clack/picocolors), throw new CliError(msg, { logged: true, exitCode }) so the top level does not double-print.

Last Updated: 2026-05-11

© aspenkit, 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 .agents/skills/cli-shell of aspenkit/aspens.

Open the folder on GitHubat commit 8dde826

Compare with similar skills

Aspens CLI Shell 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.

Aspens CLI Shell compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Aspens CLI Shell this skillaspenkit/aspens102—~1.1kAutomated safety check: PassMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything85k1 repos~1.2kAutomated safety check: PassMIT
Mole Bug Patternstw93/Mole69k—~2kAutomated safety check: PassGPL-3.0
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Understand ExplainEgonex-AI/Understand-Anything85k1 repos~1.3kAutomated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    85k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    69k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    85k GitHub starsUsed in 1 repo~1.3k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed

More from aspenkit/aspens

All 12 skills in this repo
  • Injects a project's own skills and AGENTS.md content into generic bundled agent template files, adding a tech-stack line and real conventions without touching an agent's core logic.

    102 GitHub stars~898 tokensUpdated 25 days ago
    Auto-check passed
  • Orientation to the aspens codebase for agents working on the CLI itself: its Node.js stack, commands, module layout and debug settings.

    102 GitHub stars~1.6k tokensUpdated 25 days ago
    Auto-check passed
  • Explains how the aspens generator routes output to Claude Code or Codex CLI targets and transforms generated skills and instruction files between their formats.

    102 GitHub stars~1.9k tokensUpdated 25 days ago
    Auto-check passed
  • Doc Impact

    aspenkit/aspens

    Context health analysis — freshness, domain coverage, hub surfacing, drift detection, LLM-powered interpretation, and auto-repair for generated agent context

    102 GitHub stars~1.3k tokensUpdated 25 days ago
    Auto-check passed
  • Doc Sync

    aspenkit/aspens

    Incremental skill updater that maps git diffs to affected skills and optionally auto-syncs via a post-commit hook

    102 GitHub stars~1.8k tokensUpdated 25 days ago
    Auto-check passed
  • Import Graph

    aspenkit/aspens

    Static import analysis that builds dependency graphs, domain clusters, hub files, git churn hotspots, and file priority rankings

    102 GitHub stars~1.1k tokensUpdated 25 days ago
    Auto-check passed

Categories

Questions about Aspens CLI Shell

What does Aspens CLI Shell do?

Project context for the aspens CLI entry point: Commander wiring, the welcome screen, missing-hook warnings, CliError exit handling and the public programmatic exports. js. This layer only parses arguments, routes to handlers in src/commands, and handles top-level errors and the welcome screen, while the real work lives elsewhere.

When should I use Aspens CLI Shell?

Aspens CLI Shell fits situations like: adding a new aspens subcommand and updating the welcome screen; changing how the CLI reports errors or sets exit codes; editing the missing-hook warning behavior; changing what src/index.js exports for programmatic use.

How do I install Aspens CLI Shell in Claude Code?

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

How do I install Aspens CLI Shell in Codex?

Run `npx skills add aspenkit/aspens --skill cli-shell -a codex`. Or copy the skill folder (.agents/skills/cli-shell in aspenkit/aspens) into .agents/skills/cli-shell in your project. Codex loads it when a task matches its description.

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

What does Aspens CLI Shell need to run?

Going by SKILL.md and its folder, Aspens CLI Shell needs the command-line tools its instructions call (claude and codex). Our summary lists: A checkout of the aspens repository.

Does Aspens CLI Shell 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 Aspens CLI Shell 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 Aspens CLI Shell use?

Aspens CLI Shell 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 Aspens CLI Shell use?

About 1.1k tokens (SKILL.md is roughly 4.2k 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 Aspens CLI Shell?

Skills that share tags, products or a category with Aspens CLI Shell: Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 85k stars), Mole Bug Patterns (tw93/Mole, 69k stars), Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars) and Understand Explain (Egonex-AI/Understand-Anything, 85k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Aspens CLI Shell?

aspenkit (a GitHub organization) maintains it in aspenkit/aspens, which has 102 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 12, 2026.

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