Hoard things you know how to do

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Willison argues that accumulating working code examples and feeding them to coding agents as prompts is a practical, repeatable way to build new tools quickly.

Read this as

Software developer Simon Willison advises engineers to hoard examples of things they have figured out how to do, saved as blog posts, notes and code repositories. When he wanted a tool that reads scanned PDFs in a browser, he gave a chatbot two of his old code snippets, one turning PDF pages into images, one reading text from images, and it combined them into a working tool. He says anyone building software can collect and reuse knowledge this way.

Willison's advice for teams adopting coding agents: build an institutional hoard of proven, working code examples, because agents perform best when asked to combine two or more examples that already work. His own tools.simonwillison.net collection began with an in-browser OCR tool built by prompting Claude 3 Opus with snippets of the Tesseract.js and PDF.js libraries. The cost is curation discipline, not tooling; the gain is faster prototyping without deep expertise in each library.

Willison describes an agentic prompting pattern: supply a coding agent with two or more verified working code samples and instruct it to combine them. His OCR tool example composes Tesseract.js (a WebAssembly build of Tesseract) for image text extraction with Mozilla's PDF.js for rendering PDF pages to images, prompted against Claude 3 Opus. He stores examples in his blog, TIL site, 1,000+ GitHub repos, an HTML tools collection, and the simonw/research repo of agent-generated reports.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Tesseract.js PDF.js Claude 3 Opus tools.simonwillison.net simonw/research

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading