cli-adapter
Use when a tool or app has no MCP server or official connector, when the user asks the agent to control an application, or when a thin CLI wrapper is the cheapest integration path.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- cli-adapter
- description
- Use when a tool or app has no MCP server or official connector, when the user asks the agent to control an application, or when a thin CLI wrapper is the cheapest integration path.
- disable-model-invocation
- true
03 SKILL.md 正文
CLI adapter
When no MCP server or official connector exists for a tool, the agent builds the connector itself: a thin CLI wrapper that exposes the app's real surface. Reference implementation: extensions/agent-reach/wrapper.py (whitelist-passthrough CLI adapter).
Decision order
- Official MCP/connector exists? Use it.
mcp-governancefor selection. - App exposes CLI/args already? Wrap it directly - this skill.
- API/library only? Write a thin CLI over the API, then wrap.
- GUI only?
computer-use/cu-realtimeinstead - no adapter.
Build the wrapper
- Subprocess list-form only - never
shell=True, never string interpolation of args into a command line. - Whitelist the verb surface: map allowed subcommands explicitly; reject everything else with a clear error (see the credential-channel rejection in
extensions/agent-reach/wrapper.py). - Arg-contract: flags and positional args validated against the tool's own
--helpoutput before first real call. - JSON envelope on stdout:
{status, command, stdout, stderr, duration_s}- machine-readable so callers can branch onstatus. - Bounded: hard timeout per call, capped stdout/stderr size.
- Missing binary/toolchain returns
{"status": "missing"}with the install hint - never fabricate output.
Prove it before trusting it
- Smoke-test READ-ONLY calls first (
--version,--help, list/status verbs) before any mutating verb. - Mutating verbs get the destructive-ops treatment: dry-run flag if the tool has one, explicit confirmation boundary in the wrapper's doc, and a recorded contract of what each verb changes.
- The DAW pattern (reel source): "describe the change, agent controls the whole app" is the goal - but every button the wrapper can press is a liability surface. Keep the verb whitelist as small as the task allows.
Where it lives
- Reusable across sessions:
extensions/<name>/wrapper.py+ a skill entry. - Project-local:
.devin/tools/<name>.py+ usage note in the task doc. - Document the adapter's verb surface and failure modes in the skill that invokes it - callers should not read the wrapper source to know what exists.
04 同仓库更多 Skills
montador-de-ideias
Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.
git-github-adaptive-engineering
Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.
adaptive-agenda-calendar-routine-engine
Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.