feat(skills): add pi-kuri-plugin — npm-installable pi.dev skill package#175
Open
thetrebor wants to merge 8 commits into
Open
feat(skills): add pi-kuri-plugin — npm-installable pi.dev skill package#175thetrebor wants to merge 8 commits into
thetrebor wants to merge 8 commits into
Conversation
added 3 commits
June 1, 2026 14:00
…vanced Add a pair of pi.dev-format skill files alongside the existing upstream kuri-skill.md. The new files follow a two-tier design that keeps agent context lean while making all capabilities discoverable. pi-kuri-skills.md (core): - Section 1: Setup — health check, server start instructions, tab listing - Section 2: Core operations — navigate, page-info, screenshot, text, markdown, links, accessibility snapshot with interactive refs - Section 3: Compact capability table hinting at advanced companion - Tips, browser path reference, custom project skills guidance pi-kuri-advanced.md (companion reference): - Mouse: click, right-click, double-click, hover - Keyboard: type, fill, select - Scrolling with direction and amount control - JavaScript evaluation with common expression examples - Cookies listing with security flags - Security audit (headers, cookies, HTTPS, mixed content) - HAR recording for API discovery - Tab and session management, multi-session orchestration - Experimental kuri-browser CLI documentation - Four common workflow patterns with full curl examples - Quick parameter reference table and full endpoint map (~80 endpoints) README updated to reference both new files.
Add a standalone pi.dev plugin directory with everything needed for
npm distribution and pi agent auto-discovery:
pi-kuri-plugin/
├── SKILL.md # Pi agent skill (two-tier design)
├── package.json # npm metadata + pi.skills + bin entry
├── README.md # Install/use docs
├── scripts/
│ └── kuri.js # CLI wrapper (bin: kuri-skill)
└── references/
└── ADVANCED.md # On-demand advanced reference
Key features:
- bin entry: 'kuri-skill' command available after npm install -g
- pi.skills field for auto-discovery by pi agent
- No external dependencies (uses Node 18+ built-in fetch)
- Disentangled from mh/milhouse — uses kuri binary directly
- SKILL.md content synchronized with pi-kuri-skills.md
- ADVANCED.md content synchronized with pi-kuri-advanced.md
- README documents install, config, and quick start
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a pi.dev-friendly Kuri skill set plus an npm-installable plugin that exposes a kuri-skill CLI for driving Kuri’s HTTP server.
Changes:
- Added core + advanced Pi skill documentation (
skills/pi-kuri-skills.md,skills/pi-kuri-advanced.md) and referenced them from the repo readme. - Introduced
skills/pi-kuri-plugin/npm package with a Node.js CLI wrapper (scripts/kuri.js) and bundled skill/reference docs. - Added ignore rules for plugin lockfile/module artifacts.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/pi-kuri-skills.md | Adds core (tier-1) Pi skill docs for Kuri via kuri-skill CLI |
| skills/pi-kuri-plugin/scripts/kuri.js | Implements kuri-skill CLI wrapper around Kuri HTTP endpoints |
| skills/pi-kuri-plugin/references/ADVANCED.md | Adds advanced (tier-2) reference doc bundled with plugin |
| skills/pi-kuri-plugin/package.json | Defines npm package metadata + kuri-skill bin + pi auto-discovery |
| skills/pi-kuri-plugin/SKILL.md | Adds plugin skill entrypoint doc for pi.dev |
| skills/pi-kuri-plugin/README.md | Documents install/usage/config for plugin consumers |
| skills/pi-kuri-plugin/.npmignore | Excludes lockfile and node_modules from published package |
| skills/pi-kuri-advanced.md | Adds advanced Pi skill reference at repo-level (non-plugin) |
| readme.md | Links new Pi Kuri skill/plugin artifacts from repo docs |
| .gitignore | Ignores plugin package-lock.json |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+129
to
+137
| if (!isKuriInstalled() && !isBuiltLocally()) { | ||
| const installScript = | ||
| "curl -fsSL https://raw.githubusercontent.com/justrach/kuri/main/install.sh | sh"; | ||
| hints.suggestions.push({ | ||
| action: "install_kuri", | ||
| install_url: "https://github.com/justrach/kuri", | ||
| install_script: installScript, | ||
| detail: "Kuri is not installed. Use the one-line install script, or build from source." | ||
| }); |
added 5 commits
June 1, 2026 14:17
Major improvements to the pi-kuri Pi extension: - Retry wrapper: CDP-fragile endpoints (page/info, screenshot, evaluate, text, markdown, links) auto-retry up to 3 times with exponential backoff on transient 502 failures. - settle_ms param on kuri_screenshot: configurable settle delay before capture for heavy JS pages. - Auto tab_id resolution: kuri_markdown and kuri_links now auto-discover the current session tab when none is provided. - kuri_text fallback: if raw text extraction returns empty, falls back to aria-label traversal of interactive elements. - kuri_console_errors: new diagnostic tool that intercepts console.error/warn and returns the last 30 entries for diagnosing broken pages.
… auto-resolve, text fallback, console_errors
, justrach#6, justrach#7, justrach#8 - justrach#1: Fix action arg parsing — dispatch by subcommand schema instead of naive sequential fill. click, type, fill, select, scroll, evaluate, close-tab each parse positional args correctly. - justrach#2: Fix endpoint mismatch — CLI now calls /page/info (server endpoint) instead of /page-info, removing degraded /tabs fallback. - justrach#5: Use POSIX 'command -v' instead of non-portable 'which'. - justrach#6: Remove unused imports (mkdirSync, createWriteStream, get). - justrach#7: Remove double-encoding via encodeURI in cmdTabNew. - justrach#8: Replace duplicate ADVANCED.md copy with symlink to canonical pi-kuri-advanced.md to prevent drift.
Covers: - Directory layout and file purposes - How pi.dev auto-discovers packages from npm - Step-by-step publish workflow (version bump, smoke test, npm publish) - Maintaining skill docs in sync (symlink approach) - Version convention and real-world pi.dev package examples - Troubleshooting common issues
…link needed - Add "extensions": ["./pi-kuri.ts"] to package.json pi manifest so pi install auto-registers the Kuri tools alongside the skill. - Remove manual ln -s instructions from README.md, SKILL.md, and OWNER.md. - Update OWNER.md to document the auto-registration flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a standalone pi.dev skill plugin for Kuri browser automation, with a Pi
extension (
pi-kuri.ts) that registers Kuri browser tools directly for agents,a CLI wrapper, and two-tier documentation.
Changes
pi-kuri-plugin (npm package)
skills/pi-kuri-plugin/— standalone npm package withkuri-skillCLI wrapperpackage.jsonwithpi.extensions+pi.skillsmanifest for auto-discoverypi-kuri.ts— Pi extension registering all Kuri tools (kuri_navigate,kuri_snap,kuri_screenshot,kuri_text,kuri_evaluate,kuri_click,kuri_type,kuri_fill,kuri_select,kuri_scroll,kuri_markdown,kuri_links,kuri_cookies,kuri_audit,kuri_new_tab,kuri_page_info,kuri_console_errors,kuri_screenshot_site)auto tab_id resolution, text fallback on SPAs, console error diagnostics
SKILL.md— pi agent skill (two-tier design: core + advanced on demand)scripts/kuri.js— Node.js CLI wrapper using built-in fetch (no deps)references/ADVANCED.md— symlink to canonical advanced reference (no drift)README.md— install, config, and quick start docsOWNER.md— maintainer's guide for publishing to pi.dev (npm workflow,version convention, troubleshooting)
Two-tier skill documentation
skills/pi-kuri-skills.md— core operations (navigate, screenshot, snap, extract)skills/pi-kuri-advanced.md— companion advanced reference (click, type,scroll, JS eval, cookies, audit, HAR)
references/ADVANCED.mdis a symlink to the canonical fileCLI fixes (from Copilot review)
close-tab all parse correctly)
/page/info(server endpoint)cmdTabNewcommand -vOther
readme.mdto reference both new skill filespackage-lock.jsongenerated from pi-kuri-plugin