Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This plugin is built on a new feature I added to my LLM command-line tool yesterday called "fragments", designed to make LLM a better tool for working with long context LLMs like Gemini and Llama 4. I described fragments in the annotated release notes here: https://simonwillison.net/2025/Apr/7/long-context-llm/

Normally fragments are specified using filename or URLs:

  llm -f https://simonwillison.net/robots.txt "explain this policy"
Or:

  llm -f setup.py "convert to pyproject.toml" -m claude-3.7-sonnet
I also added a plugin hook that lets you do this:

  llm install llm-hacker-news
  llm -f hn:43615912 -s 'summary with illustrative direct quotes'
Here the plugin acts on that hn: prefix and fetches data from the Hacker News API, then applies the specified system prompt against LLM's default model (gpt-4o-mini, unless you configure a different default).

I wrote more about the Hacker News plugin here: https://simonwillison.net/2025/Apr/8/llm-hacker-news/

It uses the Algolia JSON API https://hn.algolia.com/api/v1/items/43615912 and then converts that into a (hopefully) more LLM-friendly text format.

Another neat fragments plugin is this one, which grabs a full clone of the specified GitHub repository and dumps every non-binary file in as a fragment at once: https://github.com/simonw/llm-fragments-github

Example usage:

  llm install llm-fragments-github
  llm -f github:simonw/files-to-prompt 'suggest new features for this tool'


    llm -f https://news.ycombinator.com/reply?id=43621396&goto=item%3Fid%3D43620125%2343621396 "summarize the comment"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: