cli
Skill0 starsChanged 12 days agoMITView on GitHub
Playbook for building and extending project-local developer CLIs and the recurring assets they generate, so the same patterns are never re-derived from scratch. Use when: scaffolding or adding a subcommand to a repo CLI (argparse/Typer, project-root discovery, packaged assets); generating a STATIC HTML single-page viewer (client-side SPA routing, collapsible sidebar, light/dark + rebrandable design-tokens theming, Cytoscape graph or Plotly chart, generate/serve, --inline single-file, --archive zip); templating GitHub Actions workflows from a base template (create/update/validate, trigger-path glob distillation, reusable composite-action assets); using git worktrees to act on another branch/ref safely; autogenerating SVG/PNG diagrams from a stencil pack; or automating sticky PR comments and embedding a CI-run artifact image in a PR comment. Skip for non-CLI app code, or one-off scripts with no reuse. Invoke as /cli or when the user names one of these patterns.
26 other projects use a version of this.
Adopted by
Most recently taken up by
- lobehub/lobehubtheir own version, first seen Nov 24, 2026
- bendrucker/claudetheir own version, first seen Nov 23, 2026
- GetStream/Agentstheir own version, first seen Nov 22, 2026
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- yuri-xyz/skillstheir own version, first seen Nov 8, 2026
- jinhuang712/qq-music-clitheir own version, first seen Oct 25, 2026
Used with
Projects with it also use desktop, api and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zjl4616Skilldesktop
桌面操控。让 CC 看屏幕、动鼠标、点按钮、输文字。基于 macOS 原生 OCR 触觉反馈,不截全屏传 AI,极致省 token。触发词:"/desktop"、"帮我操作桌面"、"点一下那个按钮"、"看看屏幕上有什么
Also in 4 projects that use this
VercelSkillapi
Publish HTTP handlers for external webhooks and callbacks on this agent's subdomain.
Also in 5 projects that use this
VercelSkillmcp
MCP Apps integration for json-render. Use when building MCP servers that render interactive UIs in Claude, ChatGPT, Cursor, or VS Code, or when integrating json-render with the Model Context Protocol.
Also in 5 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 4 projects that use this
Microsoft AzureSkilldocs
Also in 3 projects that use this
Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- lobehub/lobe-chat★ 86ksame name
- lobehub/lobehub★ 86ksame name
- clockworklabs/SpacetimeDB★ 26ksame name
- GetStream/Agents★ 8.2ksame name
- saifyxpro/HeadlessX★ 2.4ksame name
- Goldziher/html-to-markdown★ 891same name
- kreuzberg-dev/html-to-markdown★ 891same name
- kreuzberg-dev/tree-sitter-language-pack★ 489same name
- kreuzberg-dev/liter-llm★ 269same name
- AterDev/Perigon.CLI★ 54same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/adr/AGENTS.mdAGENTS.md
- skills/cli/AGENTS.mdAGENTS.md
- skills/concise-decisions/AGENTS.mdAGENTS.md
- skills/gooddocs/AGENTS.mdAGENTS.md
- skills/librarian/AGENTS.mdAGENTS.md
- skills/mermaidjs-diagrams/scripts/AGENTS.mdAGENTS.md
- skills/richdocs/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/adr/CLAUDE.mdCLAUDE.md
- skills/cli/CLAUDE.mdCLAUDE.md
- skills/concise-decisions/CLAUDE.mdCLAUDE.md
- skills/gooddocs/CLAUDE.mdCLAUDE.md
- skills/librarian/CLAUDE.mdCLAUDE.md
- skills/mermaidjs-diagrams/scripts/CLAUDE.mdCLAUDE.md
- skills/richdocs/CLAUDE.mdCLAUDE.md
- tools/CLAUDE.mdCLAUDE.md
- adrSkill
- agnosticSkill
- ccw-setupSkill
- concise-decisionsSkill
- gooddocsSkill
- librarianSkill
- mermaidjs-diagramsSkill
- richdocsSkill
- snr-prSkill
- tickety-booSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Every pattern here is distilled from working implementations.
- Very specific: line 26
When a task spans several (e.g.
- Very specific: line 59
Re-skin instead of rebuild: if a viewer already exists, you almost never fork the JS/HTML — edit design-tokens.json (palette/fonts/brand) …
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Building project CLIs (and the assets they generate)
A field guide to the patterns that recur across project-local developer CLIs, so
you implement each once, well and re-skin/re-use it rather than re-deriving it.
Every pattern here is distilled from working implementations; the depth (with
copy-pasteable skeletons) lives in resources/ — load the one you need.
Route by intent
| You are about to… | Reach for | Resource |
| Scaffold a CLI / add a subcommand; find the project root; ship data files | the shared CLI skeleton | resources/cli-foundations.md |
| Generate a static HTML viewer (SPA, sidebar, themes, Cytoscape/Plotly, serve, inline, archive) | the static-SPA-viewer pattern | resources/static-spa-viewer.md |
Create/update/validate a GitHub Actions workflow from a template; derive trigger paths | the GHA-templating pattern | resources/gha-templating.md |
| Build an artifact from another branch/ref without disturbing the work tree | the git-worktree pattern | resources/git-worktrees.md |
| Autogenerate SVG + PNG diagrams from a stencil icon pack | the stencil-diagram pattern | resources/svg-diagrams.md |
| Post/upsert a PR comment; embed a CI-run image artifact in a PR comment | the PR-comment pattern | resources/pr-comments.md |
When a task spans several (e.g. "a CLI that generates a viewer and posts it to the
PR"), start at cli-foundations.md for the skeleton, then pull each feature
resource in turn.
Non-negotiable conventions (apply to every pattern)
These hold across all the resources; they are the house contract a new CLI inherits.
- Fail loud, never degrade. A missing dependency, unresolved project root, or absent artifact raises with a clear message — never a silent skip or a fallback to a weaker path. (Optional features that are genuinely environmental — e.g. a best-effort metadata field — say so explicitly.)
- Discover the project root; never assume cwd. Explicit
--project-dir/flag → env var → walk up for a sentinel file → fail loud. Resolve once, store it, pass it. - Ship data files as package data, resolved via
importlib.resources/Path(__file__).parent, never a cwd- or repo-relative path — so assets resolve identically from source and as an installed tool. - Output discipline: human/log lines → stderr; the machine payload (
--json, a resolved path) → stdout only. Sotool … --json | jqandX=$(tool print-path)are always safe. - Temp/cache under the project's
tmp/, never the system/tmp, so artifacts are auditable andgit clean-able. app.py/entrypoint is wiring only — no business logic; handlers live incommands/. Read-only subcommands usestatus/validate/analyse; generators usecreate/generate/update; destructive ones use imperative verbs.
Quickstart
- In Claude:
/cli viewer(orgha,worktree,diagrams,pr-comments) — or describe the goal ("add agenerate/serveviewer to my CLI") and the matching resource is loaded and applied. - Direct: open the resource for the pattern, copy its reference skeleton, adapt the
generic names to your tool, and wire it per
cli-foundations.md. - Re-skin instead of rebuild: if a viewer already exists, you almost never fork the
JS/HTML — edit
design-tokens.json(palette/fonts/brand) and re-serve. See static-spa-viewer.md §theming.
Maintaining this skill
See AGENTS.md for the decision lenses (why each pattern is shaped this way) and the extension checklist. Keep every file ≤ 500 lines and brand-agnostic.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

