Skip to content
Automation
Skill

/opencli-adapter-author

Build or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc browser interaction, see opencli-browser.

From plugin
opencli
31k5 skills

Claude Code

$ npx -y skills add jackwener/opencli --skill opencli-adapter-author --agent claude-code

SKILL.md

opencli-adapter-author.SKILL.md
name: opencli-adapter-author
description: Build or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc browser interaction, see opencli-browser.
allowed-tools: Bash(opencli:*), Bash(jsluice:*), Read, Edit, Write, Grep

Adapter authoring

Choose the simplest implementation that reliably performs the requested task. Use an existing site adapter when it already covers the capability:

opencli list search --site example
opencli example search --help -f json

`list` returns `{ok:true,data:{commands,total,nextOffset?}}`; use `--offset` to continue, `--limit` to adjust page size. Detailed arguments belong in command help.

Evidence available to you

opencli browser open https://example.com --session research
opencli browser state --diagnostics --session research
opencli browser network --session research
opencli browser network --static --session research
opencli browser network --detail RequestKey --session research

Network captures describe observed requests. Static analysis adds candidates from loaded scripts without executing them. Inspect source locations, unresolved expressions and capture provenance. Replay read requests when useful and compare business data with the page. Write commands have real effects, including when run through `adapter test`; use a suitable test account or a supported dry-run.

Prefer public APIs with a stable contract when available. Browser fetch, captured responses, page state and semantic UI interactions are also valid choices. Select based on the task and observed reliability. Do not guess endpoint parameters or hide failed operations behind empty success results.

JS interface

Adapters are ordinary files under `~/.opencli/clis/<site>/<command>.js` or repository `clis/<site>/`. There is no draft directory, promotion step or required memory file.

opencli adapter init example/search

The existing `cli({...})` interface is unchanged: `func(args)` for Node execution, `func(page, args)` with `browser: true`. Reuse neighboring adapters and shared helpers. Return business data; the CLI adds the JSON success envelope. Throw a typed error with an actionable hint for failures. Use `access: 'read'|'write'` accurately. `columns` controls human table exports; JSON preserves nested results.

import { cli, Strategy } from '@jackwener/opencli/registry';

cli({
  site: 'example', name: 'search', description: 'Search example items',
  access: 'read', strategy: Strategy.PUBLIC, browser: false,
  args: [{ name: 'query', positional: true, required: true }],
  func: async (args) => {
    const response = await fetch(`https://example.com/api/search?q=${encodeURIComponent(args.query)}`);
    if (!response.ok) throw new Error(`Search failed: HTTP ${response.status}`);
    return response.json();
  },
});

Check and exercise

opencli adapter check example/search
opencli example search 'query'
opencli adapter test example/search --args '{"query":"query"}'

`check` validates definitions without executing adapters. `test` executes the normal CLI and optionally compares an existing fixture. `--write-fixture`, `--update-fixture` and `--no-fixture` control optional expectations; no row-shape or site-memory gate is imposed. `--trace retain-on-failure` helps diagnose browser execution.

For repository changes, cover the core behavior and failure paths with focused production-path tests, typecheck and build. Verify IDs, fields, units, pagination and empty/error semantics relevant to the task. Do not automatically replay a write with an unknown outcome; inspect state first.

Optional references

Read only what is useful for the current task: `references/adapter-template.md` for adapter patterns, `api-discovery.md` for request investigation, `output-design.md` for result fields, `field-decode-playbook.md` for opaque fields, and `deep-recon.md` for difficult private protocols. Site notes and fixtures are optional knowledge aids; older reference checklists are not mandatory workflows.

Read more
@jackwener
Ships withopencli

Convert any website into a CLI & run Browser Use on your logged-in Chrome. Turn websites and browser sessions into deterministic interfaces for humans and AI agents. Or run Browser Use against any page — navigate, fill forms, click, extract, automate.

Stars on GitHub

Momentum

stars in total
31.0k
Star history of jackwener/opencli on GitHub, a chart by star-history.com

Other skills on opencli.

opencli-autofix

opencli-autofix

Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you…

@jackwener@jackwenerInstall Skill
opencli-browser

opencli-browser

Drive Chrome with OpenCLI to inspect pages, interact with logged-in sites, capture API evidence, and manage native tabs, groups…

@jackwener@jackwenerInstall Skill
opencli-usage

opencli-usage

Discover and invoke OpenCLI capabilities for websites and Chrome. Find commands, inspect schemas, interpret results and choose…

@jackwener@jackwenerInstall Skill
smart-search

smart-search

基于 opencli 命令的智能搜索路由器。当用户想要使用 OpenCLI、CLI 或 API 搜索、查询、查找或研究信息时,尤其是涉及指定网站、社交媒体、技术资料、新闻、购物、旅游、求职、金融或中文内容时,务必使用此 skill

@jackwener@jackwenerInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about opencli-adapter-author.

Which coding agents can use opencli-adapter-author?
opencli-adapter-author installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.