Hide your slop PR descriptions behind
Simon Willison finds a way to hide lengthy AI-generated PR descriptions, making them easier to read. This method helps to avoid overwhelming readers with too much information.
Original reporting · simonwillison.net
Read “Hide your slop PR descriptions behind” at Simon Willison →
How this was written. GDS wrote this article with a language model from Simon Willison’s reporting (model: @cf/meta/llama-3.3-70b-instruct-fp8-fast); it describes that reporting rather than adding to it. The original, linked above, is the full story.
Key points from Simon Willison’s report
- Simon Willison uses coding agents to generate pull requests, but finds the descriptions too lengthy and detailed.
- He uses the HTML <details><summary> elements to hide the lengthy descriptions and provide a brief summary.
- This approach makes it easier for readers to quickly understand the PR and choose to expand it if they want more information.
- Simon Willison promises that the short introduction will represent his human judgement as to what is worth the reader's time.
- He has used this pattern in recent PRs and finds it helpful in avoiding overwhelming readers with too much information.
Simon Willison has been using coding agents like Claude Code or Codex to generate pull requests (PRs) for his projects. These agents are great at writing PR descriptions, but they often include too much information, making them difficult to read. According to Simon Willison, the problem is that the descriptions are too accurate and comprehensive, which can be overwhelming for readers.
The issue with AI-written PR descriptions is that they can be too detailed, causing readers to feel put off by the amount of information. Simon Willison reported that his instant reaction to such descriptions is to not read them, even if the information is useful. He prefers to have a human-approved introduction that provides a high-level understanding of the PR.
Simon Willison has found a solution to this problem by using the HTML <details><summary> elements to hide the lengthy descriptions. This allows readers to see a brief summary of the PR and choose to expand it if they want more information. The code for this feature is supported in GitHub Markdown, making it easy to implement.
The <details><summary> elements render as a collapsed heading that can be expanded to view the larger piece of text. Simon Willison uses this feature to provide a high-level explanation of the PR, often including a screenshot to illustrate the new feature. The full agent-written description is then hidden in the <details> section, making it easier for readers to quickly understand the PR.
Simon Willison has started using this method for his AI-generated pull requests, and it has made a significant difference in how he presents information. He promises that the short introduction will represent his human judgement as to what is worth the reader's time. This approach helps to avoid overwhelming readers with too much information and makes it easier for them to understand the PR.
Simon Willison has provided examples of how he has used this pattern in recent PRs, including the opener he used for each one. These examples demonstrate how the <details><summary> elements can be used to provide a clear and concise summary of the PR, while still allowing readers to access more detailed information if needed.
Simon Willison also shared a trick for remembering the order of the <details> and <summary> tags. He suggests referring to them as 'details-summary', which is easier to remember than the alternative 'summary-details'. This trick has helped him to avoid mistakes when using these tags.
Questions and answers
What is the problem with AI-generated PR descriptions?
The problem is that they are too accurate and comprehensive, making them difficult to read and overwhelming for readers.
How does Simon Willison solve this problem?
He uses the HTML <details><summary> elements to hide the lengthy descriptions and provide a brief summary.
What is the benefit of using the <details><summary> elements?
It makes it easier for readers to quickly understand the PR and choose to expand it if they want more information, avoiding overwhelming them with too much information.

