Skip to content

Siwoo4985/ai-cli-bootstrap-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI CLI Bootstrap Skill

License: MIT

Build tiny task-scoped CLIs on demand when an agent cannot directly access the data, page, API, or platform action a user needs.

This is a starter repo for agent unblock workflows: reuse an existing tool if possible, otherwise scaffold the smallest useful helper, run it immediately, and answer from the result.

When To Use This

Use it for prompts like:

  • "Read this X post for me"
  • "Analyze this YouTube script"
  • "Summarize this page the agent cannot read directly"
  • "Compare these API responses"

Do not use it when the helper is turning into a real product with config, subcommands, browser login flows, or framework structure.

30-Second Quick Start

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

This creates:

.agent-tools/
  youtube-script/
    cli.py

Patch the generated file with the smallest missing fetch or transform logic, run it on a real sample, and answer from the output.

If your repository already uses another scratch-tool directory, override it:

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

End-To-End Example

Representative example: examples/youtube_transcript

  1. User request
Analyze this YouTube script for pacing and retention.
  1. Bootstrap command
python scripts/bootstrap_ai_cli.py youtube-script \
  --purpose "Fetch transcript text and metadata for a YouTube video" \
  --template transcript_stub \
  --workspace "$PWD"
  1. Patched cli.py excerpt
def extract_video_id(target: str) -> str:
    if "youtube.com" in target or "youtu.be" in target:
        ...
    return target.strip()


def fetch_segments(video_id: str, lang: str) -> list:
    return YouTubeTranscriptApi.get_transcript(video_id, languages=[lang])
  1. Example dependency
python -m pip install youtube-transcript-api

This dependency is only required for the representative YouTube example, not for the scaffold script itself.

  1. Example execution
python examples/youtube_transcript/cli.py "https://youtu.be/dQw4w9WgXcQ" --json
  1. Example JSON output
{
  "status": "ok",
  "tool": "youtube-transcript",
  "video_id": "dQw4w9WgXcQ",
  "lang": "en",
  "segment_count": 3
}
  1. Final answer built from the output

The script gets to the point quickly, but the payoff arrives almost immediately after the hook. To improve retention, expand the middle section with one concrete example before the closing action.

Template Types

Template Best for What it gives you
generic Anything custom Minimal one-file scaffold with TODO logic
fetch_json APIs and JSON endpoints urllib fetch + JSON normalization
fetch_page_text Articles and webpages HTML fetch + title/text extraction
parse_local_file Local JSON or text artifacts File read + simple normalization
transcript_stub Video or audio transcript flows Transcript-shaped output and segment scaffold

Agent Install

Agent Entry point How to use it
Codex SKILL.md Place this repo in your Codex skills directory
Claude Code prompts/claude-code.md Copy the prompt into project instructions or task preamble
Gemini CLI prompts/gemini-cli.md Copy the prompt into project instructions or task preamble
Other coding agents prompts/core.md Paste the core instructions into the agent's working context

Codex

git clone https://github.com/Siwoo4985/ai-cli-bootstrap-skill.git \
  "${CODEX_HOME:-$HOME/.codex}/skills/ai-cli-bootstrap-skill"

Claude Code, Gemini CLI, And Others

  1. Clone this repository anywhere in your workspace.
  2. Start with prompts/core.md.
  3. Add prompts/claude-code.md or prompts/gemini-cli.md if you want agent-specific defaults.

Examples

Example Purpose Notes
youtube_transcript Representative end-to-end transcript flow Best default onboarding path
webpage_extractor Stable page-to-text extraction Standard-library example
x_post_reader Illustrative post reader Shows normalization shape, not a guaranteed stable fetch path

Design Principles

Validation And Tests

Run the scaffold tests:

python -m unittest discover -s tests

Validate the Codex skill metadata:

python "${CODEX_HOME:-$HOME/.codex}/skills/.system/skill-creator/scripts/quick_validate.py" \
  "${CODEX_HOME:-$HOME/.codex}/skills/ai-cli-bootstrap-skill"

Contributing

Small, focused improvements are the best fit:

  • tighten prompts
  • improve scaffold templates
  • add clearer examples
  • keep docs, templates, and behavior consistent

If the generated helper starts turning into a framework, move that work into a separate project instead.

License

This project is released under the MIT License.

About

A Codex skill that builds tiny task-specific CLI tools on demand when the model cannot directly access the data it needs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages