frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Automatic documentation screenshots (with bounding-boxes) via codex

1•zenburnmyface•3mo ago
I'd like to share this great documentation trick with codex. Our product's documentation website has lots of screenshots of the UI, often with highlighted sections. I got codex to automate creating them whenever we added a new feature or they need updating.

Pre-requisites

- codex (maybe claude code, but I haven't tried it) - MCPs: chrome-devtools

- [browserframe.sh](https://gist.github.com/CamDavidsonPilon/f381cfbaf983949fdf4b62c6790a8c3b) installed locally

- ImageMagick 7 installed locally

- codex has read/write access to your documentation site (and ideally web frontend to better discover interactions, but maybe not necessary).

I use a custom prompt in ~/.codex/prompts to generate the following:

```

### Adding screenshots (Always do if there is a web UI component to the request)

1. Open http://localhost:3000 using chrome-devtools__navigate_page to open our local development website.

2. Find the page we need.

3. Take viewport screenshot: chrome-devtools__take_screenshot → scratch/screenshots/inventory.png.

4. If we need to highlight a button, or modal, or dropdown, etc:

  1. Run chrome-devtools__evaluate_script with getBoundingClientRect() on the element; record x, y, width, height.

  2. Query window.devicePixelRatio via chrome-devtools__evaluate_script (retina viewport → 2).
  3. Convert rect to image pixels by multiplying x, y, width, height by the devicePixelRatio; compute bottom-right as (x+widthy+height).

  4. Draw highlight bounding box with ImageMagick e.g.
     ```
     magick scratch/screenshots/input.png -fill none -stroke "#ff41ff" -strokewidth 9 -draw "rectangle 2613,144 2930,217"    scratch/screenshots/input_boxed.png.
     ```
     Add a bit of padding too.
5. Use the cli tool `browserframe` to put a frame around the screenshot. Example: ``` browserframe input.png -o input_framed.png ``` Don't use a title in `browserframe`.

6. Screenshots are committed as PNGs and grouped in sub-folders under `static/img/` (for example `static/img/user-guide/`).

7. When adding new screenshots, place the file in the matching doc-area subfolder and reference it with a relative path such as `/img/user-guide/<filename>.png`

8. Close the browser program completely when finished.

### Request

$ARGUMENTS

```

Then in codex, I run:

```

/prompts:add-documentation-for the screenshots in docs page X are out of date, please update. If we reference a element, button, etc., in the text, please highlight it when appropriate.

```

Example: https://docs.pioreactor.com/user-guide/create-cluster

1•douxx•28s ago

New wave of GLP-1 drugs is coming–and they're stronger than Wegovy and Zepbound

https://www.scientificamerican.com/article/new-glp-1-weight-loss-drugs-are-coming-and-theyre-stro...
1•randycupertino•1m ago•0 comments

Convert tempo (BPM) to millisecond durations for musical note subdivisions

https://brylie.music/apps/bpm-calculator/
1•brylie•3m ago•0 comments

Show HN: Tasty A.F.

https://tastyaf.recipes/about
1•adammfrank•4m ago•0 comments

The Contagious Taste of Cancer

https://www.historytoday.com/archive/history-matters/contagious-taste-cancer
1•Thevet•6m ago•0 comments

U.S. Jobs Disappear at Fastest January Pace Since Great Recession

https://www.forbes.com/sites/mikestunson/2026/02/05/us-jobs-disappear-at-fastest-january-pace-sin...
1•alephnerd•6m ago•0 comments

Bithumb mistakenly hands out $195M in Bitcoin to users in 'Random Box' giveaway

https://koreajoongangdaily.joins.com/news/2026-02-07/business/finance/Crypto-exchange-Bithumb-mis...
1•giuliomagnifico•6m ago•0 comments

Beyond Agentic Coding

https://haskellforall.com/2026/02/beyond-agentic-coding
2•todsacerdoti•7m ago•0 comments

OpenClaw ClawHub Broken Windows Theory – If basic sorting isn't working what is?

https://www.loom.com/embed/e26a750c0c754312b032e2290630853d
1•kaicianflone•9m ago•0 comments

OpenBSD Copyright Policy

https://www.openbsd.org/policy.html
1•Panino•10m ago•0 comments

OpenClaw Creator: Why 80% of Apps Will Disappear

https://www.youtube.com/watch?v=4uzGDAoNOZc
1•schwentkerr•14m ago•0 comments

What Happens When Technical Debt Vanishes?

https://ieeexplore.ieee.org/document/11316905
1•blenderob•15m ago•0 comments

AI Is Finally Eating Software's Total Market: Here's What's Next

https://vinvashishta.substack.com/p/ai-is-finally-eating-softwares-total
2•gmays•16m ago•0 comments

Computer Science from the Bottom Up

https://www.bottomupcs.com/
2•gurjeet•16m ago•0 comments

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
1•xeouz•18m ago•0 comments

You don't need Mac mini to run OpenClaw

https://runclaw.sh
1•rutagandasalim•18m ago•0 comments

Learning to Reason in 13 Parameters

https://arxiv.org/abs/2602.04118
1•nicholascarolan•20m ago•0 comments

Convergent Discovery of Critical Phenomena Mathematics Across Disciplines

https://arxiv.org/abs/2601.22389
1•energyscholar•21m ago•1 comments

Ask HN: Will GPU and RAM prices ever go down?

1•alentred•21m ago•0 comments

From hunger to luxury: The story behind the most expensive rice (2025)

https://www.cnn.com/travel/japan-expensive-rice-kinmemai-premium-intl-hnk-dst
2•mooreds•22m ago•0 comments

Substack makes money from hosting Nazi newsletters

https://www.theguardian.com/media/2026/feb/07/revealed-how-substack-makes-money-from-hosting-nazi...
5•mindracer•23m ago•0 comments

A New Crypto Winter Is Here and Even the Biggest Bulls Aren't Certain Why

https://www.wsj.com/finance/currencies/a-new-crypto-winter-is-here-and-even-the-biggest-bulls-are...
1•thm•23m ago•0 comments

Moltbook was peak AI theater

https://www.technologyreview.com/2026/02/06/1132448/moltbook-was-peak-ai-theater/
1•Brajeshwar•24m ago•0 comments

Why Claude Cowork is a math problem Indian IT can't solve

https://restofworld.org/2026/indian-it-ai-stock-crash-claude-cowork/
2•Brajeshwar•24m ago•0 comments

Show HN: Built an space travel calculator with vanilla JavaScript v2

https://www.cosmicodometer.space/
2•captainnemo729•24m ago•0 comments

Why a 175-Year-Old Glassmaker Is Suddenly an AI Superstar

https://www.wsj.com/tech/corning-fiber-optics-ai-e045ba3b
1•Brajeshwar•24m ago•0 comments

Micro-Front Ends in 2026: Architecture Win or Enterprise Tax?

https://iocombats.com/blogs/micro-frontends-in-2026
2•ghazikhan205•26m ago•1 comments

These White-Collar Workers Actually Made the Switch to a Trade

https://www.wsj.com/lifestyle/careers/white-collar-mid-career-trades-caca4b5f
1•impish9208•27m ago•1 comments

The Wonder Drug That's Plaguing Sports

https://www.nytimes.com/2026/02/02/us/ostarine-olympics-doping.html
1•mooreds•27m ago•0 comments

Show HN: Which chef knife steels are good? Data from 540 Reddit tread

https://new.knife.day/blog/reddit-steel-sentiment-analysis
1•p-s-v•27m ago•0 comments