# OpenCLI Adapter Author

Builds OpenCLI adapters from observed site behavior and existing adapter examples.

- Repository: https://github.com/jackwener/OpenCLI (30817 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add jackwener/OpenCLI --skill opencli-adapter-author -g -a claude-code -y`
Codex: `npx skills add jackwener/OpenCLI --skill opencli-adapter-author -g -a codex -y`
Cursor: `npx skills add jackwener/OpenCLI --skill opencli-adapter-author -g -a cursor -y`
Gemini CLI: `npx skills add jackwener/OpenCLI --skill opencli-adapter-author -g -a gemini-cli -y`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Adapter authoring

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

```sh
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

```sh
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.

```sh
opencli adapter init example/search
```

The rest: https://github.com/jackwener/OpenCLI/blob/HEAD/skills/opencli-adapter-author/SKILL.md
