Converts local projects or directories into installable, testable command-line interfaces that support JSON output for human and agent use.
- GitHub stars
- 72
- Files
- 39
- Last commit
- Nov 10, 2026
- License
- MIT
- Allowed tools
- —
What does the lov-cli-creator skill do?
lov-cli-creator converts local projects or directories into installable, testable command-line interfaces that support JSON output for human and agent use.
Summary generated from the skill's SKILL.md.
About the lov-cli-creator skill
Transforming local projects or directories into installable command-line interfaces is the primary function of this skill. It is designed for developers who need to make their existing applications or libraries accessible to both human users and AI agents through a structured terminal interface. By analyzing the callable surface of a project, the skill generates a Python-based harness that exposes the backend via stable JSON output and documented command contracts.
An agent should load this skill when a user requests to build a CLI for a project or make an application agent-accessible. The process involves inspecting the project to identify public APIs or executables, designing a command plan, and scaffolding a package in an agent-harness directory. The resulting tool includes built-in commands like doctor, info, and capabilities, along with executable tests to ensure the bridge between the CLI and the real backend functions correctly. It relies on Python 3.9+ and the target project's own runtime to validate the generated interface.
What an agent can do with it
- 1Convert a project to a CLITransform a local codebase into a fully functional and installable command-line tool.
- 2Enable agent interaction with applicationsMake a local application accessible to AI agents by generating a structured command interface.
- 3Automate CLI contract designCreate a formal JSON plan that defines command groups, inputs, and expected outputs before scaffolding.
- 4Validate CLI installationsVerify that a newly generated command-line tool is correctly installed and passes all end-to-end tests.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the lov-cli-creator skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the lov-cli-creator skill in Plugin
/plugin marketplace add lovstudio/skills /plugin install dev-tools@lovstudio
Install the lov-cli-creator skill in Claude Code
~/.claude/skills/lov-cli-creator/SKILL.md
$ npx degit lovstudio/skills/skills/cli-creator ~/.claude/skills/lov-cli-creatorInstall the lov-cli-creator skill in Claude Code (project)
.claude/skills/lov-cli-creator/SKILL.md
$ npx degit lovstudio/skills/skills/cli-creator .claude/skills/lov-cli-creatorInstall the lov-cli-creator skill in Codex
~/.agents/skills/lov-cli-creator/SKILL.md
$ npx degit lovstudio/skills/skills/cli-creator ~/.agents/skills/lov-cli-creatorInstall the lov-cli-creator skill in Gemini CLI
~/.gemini/skills/lov-cli-creator/SKILL.md
$ npx degit lovstudio/skills/skills/cli-creator ~/.gemini/skills/lov-cli-creatorInstall the lov-cli-creator skill in Claude.ai
npx degit lovstudio/skills/skills/cli-creator lov-cli-creator && zip -r lov-cli-creator.zip lov-cli-creator # claude.ai → Customize → Skills → + → Create skill → Upload a skill → lov-cli-creator.zip
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work · What to fix for more points
- Source repository linked and reachablelovstudio/skills/skills/cli-creator is public and reachablegithub.com/lovstudio/skills/tree/HEAD/skills/cli-creator ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-10github.com/lovstudio/skills/commits ↗Pass
- No download-and-run or credential theft in scripts5 of 6 scripts read; none of them downloads and runs code, the rest were not readFinding
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/lovstudio/skills/blob/HEAD/skills/cli-creator/SKI ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/lovstudio/skills/blob/HEAD/skills/cli-creator/SKI ↗Pass
- SKILL.md follows the Agent Skills formatthe description does not say when to use the skill; name "lov-cli-creator" differs from the folder "cli-creator"github.com/lovstudio/skills/blob/HEAD/skills/cli-creator/SKI ↗Finding
SKILL.md
View on GitHubCLI 工坊 · CLI Studio
Turn a real local project into an installable command-line interface that both people and agents can operate. The generated CLI exposes the project's actual backend, emits stable JSON, documents its contract, and carries executable tests.
Triggers
Activate when
- “给这个项目做一个 CLI”“把当前应用变成命令行”“为这个仓库生成 Agent CLI”。
- “从这个项目路径输出一个可安装的命令行工具”。
- “Build a CLI for this project” or “make this application agent-accessible”.
- The user wants to refine or validate a CLI previously generated by this Skill.
Do not activate when
- The user only wants a new Web/Tauri application; use an app-generation workflow.
- The user only needs one shell alias or a single ad-hoc command, not a maintained CLI.
- The user asks to publish a package or release; this Skill stops at a locally installed and verified CLI.
- The target is a closed binary with no callable API, scripting surface, protocol, or native file format. Diagnose the missing backend boundary before generating.
User Profile (cross-session)
Read skill.yaml on every invocation. Resolve values in this order: the current
request, project context, skills.lov-cli-creator.records, shared preferences,
the shared user/workspace Profile, then safe defaults. Project path defaults to
the directory in which the Skill is invoked; output defaults to
agent-harness/ inside that project.
Persist only a directly stated durable preference, such as a user's long-term command prefix or output-directory convention:
python3 "$SKILL_DIR/scripts/profile_store.py" record \
--skill-id lov-cli-creator \
--path records.command_prefix \
--value '"lov-cli"' \
--confirm
Report the saved Profile path. Never persist inferred paths, credentials, or tokens. See the Profile contract.
Skill Group Composition
Read the composition record before invoking
an adjacent Skill. lov-cli-creator owns the finished CLI; other Skills are
optional artifact-level handoffs and never hidden runtime dependencies.
Workflow (MANDATORY)
Follow these steps in order. Do not report a scaffold as a completed CLI.
Step 0: Resolve the Skill and target project
- Resolve
SKILL_DIRfrom the active Skill context. - Resolve the target from the user's path; if omitted, use the Skill invocation working directory, not the installed Skill directory.
- Resolve symlinks, confirm the directory exists, and read applicable
AGENTS.md,CLAUDE.md, repository instructions, and dirty-worktree state. - Preserve unrelated files and changes. Never overwrite an occupied output directory with the scaffold helper.
Manual helper invocation:
python3 "$SKILL_DIR/scripts/inspect_project.py" . --format markdown
Step 1: Analyze the real callable surface
Run the inspector and then verify its signals against source code:
python3 "$SKILL_DIR/scripts/inspect_project.py" PROJECT \
--format json --output PROJECT_ANALYSIS.json
Identify the product domains, existing commands, public APIs, native data model, state lifecycle, export/render path, and external runtime dependencies. Map user actions to real callable functions or executables. Prefer, in order:
- an existing project CLI or scripting API;
- the project's public library/service API;
- direct manipulation of its documented native format followed by its real renderer or runtime;
- a narrow subprocess or protocol adapter.
Do not rebuild the product in the harness. For GUI/media applications, rendering must use the real engine. For services, use the real local service/API boundary. For libraries, call the public API rather than copying implementation logic. Read project analysis rules.
Step 2: Design the CLI contract before generating files
Define command groups around user tasks, not source filenames. Every CLI must
include doctor, info, and capabilities, plus at least one project-specific
command. Every command must work in human-readable mode and with global --json.
Write a lov-cli-plan/v1 JSON plan. For existing executables, declare fixed
argv prefixes and typed parameters so the generated bridge can be complete
without shell evaluation. For an in-process library or protocol, use the plan to
scaffold the command contract, then implement the adapter in generated source.
Read the plan schema and the CLI contract. Include:
- command name, description, inputs, output, mutability, and exit behavior;
- state persistence, concurrency, undo/redo, and idempotency rules when relevant;
- real backend dependency and install diagnostics;
- output verification for every export or mutation with a material artifact.
Step 3: Scaffold the harness
Generate into PROJECT/agent-harness unless the request or Profile supplies a
different output directory:
python3 "$SKILL_DIR/scripts/scaffold_cli.py" PROJECT \
--plan CLI_PLAN.json
The helper creates a Python package, console entry point, JSON contract, backend
bridge, README, test plan, and tests. It rejects occupied output paths. Use
--output only when a separate location is required. The default console command
is lov-cli-PROJECT_SLUG, unless the plan declares another safe kebab-case name.
If an existing generated harness is present, inspect and refine it in place. Never discard working commands merely to rerun the scaffold.
Step 4: Complete the real backend adapter
The generated subprocess bridge is production-usable when the plan fully maps an
existing executable. Otherwise implement the missing adapter in
src/PACKAGE/backend.py and register its typed command handler in cli.py.
Requirements:
- use argument arrays with
shell=False; never concatenate untrusted shell text; - resolve executables explicitly and return actionable dependency errors;
- make read-before-write introspection cheap;
- return stable JSON envelopes and nonzero exit codes on failure;
- verify postconditions instead of trusting exit status alone;
- auto-save one-shot state mutations unless
--dry-runis set; - lock persistent session files when concurrent writes are possible;
- keep secrets out of argv echoes, logs, JSON, and generated source.
For stateful tools, support both one-shot commands and a REPL only when a REPL adds genuine value. Do not force statefulness onto a stateless project.
Step 5: Test the installed command through real workflows
Complete TEST.md as a plan before adding test code. Keep fast unit tests and
real end-to-end tests. The E2E suite must invoke the installed console command
from outside the harness directory, exercise at least one project-specific
workflow, and verify resulting state or artifacts programmatically.
Install into an isolated environment or the project-approved environment:
python3 -m pip install -e PROJECT/agent-harness
python3 -m unittest discover -s PROJECT/agent-harness/tests -v
When a Python 3.9 venv bundles pip older than 21.3, install the generated
requirements.txt and run python3 setup.py develop from the harness as the
local editable-install fallback. Do not require a network-only pip upgrade.
If the backend dependency is unavailable, the real-backend E2E test fails with installation guidance; it must not silently skip or replace the backend. Read the testing requirements.
Step 6: Mark ready and validate
Set status in lov-cli.json to ready only after the domain commands and E2E
tests pass. Then run:
python3 "$SKILL_DIR/scripts/validate_cli.py" PROJECT/agent-harness \
--run-tests --require-installed
Validation must confirm the package entry point, source/module invocation, JSON envelopes, built-in introspection, at least one domain command, unit/E2E tests, and the installed command from a neutral working directory.
Step 7: Report the finished artifact
Report the target project, harness path, installed command, command groups, backend used, tests and validation results, and any verified limitation. Clearly separate local readiness from package publication; publication is outside scope.
Dependencies
- Python 3.9+ to run the helpers and generated standard-library CLI.
- The target project's real runtime or executable for backend validation.
- PyYAML only for validating this Skill source with
scripts/validate_skill.py.
Provenance
This workflow adapts the CLI-Anything agent-harness methodology while broadening it from GUI applications to local projects and replacing legacy packaging rules with a small PEP 621 harness. See upstream research for the source, license, and deliberate differences.
Runtime context (shared)
运行前读取本 Skill 包的 skill.yaml。只使用 Manifest 声明的字段;Profile
保存用户和工作区长期偏好,skills.lov-cli-creator.records 保存本 Skill 的持久
记录。报错提供可复制的 context_id、字段路径与来源,诊断不得泄露秘密。
Files in this skill
39lov-cli-creator skill questions
How do I install the lov-cli-creator skill in Claude Code?
Run npx degit lovstudio/skills/skills/cli-creator ~/.claude/skills/lov-cli-creator. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the lov-cli-creator skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What does this skill do?
It turns a local project or current directory into a real, installable backend CLI that supports JSON output and includes executable tests.
What are the requirements for the target project?
The target project must have a real runtime, executable, or API boundary that can be called; it cannot be a closed binary with no callable interface.
Where is the generated CLI installed?
By default, the CLI is generated into an 'agent-harness/' directory inside the target project.
Does it support Python versions?
Yes, it requires Python 3.9 or higher.