Jrecos/omp-pstack / skills/poteto-mode
poteto-mode
Unverifiedpoteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
references/omp-control-ui.md
View on GitHub---
name: omp-control-ui
description: Packaged OMP adaptation of cursor-team-kit's control-ui skill. Build or adapt a local browser/CDP harness to drive and inspect a web, IDE, or Electron UI. Use for local UI verification, screenshots, accessibility snapshots, perf profiles, visual diffs, or reproducing UI bugs.
---
# Control UI
> Adapted from `cursor-team-kit/skills/control-ui/SKILL.md` at `cursor/plugins` commit `1b6d44ff26d4e242f4e8f68c391e6d2f7ca16def` (source SHA-1 `68484fd5418cc893a6bf40e0db45b3001dcf5947`). Cursor-specific tool references are translated to native OMP mechanics; the harness patterns and guardrails are preserved.
Use local browser automation to verify UI behavior with evidence. First reuse the repo's own Playwright, browser, or Electron harness if it exists; otherwise assemble a temporary local harness around the app's dev server or Chromium debug port.
## What It Is Used For
- Reproducing UI bugs that depend on real browser focus, keyboard input, scrolling, resizing, or rendering.
- Verifying visual or accessibility changes with screenshots and snapshots.
- Checking local web, IDE, or Electron behavior before shipping.
- Capturing console logs, network logs, CPU profiles, traces, or heap snapshots.
- Creating before/after evidence for verification claims.
## Setup Pattern
1. Start the app locally using the repo's documented dev command.
2. Discover existing local harnesses: Playwright tests, Cypress specs, Storybook, browser scripts, Electron launch scripts, or snapshot tools.
3. For a web app, connect to the local URL with the existing browser tooling.
4. For Electron/Chromium, enable a remote debugging port when supported.
5. Select the correct page by stable app markers, not by tab order alone.
6. Prefer accessibility roles, labels, and stable `data-*` selectors over coordinates.
## Native OMP Browser Tool
In an OMP session the built-in browser is the first-class harness: `browser.open` a named tab, drive it with the direct helpers (`observe`, `click`, `type`, `fill`, `press`, `scroll`, `select`, `screenshot`, `extract`), and run custom JavaScript through `tab.run`. It launches real Chromium, so screenshots and ARIA snapshots are genuine evidence.
- `tab.observe()` maps interactive elements to stable ids; act on `tab.id(...)` handles rather than CSS guessing.
- `tab.ariaSnapshot()` is the accessibility-snapshot evidence.
- `tab.run(code)` executes arbitrary JavaScript in the page for probes the helpers do not cover.
- Close tabs you opened with `browser.close` when done.
Prefer the native browser over a bespoke Playwright script for a single probe. Reach for a checked-in Playwright/Cypress harness or raw CDP when the repo's own suite, a persistent multi-page flow, or a profile capture needs it.
On OMP 18.10.2, native `action: "targets"` is available only through Tern or relay. Select an existing page with explicit `app.target` URL or title criteria. Verify a stable app marker after selection. Ordinary local or headless browser mode does not support target enumeration. Tern and relay target success remain unexercised in the native proof. Do not close user-owned tabs.
The SDK accepts anchored text and diff notes through `ctx.annotations.submit` without UI when `deliver: "none"`. Quote and raw-diff-line mismatches reject. The native proof covers two valid anchors and two rejections, not overlay collection or composer delivery. No current plugin consumer needs another review tool. Defer custom annotation integration and live overlay claims until a concrete caller and a supported TUI are available.
## Generic Web Harness
Use the repo's installed browser tooling when possible. If the repo already has Playwright, a minimal one-off probe looks like:
```javascript
import { chromium } from "playwright";
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
await page.goto("http://127.0.0.1:<port>");
await page.getByRole("button", { name: /submit/i }).click();
await page.screenshot({ path: "/tmp/ui-harness-after.png", fullPage: true });
await browser.close();
```
Do not add Playwright as a project dependency just for this probe unless the user asks. Prefer existing dev dependencies, the native OMP browser, or external browser tools already available in the environment.
## Generic CDP Harness
For Electron or a Chromium app launched with `--remote-debugging-port=<port>`, connect over CDP. The native OMP browser can attach to an existing CDP endpoint (`app.cdp_url`); a Playwright script attaching directly looks like:
```javascript
import { chromium } from "playwright";
const browser = await chromium.connectOverCDP("http://127.0.0.1:<debug-port>");
const pages = browser.contexts().flatMap((context) => context.pages());
let page;
for (const candidate of pages) {
if (await candidate.locator("<app-root-selector>").count()) {
page = candidate;
break;
}
}
if (!page) {
console.log(await Promise.all(pages.map(async (p) => ({
title: await p.title(),
url: p.url(),
}))));
throw new Error("No matching app page found");
}
await page.screenshot({ path: "/tmp/ui-harness-cdp.png", fullPage: true });
await browser.close();
```
Replace `<app-root-selector>` with a stable marker from the current repo, such as a root app node, landmark, or product-specific `data-*` attribute.
## Interaction Loop
1. Capture a page snapshot or screenshot before acting.
2. Choose a target from the latest page structure.
3. Perform exactly one structural action: click, type, keypress, drag, scroll, navigate, or resize.
4. Capture a fresh snapshot/screenshot.
5. Verify the expected state change.
6. Save artifacts for before/after comparisons when the user asked for proof.
## CDP Capabilities
Use raw CDP only when higher-level browser APIs are insufficient:
- Performance: CPU profiles, traces, paint flashing, FPS meter, layout shift inspection.
- Memory: heap snapshots and forced GC for leak investigations.
- Network: request blocking, throttling, cache disablement, request/response logs.
- Rendering: viewport changes, color scheme emulation, reduced motion, accessibility checks.
- Debugging: console streaming, exception capture, DOM snapshots.
## Page Selection
When multiple app windows/tabs share a debug port:
- Prefer a positive marker for the surface under test, such as an app root selector.
- Use a negative marker to avoid the wrong surface when necessary.
- If no page matches, list available page titles and URLs instead of guessing.
## Guardrails
- Do not rely on stale element references after navigation or structural changes.
- Avoid coordinate clicks unless a fresh screenshot was captured immediately before the click.
- Keep test data local and disposable.
- Do not store screenshots or heap snapshots from privacy-sensitive workspaces unless the user explicitly agrees.
- Do not hard-code selectors, ports, or script paths from another repository. Discover the current repo's local app markers.
- Clean up dev servers, debug sessions, and temp profiles when done. Close OMP browser tabs you opened; never close tabs the user owns.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |