If you're up for trying something a bit fresh, I've been working on something that helps in this space. Check out: https://zshot-app.com/for/agents/
You'll have to sign up for a trial to do this, but you can just have your coding agent drive a session and just ask it to install the zshot skill, then drive a session and record a puppeteer script for you. If you try it out, love to hear what you think.