Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jackwener/OpenCLI --skill opencli-adapter-author -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/opencli-adapter-author/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/opencli-adapter-author/

From the same set3

The whole set →

Similar

book-to-skill virgiliojr94 Turns books and documents into structured agent skills with frameworks, principles, and techniques. Useful when an agent should apply an author's methods while working. Claude Code CX Codex Cursor +1 8,400installs security-best-practices github.com/openai/skills A skill that reviews code against security best practices for Python, JavaScript/TypeScript and Go, then suggests fixes. Claude Code CX Codex Cursor +1 357installs context7-cli upstash This skill teaches your agent to pull current library documentation through the ctx7 CLI and wire up Context7 MCP for the editor. Claude Code CX Codex Cursor +1 7,800installs fireworks-tech-graph yizhiyanhua-ai Builds precise technical SVG diagrams, exports them to PNG or standalone HTML, and animates semantic SVGs into GIFs. Suitable for system architecture, UML, and cloud workflows. Claude Code CX Codex Cursor +1 18,000installs composio ComposioHQ This skill routes Composio tasks for a personal agent or a product with user-connected accounts, from setup and integration to tool runs and troubleshooting. Claude Code CX Codex Cursor +1 8,000installs interface-design Dammyjay93 This skill guides product UI work for dashboards, admin panels, SaaS apps, and tools. Use it when hierarchy, states, visual direction, and design-system consistency matter. Claude Code CX Codex Cursor +1 30,700installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor