Replacing Codex’s built-in web search tool with an HTML-to-Markdown skill (Defuddle) — Rejected

2026-11-30来源 dev.toEnglish

Idea

Reduce context usage when a prompt links to documentation by removing HTML tags.

The main assumption is that Codex’s built-in tool loads the page into context as-is, including the HTML tags.

Implementation

Install Defuddle, a great Node.js library that converts HTML to Markdown, globally and wrap it in a skill.

Tests

Run three sessions in an empty directory.

  • without runs with the skill disabled using codex -c 'skills.config=[{name="atolk-defuddle", enabled=false}]'.
  • with runs with the skill enabled.
  • The third session compares the results.

Test 1. With a task

It took many rounds of editing the prompt and skill definition to get Codex to use only the information on that page and stop searching the web for more context to complete the task.

First prompt

Read https://clickhouse.com/docs/guides/clickhouse/working-with-arrays and list all functions in a numbered table, providing a one-sentence description for each function. Use only the information available on this page. Make a single request with web search tool. Do not use search or follow any links or any kind of curl request.

Metric Without skill With skill
Fetch method Web tool (open) Defuddle
Fetch tool time 9.4 s 1.7 s
Total session time 30.1 s 26.1 s
Total tokens 44,631 44,502
Cached input 37,376 26,368
Uncached input 6,397 17,134
Output tokens 858 1,000

Test 2. Loading the page into context

Prompt

Load the content of webpage: https://clickhouse.com/docs/guides/clickhouse/working-with-arrays

Metric Without skill With skill
Fetch tool time 2.1 s 1.2 s
Total session time 8.9 s 22.6 s
Total tokens 43,725 44,136
Cached input 26,112 19,328
Uncached input 17,466 23,986
Output tokens 147 822

Conclusion

I saw no clear benefit. The built-in web search tool appears to be well optimized and to leave HTML tags out of the context.

原文:https://www.a8q9.cn/en/article/replacing-codex-s-built-in-web-search-tool-with-an-html-to-markdown-skill-defudd-895efa.html

相关文章