cli-guidelines
This skill should be used when the user asks to "build a CLI tool", "create command-line interface", "CLI best practices", "clig.dev guidelines", "help text patterns", "CLI arguments", "CLI error messages", "CLI output formatting", "human-first design", "CLI interactivity", "exit codes", "CLI configuration", "environment variables", or mentions building user-facing Nushell scripts, commands, or tools that should follow professional CLI design principles.
What this skill does
# CLI Guidelines for Nushell
Comprehensive reference for building excellent command-line interfaces in Nushell, based on [clig.dev](https://clig.dev) principles and adapted for Nushell's structured data paradigm. Great CLIs are not just functional - they are empathetic, discoverable, consistent, and robust.
## Why CLI Guidelines Matter
Command-line interfaces are often the primary way developers and power users interact with tools. A well-designed CLI:
- **Reduces cognitive load** - Users can focus on their tasks, not fighting the tool
- **Builds trust** - Consistent, predictable behavior creates confidence
- **Enables automation** - Scripts and pipelines work reliably
- **Scales knowledge** - Learning one well-designed CLI transfers to others
## Core Philosophy from clig.dev
The eight principles that guide excellent CLI design:
### 1. Human-First Design
**Humans come first, machines second.** Optimize for human understanding by default.
```nushell
# Human-friendly: structured output Nushell displays beautifully
def "files analyze" [path: path = "."] -> table {
ls $path
| where type == "file"
| select name size modified
| sort-by size --reverse
| first 10
}
# Machine-readable when needed: one pipe away
# files analyze | to json
# files analyze | to csv
```
**Nushell advantage:** Tables and records are both human-readable AND machine-parseable. No need to choose.
### 2. Simple Parts That Work Together
**Do one thing well.** Build small, focused commands that compose via pipelines.
```nushell
# GOOD: Single responsibility, composable
export def "git branches-merged" [] {
git branch --merged
| lines
| where $it !~ '\*'
| str trim
}
# Can be composed: git branches-merged | each { git branch -d $in }
# BAD: Trying to do too much
export def "git-cleanup-everything" [] {
# Fetches, prunes, deletes merged, deletes stale, garbage collects...
# Violates single responsibility
}
```
### 3. Consistency Across Programs
**Users build mental models. Respect them.** Use standard flag names and behaviors.
| Short | Long | Purpose |
|-------|------|---------|
| `-h` | `--help` | Show help text |
| `-v` | `--verbose` | More detailed output |
| `-q` | `--quiet` | Suppress non-error output |
| `-f` | `--force` | Skip confirmations |
| `-n` | `--dry-run` | Preview without changes |
| `-o` | `--output` | Output file or destination |
| `-r` | `--recursive` | Include subdirectories |
```nushell
# Consistent across your entire toolset
export def "backup create" [
source: path
destination: path
--verbose (-v)
--quiet (-q)
--force (-f)
--recursive (-r)
--dry-run (-n)
] {
# Users learn once, apply everywhere
}
```
### 4. Saying Just Enough
**Balance silence and verbosity.** Default to useful information, not noise.
```nushell
# Default: Essential information only
export def "deploy status" [--verbose (-v)] {
let status = get-deployment-status
if $verbose {
# Full details when requested
$status | table --expand
} else {
# Concise default
print $"Status: ($status.state) | Uptime: ($status.uptime)"
}
}
# Silent success for scripts
export def "cache clear" [--quiet (-q)] {
rm -rf ~/.cache/myapp
if not $quiet {
print "Cache cleared successfully"
}
}
```
### 5. Ease of Discovery
**Users should learn your CLI by using it.** Make help accessible and thorough.
```nushell
# Nushell's def comments become built-in help
# Run: help task add
# Add a new task to the task list
#
# Creates a task with the given title and optional metadata.
# Tasks are stored in ~/.local/share/tasks/tasks.nuon
#
# Examples:
# task add "Fix bug in parser"
# task add "Review PR" --priority 5 --due 2024-03-15
# task add "Weekly meeting" --tags ["recurring", "team"]
export def "task add" [
title: string # The task title (required)
--priority (-p): int # Priority level 1-5 (default: 3)
--due (-d): datetime # Due date in any parseable format
--tags (-t): list<string> # Tags for categorization
] {
# Implementation
}
# Typing `task` alone shows available subcommands
export def "task" [] {
print "Task management commands:"
print ""
print " task add - Create a new task"
print " task list - Show all tasks"
print " task complete - Mark task as done"
print " task delete - Remove a task"
print ""
print "Run 'help task <command>' for details"
}
```
### 6. Conversation as the Norm
**Treat CLI interaction as a dialogue.** Confirm destructive actions and show progress.
```nushell
# Confirmation for destructive actions
export def "data purge" [
--force (-f) # Skip confirmation
--dry-run (-n) # Show what would be deleted
] {
let items = (ls data/ | length)
if $dry_run {
print $"Would delete ($items) items"
return
}
if not $force {
let confirm = input $"Delete ($items) items? This cannot be undone. [y/N] "
if ($confirm | str downcase) != "y" {
print "Aborted."
return
}
}
rm -rf data/*
print $"Deleted ($items) items"
}
# Progress for long operations
export def "sync remote" [--verbose (-v)] {
let files = (ls -r src/ | where type == "file")
let total = ($files | length)
$files | enumerate | each { |item|
if $verbose {
print -e $"Syncing [($item.index + 1)/($total)]: ($item.item.name)"
}
upload-file $item.item.name
}
print $"Synced ($total) files"
}
```
### 7. Robustness
**Handle edge cases gracefully. Fail fast with clear messages.**
```nushell
export def "file process" [path: path] {
# Validate early with helpful messages
if not ($path | path exists) {
error make {
msg: $"File not found: ($path)"
help: "Check the path and try again. Use 'ls' to see available files."
}
}
if ($path | path type) != "file" {
error make {
msg: $"Expected a file, got: ($path | path type)"
help: "Use --recursive for directories"
}
}
# Wrap risky operations
try {
open $path | process-contents
} catch { |err|
error make {
msg: $"Failed to process ($path)"
help: $"File may be corrupted or unsupported format.\nOriginal: ($err.msg)"
}
}
}
```
### 8. Empathy
**Remember: users are often stressed, debugging, or learning.** Be helpful.
```nushell
# Helpful error messages with actionable suggestions
export def "config validate" [path: path = "config.toml"] {
if not ($path | path exists) {
print $"(ansi red)Error:(ansi reset) Config file not found: ($path)"
print ""
print "To create a default config:"
print $" (ansi cyan)config init(ansi reset)"
print ""
print "Or specify a different path:"
print $" (ansi cyan)config validate /path/to/config.toml(ansi reset)"
exit 1
}
# Validate with specific fix suggestions
let errors = validate-config $path
if ($errors | length) > 0 {
print $"(ansi yellow)Found ($errors | length) issue(s):(ansi reset)"
$errors | each { |e|
print $" Line ($e.line): ($e.message)"
if ($e.suggestion | is-not-empty) {
print $" (ansi dim)Fix: ($e.suggestion)(ansi reset)"
}
}
}
}
```
## Nushell's Natural Advantages
Nushell inherently supports many CLI guidelines through its design:
| CLI Guideline | Nushell Feature |
|---------------|-----------------|
| Structured output | Tables, records, lists - native data types |
| Type safety | Built-in type system validates input |
| Self-documenting | `def` comments become `help` output |
| Error handling | `try`/`catch` with rich error messages |
| Composability | Pipeline-native, structured data flows |
| Discoverability | Tab completion, `help` sRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.