opencli-adapter-author — Claude Code skill: install
Build and improve OpenCLI JavaScript adapters from observed site behavior, browser evidence, and existing adapters when a site command needs to be added or fixed.
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a claude-codeWhat opencli-adapter-author does
This skill guides adapter work from checking existing OpenCLI capabilities to exercising the finished command. It uses opencli list to find available site commands, then inspects browser state and captured network traffic with opencli browser open, state, and network. Static analysis can add candidates from loaded scripts without executing them.
Adapters live in ~/.opencli/clis/<site>/<command>.js or clis/<site>/. The skill follows the existing cli({...}) interface, including Node execution and browser mode, and expects business data with an accurate read or write access value. Validation uses opencli adapter check, a normal CLI run, and opencli adapter test.
Write requests have real effects, including through adapter test, so use a suitable test account or a supported dry-run. Check the resulting state before repeating a write. For repository changes, the workflow also calls for focused tests around core behavior and failures, followed by typecheck and build.
What it helps with
- create a JavaScript adapter for an OpenCLI site
- inspect browser requests and page state
- validate command arguments and returned fields
- exercise empty and error responses
- check pagination and write behavior
Example prompts for the agent
- Create an OpenCLI adapter for `example/search`: inspect existing commands and network evidence, then implement it in `clis/example/search.js`.
- Check `example/search`, run it with the query `query`, and test its failure path.
- Improve a browser adapter using page state and semantic UI interactions; inspect state before exercising any write operation.
How to install opencli-adapter-author
1Skills CLI (Vercel)
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a claude-code2Manually: put the files in place
~/.claude/skills/opencli-adapter-author/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/opencli-adapter-author/
1Skills CLI (Vercel)
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a codex2Manually: put the files in place
.agents/skills/opencli-adapter-author/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a cursor2Manually: put the files in place
.cursor/skills/opencli-adapter-author/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jackwener/OpenCLI opencli-adapter-author2Manually: put the files in place
.github/skills/opencli-adapter-author/SKILL.md1Skills CLI (Vercel)
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a gemini-cli2Platform CLI
gemini skills install https://github.com/jackwener/OpenCLI --path skills/opencli-adapter-authorManually: put the files in place
.devin/skills/opencli-adapter-author/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set3
The whole set →Similar
Questions about opencli-adapter-author
How do I install opencli-adapter-author in Claude Code?
Run npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a claude-code, then run npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a claude-code again. The skill file is at ~/.claude/skills/opencli-adapter-author/SKILL.md.
What does opencli-adapter-author do?
It helps build and improve OpenCLI JavaScript adapters by checking existing commands, investigating site behavior, choosing an access strategy, and exercising the result through the CLI.
What should I know before testing write commands?
Write commands have real effects, including when run through adapter test. Use a suitable test account or a supported dry-run, and inspect state before repeating a write with an unknown outcome.
Source text
SKILL.md · Apache-2.0
---
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:
```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 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.
```js
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
```sh
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.
© jackwener · Apache-2.0 · jackwener/OpenCLI