ui-reverse-engineering
UI Reverse Engineering
Reverse-engineer a live website into a React + Tailwind component.
agent-browseris the ONLY allowed browser tool. Execute all commands via the Bash tool. Never usemcp__puppeteer__*ormcp__playwright__*tools — they bypass session management, conflict withagent-browser, and violate project rules. This applies even after context compaction. Session rule: always pass--session <project-name>— default session is shared globally. Token rule: pipe largeevaloutput to a file, thenReadonly what you need:agent-browser --session <s> eval "<script>" > tmp/ref/<name>.jsonNever let large JSON (DOM trees, computed styles, frame arrays) print to stdout — it wastes tokens.
Read rule: Before
Read-ing any file >10KB, useGrepto find the specific lines needed. Never full-read large files just to find one value.Bash loop rule: After 10+ consecutive Bash calls, stop and read/analyze results before the next batch. Long chains without analysis = spinning in place.
Silent Bash rule: After any Bash with no output, verify the side effect:
ls -la <path>orecho $?. Never assume success from silence.Screenshot rule: Use
agent-browser --session <s> screenshot(no shell redirect). The command saves the image to its own path and prints the location. Never useagent-browser screenshot > file.png— shell redirect captures the CLI's text confirmation message, not image data, creating a corrupt file that poisons the session context when Read.