Skip to content

Conversation

@sisyphus-dev-ai
Copy link
Collaborator

Summary

  • Adds dev-browser as a built-in skill, providing browser automation capabilities via Playwright
  • Extends BuiltinSkill type with GithubSkillSource and autoServer options for future dynamic loading
  • Full skill template with usage instructions embedded

What is dev-browser?

SawyerHood/dev-browser is a Claude Code skill that enables AI agents to control web browsers. Key features:

  • Persistent pages: Navigate once, interact across multiple scripts
  • ARIA snapshots: LLM-friendly DOM inspection with element refs
  • Dual modes: Standalone Chromium or connect to existing Chrome via extension

Usage

After installing prerequisites, users can invoke:

/dev-browser "go to localhost:3000 and verify the signup flow"

Prerequisites (for users)

git clone https://github.com/SawyerHood/dev-browser.git ~/.config/opencode/skills/dev-browser
cd ~/.config/opencode/skills/dev-browser/skills/dev-browser
npm install

Future Work

This PR lays groundwork for:

  1. GitHub Skill Fetcher: Auto-fetch skills from GitHub repos
  2. Auto-managed server lifecycle: Start server automatically on skill invocation
  3. Config-based enablement: { "skills": { "dev-browser": true } }

Files Changed

File Change
src/features/builtin-skills/templates/dev-browser.ts New skill template (MIT license attribution)
src/features/builtin-skills/types.ts Add GithubSkillSource interface and new optional fields
src/features/builtin-skills/skills.ts Register dev-browser in createBuiltinSkills()

Testing

  • bun run typecheck passes
  • bun run build passes

Closes #150

- Add dev-browser skill template with full usage instructions
- Extend BuiltinSkill type with GithubSkillSource and autoServer options
- Register dev-browser in createBuiltinSkills()

Based on SawyerHood/dev-browser (MIT License), this provides:
- Persistent browser pages across scripts via Playwright
- ARIA snapshots for LLM-friendly DOM inspection
- Support for standalone and extension modes

Users can invoke with /dev-browser command after installing prerequisites.

Closes #150
@greptile-apps
Copy link

greptile-apps bot commented Dec 30, 2025

Greptile Summary

Adds dev-browser as the first built-in skill for browser automation via Playwright, laying groundwork for future GitHub-based skill fetching.

Major Changes:

  • Extended BuiltinSkill type with GithubSkillSource interface and autoServer/source fields for dynamic loading infrastructure
  • Created comprehensive dev-browser skill template with usage instructions, API docs, and MIT license attribution
  • Configured allowedTools to restrict skill to specific bash commands for security

Key Implementation Details:

  • Template follows builtin pattern (no <skill-instruction> wrapper tags, unlike file-loaded skills)
  • Skill requires manual installation by users: clone repo to ~/.config/opencode/skills/dev-browser and run npm install
  • autoServer: true flag indicates future auto-managed server lifecycle (not yet implemented)
  • allowedTools restricts execution to Bash(npx tsx:*) and Bash(cd *dev-browser:*) patterns

Confidence Score: 5/5

  • Safe to merge - well-structured addition with proper attribution and no breaking changes
  • Clean implementation following existing patterns: builtin skills are correctly handled without wrapper tags, types properly extended with optional fields for backward compatibility, comprehensive documentation in template, and MIT license properly attributed
  • No files require special attention

Important Files Changed

Filename Overview
src/features/builtin-skills/types.ts Added GithubSkillSource interface and two optional fields (source, autoServer) to BuiltinSkill interface for future GitHub skill fetching
src/features/builtin-skills/skills.ts Registered dev-browser as first builtin skill with template, description, source metadata, and allowed tools configuration
src/features/builtin-skills/templates/dev-browser.ts New comprehensive skill template with usage instructions, API documentation, and MIT license attribution from SawyerHood/dev-browser

Sequence Diagram

sequenceDiagram
    participant User
    participant OpenCode
    participant BuiltinSkills as Builtin Skills Module
    participant SkillMerger as Skill Merger
    participant DevBrowser as dev-browser Template

    User->>OpenCode: Initialize plugin
    OpenCode->>BuiltinSkills: createBuiltinSkills()
    BuiltinSkills->>DevBrowser: Import DEV_BROWSER_SKILL_TEMPLATE
    DevBrowser-->>BuiltinSkills: Return template + metadata
    BuiltinSkills-->>OpenCode: Return [dev-browser skill]
    
    OpenCode->>SkillMerger: mergeSkills(builtinSkills, ...)
    SkillMerger->>SkillMerger: builtinToLoaded(dev-browser)
    Note over SkillMerger: No wrapper tags added<br/>(builtin behavior)
    SkillMerger-->>OpenCode: LoadedSkill with allowedTools
    
    User->>OpenCode: /dev-browser "task"
    Note over OpenCode: Skill execution restricted<br/>to allowed bash patterns
    OpenCode->>DevBrowser: Execute with template
    DevBrowser-->>User: Browser automation result
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser support

2 participants