Cli Shell logo

Cli Shell

Organization
aspenkit
cli-shell

Top-level Commander wiring, welcome screen, missing-hook warning, CliError exit handling, and the public programmatic API surface

Overview

Publisheraspenkit
Repositoryaspens
Skill namecli-shell
Stars
102
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aspenkit on GitHub. Read the source before you install it.

Installation

Install the Cli Shell AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aspenkit/aspens/tree/main/.agents/skills/cli-shell
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aspenkit/aspens.git /tmp/aspens
mkdir -p .claude/skills
cp -r /tmp/aspens/.agents/skills/cli-shell .claude/skills/cli-shell
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cli Shell in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cli Shell on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cli Shell is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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

Frequently asked questions

What does the Cli Shell AI skill do?

Top-level Commander wiring, welcome screen, missing-hook warning, CliError exit handling, and the public programmatic API surface

Why use Cli Shell on TypingMind?

Because you install it once and use it with any model. Cli Shell is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cli Shell in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aspenkit/aspens/tree/main/.agents/skills/cli-shell. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cli Shell?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cli Shell?

As many as you like. As long as a model supports skills, you can use Cli Shell with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cli Shell AI skill free?

Yes. It is published on GitHub by aspenkit under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇