logoalt Hacker News

simonwyesterday at 2:37 PM5 repliesview on HN

I think the most interesting skill here is the control-browser one: https://codex-tool-reference.simonw.chatgpt.site/skills/cont...

It tells ChatGPT Work how to launch a Playwright instance via its Node.js REPL, and tells it to run:

  nodeRepl.write(await browser.documentation());
To get further instructions.

That method returns this text with full details about how to use the browser: https://codex-tool-reference.simonw.chatgpt.site/skills/cont...

I'd love to know why it's defined like that, as opposed to including all of the instructions directly in the skill Markdown file.


Replies

jw1224yesterday at 4:12 PM

I've used a similar technique with my own tools. It helps to save context overall, by deferring the detailed instructions not only to when they're needed, but also to where they're needed.

Simply loading the browser Skill alone, doesn't always mean a browser is actually necessary (or supported). The user might've want them to control their main desktop browser; or the user might be pointing them toward a read-only HTML file that doesn't need rendering; or the sandbox might prevent network access; etc...

Codex is especially 'keen' to use Skills (especially by comparison to Claude), I often see it load Skills which it doesn't go on to use, because the main Skill content says "when not to use this". So I'm sure this is a product design decision to help with those kinds of circumstances.

lanyard-textileyesterday at 3:24 PM

It's runtime dependent on the browser being used! A skill file wouldn't be able to have this dynamically injected for the browser that's about to be used.

Skill file could indicate general instructions for all browsers. This provides guidance for the browser that's about to actually be used.

tomrodyesterday at 5:01 PM

Two sources of truth, if playwright updates?

Honestly, this is one of the things OpenAI does pretty well, I think, these tiny design decisions that you wouldn't notice until it becomes super annoying.

newswasboringyesterday at 2:57 PM

I'm guessing, but can be because then the skill will always fetch the latest docs.

show 1 reply
GrinningFoolyesterday at 7:54 PM

That's a pattern I often follow - refer it to the docs, don't include them. Usually it's another markdown, but sometimes it can be the output of something else. This avoids including any of that in context before it's actually needed.