Skip to main content

createcli-agent

Generate a production-ready TypeScript CLI for autonomous agents (JSON contract, non-interactive, semantic exits). USE WHEN create an agent CLI, tool for LLM/automation, or wrap an API for agents. NOT FOR human-first interactive CLIs (use CreateCLI-Human), agent skills (use CreateSkill), or Python.

소스 정보

저장소
RohiRIK/skills
최근 소스 활동
2026년 10월 16일 13:05
감지된 SKILL.md 언어
영어
스타
1
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
4 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
CreateCLI-Agent
description
Generate a production-ready TypeScript CLI for autonomous agents (JSON contract, non-interactive, semantic exits). USE WHEN create an agent CLI, tool for LLM/automation, or wrap an API for agents. NOT FOR human-first interactive CLIs (use CreateCLI-Human), agent skills (use CreateSkill), or Python.
category
reference
effort
medium
domain
dev
tuned-for
claude-5.5
tuned-on
2026-10-16T00:00:00.000Z
# CreateCLI-Agent Generate a **TypeScript** CLI whose **primary caller is an autonomous agent** (LLM tool loop, CI, script). It runs the shared `CreateCLI` base (tiers, `Workflows/CreateCli.md`, `AddCommand.md`, `UpgradeTier.md`, and its pattern files) with the machine contract in `Contract.md` replacing the base's human-leaning defaults. Sibling: `CreateCLI-Human` when a person drives it at a terminal. ## Workflow Routing | Workflow | Trigger | File | |----------|---------|------| | **CreateCli** | "create an agent CLI", "CLI for automation/LLM tools" | `../CreateCLI/Workflows/CreateCli.md` + `Contract.md` | | **AddCommand** | add a command, preserving the agent contract | `../CreateCLI/Workflows/AddCommand.md` + `Contract.md` | | **UpgradeTier** | only if the command graph forces it | `../CreateCLI/Workflows/UpgradeTier.md` | Read `Contract.md` before generating any code. Ask for the output directory; never hardcode it. ## Quick Reference - Bun, strict TS, Tier 1 bias (~85% of agent CLIs): fewer moving parts. - stdout = versioned JSON / NDJSON envelope (`{"ok":true,"data":…}`); stderr = diagnostics only; no ANSI on non-TTY. - Mutations: `--dry-run` (exit 10) and `--yes`/`--confirm`; refuse without confirm when non-interactive. - Semantic exits (0, 2, 3, 4, 5, 10, 20, 30); fail open on unknown errors, never invent a deny. - `--help-json` for discovery; secrets from env only, never on stdout. - Verify gate: typecheck, `--help-json` parses, sample read, dry-run mutation, refusal without `--yes`, stdout through `jq`. ## Gotchas - Do not default to tables, ANSI, prompts, or pagers: that is CreateCLI-Human. - Do not silent-yes on a missing TTY, and do not retry mutating calls inside the CLI. - A subcommand that is also a **harness hook** speaks the harness's protocol, not the envelope. Claude Code reads exit 2 as *block*, so hook mode exits 1 on usage errors, including flag-parse errors raised before the handler runs, or one mistyped flag in `settings.json` refuses every tool call. - Test the contract on the spawned process, not only the library: parse errors, `--version`, and `--help` on a stdin-reading command fail before any handler. ## Examples **Example 1:** "CLI so an agent can manage DNS records" → Tier 1 → JSON envelopes, `--help-json`, delete requires `--yes`, `--dry-run` exits 10. **Example 2:** "wrap our internal API for Grok Bot tools" → flags-only inputs, semantic exits, no spinners, secrets from env only.
GitHub에서 보기