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
- Identify the missing artifact and the final answer format.
- Reuse an existing local script, binary, or integration if one already solves the gap.
- If nothing suitable exists, scaffold a helper in
.agent-tools/<slug>/cli.py. - Keep the helper agent-facing:
- minimal arguments
- plain text or JSON output
- no interactive prompts
- environment variables for secrets
- Run the helper on a real or representative sample before trusting it.
- Use the helper output to finish the original task.
Scaffold
Generate a starter helper with:
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 rulesreferences/decision-guide.md: build vs reuse vs stopreferences/anti-patterns.md: what not to buildtemplates/: starter scaffolds by task type