본문으로 건너뛰기
cccskills
무료GitHub에 공개

opencli-adapter-author

Helps build or improve reusable OpenCLI website commands in JavaScript. It uses observed page behavior, captured requests, and existing adapters to guide implementation, then checks definitions and tests real command behavior and failure handling.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Turning repeated website tasks into OpenCLI commands
  • Improving an existing website adapter
  • Investigating API requests before implementation
  • Checking adapter definitions and testing error handling

포함된 파일(19)

  • SKILL.md4.0 KB
  • references/adapter-template.md21.2 KB
  • references/api-discovery.md17.0 KB
  • references/coverage-matrix.md5.5 KB
  • references/deep-recon.md10.3 KB
  • references/field-conventions.md5.2 KB
  • references/field-decode-playbook.md7.1 KB
  • references/jsdom-fixture-pattern.md7.9 KB
  • references/output-design.md4.7 KB
  • references/site-memory.md10.7 KB
  • references/site-memory/bilibili.md3.6 KB
  • references/site-memory/eastmoney.md3.8 KB
  • references/site-memory/gmail.md2.8 KB
  • references/site-memory/tonghuashun.md2.4 KB
  • references/site-memory/xueqiu.md2.8 KB
  • references/site-recon.md4.5 KB
  • references/strategy-selection.md2.3 KB
  • references/success-rate-pitfalls.md9.3 KB
  • references/typed-errors.md12.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Diagnose OpenCLI commands broken by website changes, collect execution traces, patch the adapter that connects to the site, and retry. After a verified repair, prepares a GitHub issue for submission with user approval.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Repair commands broken by website layout changes
  • Adapt to changed API responses
  • Distinguish empty results from adapter failures
jackwener/OpenCLI3만2026년 10월 17일 업데이트

Uses OpenCLI to inspect and interact with Chrome pages, including logged-in websites. Agents can fill forms, extract page data, inspect captured network requests, take screenshots, and manage Chrome tabs, groups, and windows.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Filling forms and clicking controls on logged-in websites
  • Extracting page text and taking screenshots
  • Inspecting network requests for API investigation
jackwener/OpenCLI3만2026년 10월 17일 업데이트

Helps agents find and use OpenCLI commands for websites and Chrome. It guides command discovery, input checks, result interpretation, and error recovery so agents can select suitable browser tools or reusable website commands.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Finding OpenCLI commands for a specific website
  • Checking command inputs and output formats
  • Diagnosing Chrome connection problems
jackwener/OpenCLI3만2026년 10월 17일 업데이트

Routes OpenCLI searches to sources suited to the topic, language, or requested website. It starts with one AI source when none is specified, adds specialist sources as needed, and reports search terms and usage counts.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Researching a topic on a specified website
  • Choosing sources for Chinese or English research
  • Finding original posts, products, or job listings
jackwener/OpenCLI3만2026년 10월 17일 업데이트

jackwener의 스킬 모두 보기

이 스킬의 문제 신고