# AI CLI Bootstrap Skill

> Build and run tiny AI-only CLI tools to unblock tasks that depend on data or actions the agent cannot natively access. Use when the agent is asked to read, collect, convert, or analyze content from external platforms or APIs such as X posts, YouTube transcripts, Reddit threads, web pages, feeds, local databases, or custom endpoints, and the fastest path is to create a task-scoped CLI first and then use its output to finish the user request.

- Skill: `siwoo4985/ai-cli-bootstrap-skill` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add siwoo4985/ai-cli-bootstrap-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/siwoo4985/ai-cli-bootstrap-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Siwoo4985 (https://skillmd.com/u/siwoo4985)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/siwoo4985/ai-cli-bootstrap-skill

---


# AI CLI Bootstrap Skill

## Overview

Use this skill when direct access is the only blocker. Reuse an existing local tool first, otherwise generate the smallest task-scoped CLI needed to fetch or transform the missing artifact, run it immediately, and answer from the result.

## Workflow

1. Identify the missing artifact and the final answer format.
2. Reuse an existing local script, binary, or integration if one already solves the gap.
3. If nothing suitable exists, scaffold a helper in `.agent-tools/<slug>/cli.py`.
4. Keep the helper agent-facing:
   - minimal arguments
   - plain text or JSON output
   - no interactive prompts
   - environment variables for secrets
5. Run the helper on a real or representative sample before trusting it.
6. Use the helper output to finish the original task.

## Scaffold

Generate a starter helper with:

```bash
python scripts/bootstrap_ai_cli.py youtube-script \
  --purpose "Fetch transcript text and metadata for a YouTube video" \
  --template transcript_stub \
  --workspace "$PWD"
```

If the host repository already uses another scratch-tool convention, override it with `--tools-dir`.

## Rules

- Prefer a single Python file.
- Prefer the standard library first.
- Implement only the missing edge.
- Stop calling it a tiny CLI if it starts needing config, subcommands, or framework structure.

## References

- `references/ai-only-cli-rules.md`: detailed operating rules
- `references/decision-guide.md`: build vs reuse vs stop
- `references/anti-patterns.md`: what not to build
- `templates/`: starter scaffolds by task type

