QQ Browser Automation CLI
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @tencent-adm/qqbrowser-skill.
About this skill
Problem Background
When AI agents operate web browsers, they often face challenges such as insufficient isolation between task execution environments, difficulty reusing repetitive operations, and inefficiency in manual intervention. For instance, one-off web data scraping may require a clean browser context to start quickly, while routine form submissions or data monitoring tasks benefit from recorded scripts to avoid rewriting automation code. QQBrowserUse, a browser automation CLI designed specifically for AI agents, aims to address these concrete issues: it encapsulates each task in an isolated Chrome Tab Group, ensuring environmental separation, while offering two modes—live automation and reusable playbook replay—to adapt to different scenarios.
Core Capabilities and Workflow
QQBrowserUse centers on a command-line interface for browser control, with its main workflow revolving around session management, task recording, and replay:
- Session Isolation and Startup: All operations must be wrapped between
browser_start_sessionandbrowser_end_session, ensuring each task runs in a separate Chrome Tab Group to avoid cross-task interference. The session can be started with the--initialUrlparameter to navigate directly to a target page, streamlining initialization. - Task Detection and Branching Decision: After every session start, calling
playbook_listis mandatory to check for existing reusable playbooks. Based on the match result, tasks branch into different paths: - Branch A (Playbook Matched): Use
browser_replayto replay an existing playbook directly, suitable for repetitive tasks. Replays may take up to 10 minutes—be patient and avoid interruption. - Branch B (No Playbook + User Requests Recording): Wrap manual operations with
task_beginandtask_endto record processes and generate reusable playbooks. Before recording, refer toreferences/playbook.mdto ensure quality. - Branch C (No Playbook + No Recording Request): Perform one-off manual operations without recording commands, ideal for ad-hoc tasks.
- Key Automation Commands: Include navigation (e.g.,
browser_go_to_url), snapshot parsing (browser_snapshot --markdownreturns clean Markdown content), element interaction (e.g.,browser_click,browser_input_textusing semantic locators), and data extraction (viabrowser_eval_content_jsto obtain structured JSON). Element indices from snapshots (like2_sfli_qp0u) must be regenerated after each navigation to maintain accuracy. - Safety and Verification: For tasks with real-world side effects (e.g., form submissions, message sending), verify target consistency, variable completeness, and user authorization before replay. If human verification steps such as CAPTCHA, SMS codes, or MFA are encountered, pause automation and wait for manual completion.
Applicability Boundaries and Considerations
While QQBrowserUse offers robust automation capabilities, note the following boundaries and limitations when using it:
- Platform Support: Only available on Linux x86_64, Windows, and macOS; other architectures like ARM are not supported.
- Session Lifecycle:
browser_end_sessionmust be called at the end of every task, regardless of success, failure, or interruption, to prevent session resource leaks—similar to afinallyblock in programming for cleanup. - Task Recording Conditions: Only use
task_begin/task_endwhen the user explicitly requests recording (e.g., trigger words like "record this" or "save as script"); otherwise, default to Branch C for one-off operations. - Replay Risks: Playbook replays are often non-idempotent, especially for submission operations; repeated replays may cause duplicate side effects. On failure, analyze errors rather than retry blindly.
- Data Extraction Methods: Choose appropriate methods based on context:
browser_snapshot --markdownsuits one-time content reading, whilebrowser_eval_content_jsis for structured data extraction or recording scenarios to ensure compatibility.
In summary, QQBrowserUse provides AI agents with an isolatable and reusable browser automation framework through CLI commands, but its effectiveness depends on correctly understanding the workflow and limitations. In practice, carefully select operation branches based on specific tasks and always follow security best practices.
Use Cases
- Test engineers need to automatically log into multiple test environments, execute regression test cases, and capture page performance metrics for analysis reports.
- Data analysts want to extract product prices and inventory information from dynamically loaded e-commerce websites for daily market trend analysis.
- Operations staff must regularly monitor competitor websites for content updates, using recorded scripts to automatically log in and scrape changes in specified areas.
- Developers conducting cross-platform compatibility tests use session isolation to operate multiple browser instances simultaneously, avoiding state interference.
Best For
- Test engineers: Need to automate repetitive browser operations for website testing and generate reusable scripts to reduce manual work.
- Data scientists: Aim to extract structured data from complex web pages for machine learning model training or real-time data analysis.
- Operations engineers: Responsible for monitoring online service status, requiring regular browser checks of key metrics and anomaly logging.
- Product managers: Need to quickly prototype and validate user interaction flows, generating shareable demo playbooks by recording operations.
Related Skills
Run a grilling session to interact with or test AI agents.
A systematic prompt optimization skill that refines prompts using a four-step distillation framework (diagnose, structure, think, compress) and methodologies from four prompting masters.
Quickly converts a user's input, list, or screenshot into a multi-page workbench, supporting template selection, custom builds, and responsive layouts.
HeartFlow is a pure rule-based discrimination layer for AGI that checks AI outputs for correctness and safety before they reach humans.