opencli-adapter-author
하는 일
이 스킬은 OpenCLI 도구가 특정 웹사이트와 작동하도록 하는 작은 어댑터를 만들거나 개선하도록 돕습니다. 공개 API나 브라우저 가져오기처럼 가장 단순하고 안정적인 방법을 고릅니다.
사용하는 경우
- ✓웹사이트에서 데이터를 가져오는 명령을 원하지만 아직 어댑터가 없을 때.
- ✓기존 OpenCLI 어댑터가 작동을 멈춰서 개선해야 할 때.
- ✓어떤 기존 어댑터가 작업을 이미 다루는지 확인하고 싶을 때.
스킬 링크
https://github.com/jackwener/OpenCLI/blob/main/skills/opencli-adapter-author/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 사이트의 최신 게시물을 나열하는 OpenCLI 어댑터를 만들어 주세요. 먼저 내 계정에서 테스트해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 먼저 기존 어댑터를 확인한 뒤, 페이지와 네트워크 요청을 살펴 데이터를 가장 안정적으로 얻는 방법을 찾습니다. 어댑터를 작성하고 테스트하며, 공개 API가 있으면 그것을 우선합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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.
자주 묻는 질문
웹사이트 주소를 추측하나요?
아닙니다. 매개변수를 추측하는 대신 관찰된 요청과 캡처된 응답을 사용합니다.
쓰기 작업은 안전하게 테스트하나요?
쓰기 명령은 실제 효과가 있으므로 테스트 계정이나 드라이 런을 권장합니다.
기존 어댑터를 재사용할 수 있나요?
네. 먼저 기존 어댑터를 확인하고, 작업을 이미 다루는 것이 있으면 그것을 사용합니다.
상세 정보
작성자의 원본 설명
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.
repo: jackwener/OpenCLI
인기도
- GitHub 스타
- 31k
- 순위
- #9332
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 26.
댓글
- …