A portable Agent Skill that queries Perplexity through its web UI using Playwright browser automation — no API key required.
Table of Contents
A universal Agent Skill that enables any AI coding agent — OpenCode, Claude Code, Codex CLI — to perform web searches through Perplexity's interface. It launches Chromium, navigates to perplexity.ai, submits a query, captures the generated answer from the clipboard, and writes it to a Markdown file.
No API key. No subscription. Just browser automation.
- Browser automation — Launches Chromium, navigates Perplexity, submits queries
- Answer extraction — Clicks "Copy" on the generated response, reads from clipboard
- Retry logic — Handles empty clipboard, slow responses, and transient failures (3 retries)
- Markdown output — Saves answers as
.mdfiles preserving Perplexity's formatting - Multi-agent — Works with OpenCode, Claude Code, and Codex CLI out of the box
- Clean I/O — Stderr for logs, stdout for output — pipe-friendly
Prerequisites: Node.js >= 18 and Chromium browsers.
cd skills/perplexity-webui-search
npm install
npx playwright install chromium
npm run search -- "What are the latest Playwright changes?" ./result.mdThe command opens Chromium, sends the prompt to Perplexity, copies the answer, saves it to result.md, and prints it to stdout.
Install into your agent's skill directory:
OpenCode:
npx skills add ./skills --skill perplexity-webui-search --agent opencode --copyOr copy skills/perplexity-webui-search/ into ~/.config/opencode/skills/.
Codex CLI:
npx skills add ./skills --skill perplexity-webui-search --agent codex --copyClaude Code and others:
Copy skills/perplexity-webui-search/ into your agent's skills directory.
node scripts/perplexity-query.js "your query" ./output.mdAnswers are saved as plain Markdown. Perplexity's formatting is preserved verbatim from the clipboard.
npm run search -- "What is Rust?" ./rust-overview.md
# → rust-overview.md contains the full Perplexity answernpm test # Unit tests
npm run check # Syntax validation
npm run pack:dry-run # Verify publish-ready packageskills/
perplexity-webui-search/
scripts/
perplexity-core.js # Core: args, retry, Playwright automation
perplexity-core.test.mjs # Unit tests
perplexity-query.js # CLI entry point
references/
install-opencode.md
install-codex.md
install-claude.md
troubleshooting.md
LICENSE
README.md
SKILL.md
package.json
docs/
assets/
logo.png
.gitignore
LICENSE
README.md
README.fr.md
| Document | Description |
|---|---|
| Install — OpenCode | Setup guide for OpenCode users |
| Install — Codex CLI | Setup guide for Codex CLI users |
| Install — Claude Code | Setup guide for Claude Code / compatible agents |
| Troubleshooting | Common issues and solutions |
| Skill Spec | Agent skill manifest and schema |
| Tests | Unit test suite (arg parsing, retry logic, clipboard) |
Contributions are welcome. This is a public project — fork, branch, and open a PR.
- Fork the repo
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m "feat: add amazing feature") - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
