|
| 1 | +# OpenCLI Skill |
| 2 | + |
| 3 | +A Codex skill for working with [OpenCLI](https://github.com/jackwener/opencli): installation checks, command discovery, browser-login reuse, desktop-app adapters, downloads, troubleshooting, and adapter-generation workflows. |
| 4 | + |
| 5 | +Repository: [GloriaGuo/opencli-skill](https://github.com/GloriaGuo/opencli-skill) |
| 6 | + |
| 7 | +## What This Skill Covers |
| 8 | + |
| 9 | +- Choosing when OpenCLI is a better fit than browser agents or Playwright |
| 10 | +- Discovering commands safely with `opencli list -f yaml` |
| 11 | +- Running browser-backed site commands with Chrome login reuse |
| 12 | +- Running desktop adapters such as Codex and Cursor |
| 13 | +- Using OpenCLI as a passthrough hub for local CLIs such as `gh` and `docker` |
| 14 | +- Downloading media and exported articles |
| 15 | +- Troubleshooting the Browser Bridge, daemon, auth, and installed-command mismatches |
| 16 | +- Generating new OpenCLI adapters |
| 17 | + |
| 18 | +## Files |
| 19 | + |
| 20 | +- [SKILL.md](./SKILL.md): main skill entrypoint |
| 21 | +- [agents/openai.yaml](./agents/openai.yaml): UI metadata for the skill |
| 22 | +- [references/agent-playbook.md](./references/agent-playbook.md): fastest agent-first operating path |
| 23 | +- [references/commands.md](./references/commands.md): common commands and output patterns |
| 24 | +- [references/china-workflows.md](./references/china-workflows.md): China-focused site and desktop examples |
| 25 | +- [references/practical-scenarios.md](./references/practical-scenarios.md): detailed use-case manual |
| 26 | +- [references/troubleshooting.md](./references/troubleshooting.md): common failure signatures and fixes |
| 27 | + |
| 28 | +## Install |
| 29 | + |
| 30 | +Clone or copy the repo into your Codex skills directory: |
| 31 | + |
| 32 | +```bash |
| 33 | +git clone git@github.com:GloriaGuo/opencli-skill.git "${CODEX_HOME:-$HOME/.codex}/skills/opencli" |
| 34 | +``` |
| 35 | + |
| 36 | +Or copy the folder contents manually into: |
| 37 | + |
| 38 | +```bash |
| 39 | +${CODEX_HOME:-$HOME/.codex}/skills/opencli |
| 40 | +``` |
| 41 | + |
| 42 | +## Recommended OpenCLI Setup |
| 43 | + |
| 44 | +```bash |
| 45 | +npm install -g @jackwener/opencli |
| 46 | +opencli doctor |
| 47 | +opencli list -f yaml |
| 48 | +``` |
| 49 | + |
| 50 | +For browser-backed commands: |
| 51 | + |
| 52 | +- Keep Chrome open |
| 53 | +- Log into the target site in Chrome |
| 54 | +- Install and enable the OpenCLI Browser Bridge extension |
| 55 | + |
| 56 | +## Quick Examples |
| 57 | + |
| 58 | +Public data: |
| 59 | + |
| 60 | +```bash |
| 61 | +opencli hackernews top --limit 5 -f json |
| 62 | +``` |
| 63 | + |
| 64 | +Browser-backed data: |
| 65 | + |
| 66 | +```bash |
| 67 | +opencli bilibili hot --limit 5 -f json |
| 68 | +opencli zhihu search "Android 性能优化" -f json |
| 69 | +``` |
| 70 | + |
| 71 | +Desktop adapters: |
| 72 | + |
| 73 | +```bash |
| 74 | +opencli codex --help |
| 75 | +opencli codex read -f json |
| 76 | +opencli cursor read -f json |
| 77 | +opencli cursor ask "总结当前工作区最近一次对话" |
| 78 | +``` |
| 79 | + |
| 80 | +Downloads: |
| 81 | + |
| 82 | +```bash |
| 83 | +opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --output ./zhihu |
| 84 | +opencli bilibili download BV1xxx --output ./bilibili |
| 85 | +``` |
| 86 | + |
| 87 | +## Design Principles |
| 88 | + |
| 89 | +- Prefer deterministic command output over ad-hoc browsing |
| 90 | +- Start with read-only commands |
| 91 | +- Trust the installed CLI surface over stale README assumptions |
| 92 | +- Use `json` for agents and `yaml` for humans |
| 93 | +- Treat browser login state as a first-class dependency |
| 94 | + |
| 95 | +## Validation |
| 96 | + |
| 97 | +This skill can be validated with: |
| 98 | + |
| 99 | +```bash |
| 100 | +python3 /Users/ruiguo/.codex/skills/.system/skill-creator/scripts/quick_validate.py . |
| 101 | +``` |
0 commit comments