mxyhi/ok-skills / opencli/opencli-adapter-author
opencli-adapter-author
VerifiedBuild or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc browser interaction, see opencli-browser.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.0 KB |
| references/adapter-template.md | markdown | 21.2 KB |
| references/api-discovery.md | markdown | 17.0 KB |
| references/coverage-matrix.md | markdown | 5.5 KB |
| references/deep-recon.md | markdown | 10.3 KB |
| references/field-conventions.md | markdown | 5.2 KB |
| references/field-decode-playbook.md | markdown | 7.1 KB |
| references/jsdom-fixture-pattern.md | markdown | 7.9 KB |
| references/output-design.md | markdown | 4.7 KB |
| references/site-memory.md | markdown | 10.7 KB |
| references/site-memory/bilibili.md | markdown | 3.6 KB |
| references/site-memory/eastmoney.md | markdown | 3.8 KB |
| references/site-memory/gmail.md | markdown | 2.8 KB |
| references/site-memory/tonghuashun.md | markdown | 2.4 KB |
| references/site-memory/xueqiu.md | markdown | 2.8 KB |
| references/site-recon.md | markdown | 4.5 KB |
| references/strategy-selection.md | markdown | 2.3 KB |
| references/success-rate-pitfalls.md | markdown | 9.3 KB |
| references/typed-errors.md | markdown | 12.6 KB |
references/strategy-selection.md
View on GitHub# Choosing an adapter strategy
Use the site's available contract and the task's needs to choose an implementation.
This reference is optional; no strategy note or classification artifact is required.
| Source | Useful when | Check |
| --- | --- | --- |
| Public API | A documented endpoint covers the task | Inputs, authentication, pagination and error semantics |
| Cookie-authenticated API | The endpoint works with the current account | Cookie/CSRF scope and real returned identity |
| Page state / SSR | The page already contains the required data | Field meaning, completeness and hydration timing |
| Semantic UI | The visible controls express the operation reliably | Stable selectors, target identity and observable result |
| Browser fetch | The request needs page origin or runtime context | Actual request parameters and response meaning |
| Network interception | The page produces a request that is difficult to reproduce | The captured response belongs to the intended action and input |
There is no universal API-over-DOM rule. A stable visible control can be easier to
maintain than an undocumented internal endpoint. Reuse an existing adapter or
shared helper when it already models the same operation.
## Gather facts as needed
```sh
opencli browser state --diagnostics --session research
opencli browser network --static --session research
opencli browser network --detail RequestKey --session research
```
Read `data` from the success envelope. Page diagnostics expose title, URL and
initial-state globals. Network evidence provides captured request keys, response
shapes and static source locations. `static` is a candidate; `network+static`
means both sources support the route. Neither proves business correctness.
The CLI does not assign a strategy score or prescribe the next action.
Check representative values against the visible page. For lists, distinguish a
true end of pagination from a failed or partial response. For writes, bind the
operation to the requested target and inspect its result; do not replay an action
whose previous outcome is unknown.
If an endpoint needs a runtime-generated signature, consider observing the page's
own request or using semantic UI. Use `references/api-discovery.md` for techniques
and `references/deep-recon.md` when the protocol requires further investigation.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |