Skip to content

a5c-ai/babysitter / library/specializations/cli-mcp-development/skills/clap-scaffolder

clap-scaffolder

Verified

Generate Clap-based Rust CLI applications with derive macros, subcommands, and modern Rust patterns. Creates production-ready Rust CLI with proper cargo structure.

FileKindSize
README.mdmarkdown2.0 KB
SKILL.mdskill md6.1 KB
# Clap Scaffolder Skill

Generate production-ready Clap Rust CLI applications with derive macros, type-safe arguments, and fast native binaries.

## Overview

This skill automates the creation of CLI applications using Clap, the most popular Rust CLI framework. It generates a complete project structure with derive macro-based command definitions, error handling, and shell completions.

## When to Use

- Starting a new Rust CLI project
- Need type-safe argument parsing
- Want fast, native cross-platform binaries
- Require compile-time argument validation

## Quick Start

### Basic Usage

```json
{
  "projectName": "my-cli",
  "description": "A fast CLI tool"
}
```

### With Commands

```json
{
  "projectName": "build-tool",
  "description": "Build automation tool",
  "commands": [
    {
      "name": "build",
      "description": "Build the project",
      "options": [
        { "long": "release", "short": "r", "help": "Build in release mode" },
        { "long": "target", "value_name": "TARGET", "help": "Target platform" }
      ]
    },
    {
      "name": "test",
      "description": "Run tests",
      "args": [
        { "name": "filter", "help": "Test filter pattern", "required": false }
      ]
    }
  ]
}
```

## Features

### Derive Macros
- Declarative command definitions
- Compile-time validation
- Automatic help generation
- Type-safe argument handling

### Rust Benefits
- Zero-cost abstractions
- Fast native binaries
- Cross-platform compilation
- Memory safety

### Developer Experience
- Colored terminal output
- Comprehensive error handling
- Shell completions
- Integration tests

## Integration with Processes

| Process | Integration |
|---------|-------------|
| cli-application-bootstrap | Primary scaffolding for Rust CLIs |
| argument-parser-setup | Type-safe argument parsing |
| shell-completion-scripts | Built-in completion generation |

## References

- [Clap Documentation](https://docs.rs/clap/)
- [Rust CLI Book](https://rust-cli.github.io/book/)
- [Command Line Apps in Rust](https://rust-cli.github.io/book/index.html)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall