| name | pseudo-agentic-automation |
| description | Run an authorized browser or native-GUI workflow that requires runtime observation and adaptive interaction rather than a deterministic API, shell command, or existing test runner. Use for dynamic authenticated flows, browser extraction, or native GUI control; exclude ordinary Playwright test execution and deterministic file/API work. |
Pseudo-Agentic Automation
Quick Index (Action-Routed)
Read First (All Actions)
Overview
Preconditions
Use This Skill When / Do Not Use This Skill When
Action Modules (Read As Needed)
- Running automation loops:
Execution Loop
Tool Guidance
- Hardening runtime behavior:
Robust Patterns
Pitfalls
Security and Ops
Output
Deliverable Format
Overview
Use this skill for browser and GUI automation tasks that need iterative script execution, debugging, and adaptation.
Use Scripted Command Execution for simple command chains, setup tasks, and deterministic local operations.
If the request can be solved with deterministic shell commands alone, switch to that skill.
Preconditions
Before execution:
- confirm automation target and success criteria
- confirm target-specific authority and required credentials/access are available
- confirm whether headless or headed mode is appropriate
- confirm any legal/terms constraints for scraping/automation
- confirm whether the workflow writes, messages, purchases, submits, deletes, or changes external state
- operate locally by default; require explicit authority for every external effect
Use This Skill When
- The target is a dynamic/authenticated website.
- No stable API exists.
- Browser rendering and interaction requires adaptive observation beyond an existing deterministic test runner.
- Native GUI control is required and direct shell actions are insufficient.
Do Not Use This Skill When
- A static file can be fetched directly.
- A straightforward REST API call solves the request.
- The task is simple local shell/file work.
- An existing deterministic browser test already covers the requested behavior.
Execution Loop
- Derive the goal, constraints, and effect boundary from the active task contract.
- Prepare minimal runtime dependencies.
- When file writes are authorized, write minimal scripts that output machine-readable success data and rich failure diagnostics.
- Execute scripts.
- Inspect logs/artifacts and iterate.
- Stop after bounded retries and escalate with concrete failure evidence.
Retry budget:
- default max retries: 3
- if blocked by CAPTCHA/anti-bot twice, switch to human-handoff flow
- if selectors keep failing with no stable anchors, escalate with captured artifacts
Tool Guidance
browser-use: for highly dynamic pages with unstable selectors.
Playwright: for deterministic browser automation and structured extraction.
Puppeteer: for Node-centric automation or PDF-heavy workflows.
PyAutoGUI: fallback only; coordinate-based and fragile.
PyWinAuto / Appium: preferred for semantic native UI automation where available.
Robust Patterns
- Log precise failure context to
stderr (URL, selector, compact DOM snapshot).
- Always close browser/resources in
finally.
- Keep large outputs in an authorized project artifact or temporary file (JSON preferred), then read and remove or retain them according to the task contract.
- On CAPTCHA/challenges, switch to headed mode and perform explicit human handoff.
Pitfalls
- Infinite retries: cap attempts.
- Zombie processes: always clean up child processes.
- Headless detection: switch to headed mode when anti-bot behavior appears.
- Fragile selectors: prefer role/text/test-id over dynamic classes.
Security and Ops
- Run scripts in project-local or temporary directories.
- Keep credentials in environment variables.
- Minimize dependency-install side effects.
- Never print or persist credentials, session tokens, or sensitive page content unnecessarily.
- Stop before an unapproved external write, purchase, message, submission, deletion, or permission change.
- Treat CAPTCHA and anti-bot controls as a human-handoff boundary, not a bypass target.
Deliverable Format
When applying this skill, provide:
- target and completion criteria
- script/run summary
- authorized artifact locations when any logs, screenshots, or outputs were retained
- pass/fail outcome
- blockers and next action
Related Skills