Prompt to build site-wide Markdown and llms-full.txt from an export
This prompt asks an AI assistant to read every HTML page in your exported folder, keep the main content, write one Markdown file per page, and combine them into llms.txt, an index of links, and llms-full.txt, the full text. It skips error and utility pages and never edits the exported HTML.
Last reviewed
Key facts
- An export is already static HTML, so every page can be converted offline with no crawl.
- llms.txt is a short index. The proposal at llmstxt.org describes a title, a summary and sections of links.
- llms-full.txt is a common convention for the full text. The proposal does not define it, and WebExport's own site serves both files.
- Test status: not run end to end. The assistant-written converter was not run on an export, and the Firecrawl scrape fallback was not run either.
The prompt
Paste this into Claude Code, Cursor, Codex or another AI coding assistant with your project folder open, and replace everything in square brackets first. See how to run it in each tool.
You are building a Markdown copy of a static site and the llms.txt files from it. The exported site is in [EXPORT_FOLDER]. Its public address will be [LIVE_DOMAIN, for example https://example.com].
READ
- Every .html file under [EXPORT_FOLDER], except pages listed in [SKIP_PATHS: 404, login, thank-you, cart].
- Do not read anything outside that folder.
STEP 1: CONVERT
For each page, keep only the main content: the article or main element if there is one, otherwise the body without navigation, header, footer, cookie banners and scripts. Convert it to Markdown that keeps headings, lists, tables, links and image alt text. Make links absolute with [LIVE_DOMAIN].
Write each page to [OUT_DIR: ./markdown] using the same path as the page, with a .md extension. Start each file with frontmatter: title, url and description.
STEP 2: llms.txt
Write llms.txt in this order: a first line starting with # and the site name, a line starting with > that summarizes the site in one sentence taken from the home page, then sections with ## headings, each a list of links in the form - [Page title](url): one line taken from the page's meta description.
STEP 3: llms-full.txt
Write llms-full.txt with every converted page in sitemap order, each starting with a # heading of its title and its URL.
STEP 4: REPORT
Write MARKDOWN-REPORT.md with the page count, pages skipped and why, pages with fewer than 50 words of content, total size of llms-full.txt in KB, and any page where conversion looked wrong.
RULES
- Do not modify, move or delete any exported file.
- Do not write a description that is not on the page. Leave it empty if there is none.
- Do not include text from navigation or footers in llms-full.txt.
- Put the output files in [OUT_DIR] and the two llms files at the project root, not inside [EXPORT_FOLDER].How to run it
- Unzip the export into a folder and decide which utility pages to skip.
- Send the prompt with the folder and the final domain filled in.
- Open three converted files next to their pages and check that headings and links survived.
- Copy llms.txt and llms-full.txt to the site root when you deploy, and fetch them from the live domain.
What goes into each file
| File | Contents | Size |
|---|---|---|
| markdown/*.md | One page each, with frontmatter and absolute links | About the size of the page text |
| llms.txt | Site name, one-line summary, sections of links with short descriptions | A few KB for a small site |
| llms-full.txt | Every page's text in one file | Grows with the site. Report it in KB. |
For the index format, follow the llms.txt proposal. If the site already has an llms.txt, the generate llms.txt prompt covers the index on its own.
The Firecrawl path
If you have no export folder, a scrape returns a live page as markdown, and onlyMainContent is on by default, which the docs describe as a filter on the HTML with no AI model involved. Use map to list the pages first. One credit per scrape and one per map call is the figure on the billing page. From an export folder you do not need any of this.
curl -s -X POST https://api.firecrawl.dev/v2/scrape \
-H "Authorization: Bearer $FIRECRAWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/pricing","formats":["markdown"],"onlyMainContent":true}'Verify the result
Check the counts, the first lines of the index and that every link in it works.
find exported-site -name "*.html" | wc -l
find markdown -name "*.md" | wc -l
head -8 llms.txt
grep -o '(https\?://[^)]*)' llms.txt | tr -d '()' | head -5 | xargs -n1 curl -s -o /dev/null -w "%{http_code} %{url}\n"
wc -c llms-full.txt- The Markdown file count equals the HTML page count minus the pages you skipped.
- llms.txt starts with a # title and a > summary, and every link returns a 200 once deployed.
- llms-full.txt contains no menu text or cookie banner text.
What can go wrong
- Pages that draw text with JavaScript convert to almost nothing. The report lists pages under 50 words so you can see them.
- Tables and code blocks can lose structure in conversion. Spot-check a page that has one.
- A large site makes a very large llms-full.txt. Split it by section if it grows past what you want to serve.
Frequently asked questions
Do I need both llms.txt and llms-full.txt?
No. llms.txt is the short index from the proposal. llms-full.txt is optional and gives a reader or an agent all the text in one request.
Will this change my search ranking?
We found no documentation that says so. It makes your content easy for tools to read, which is a separate goal from ranking.
Why make links absolute?
The Markdown file leaves its folder and is read on its own, so relative links would point nowhere.
Can the Markdown files double as a content backup?
Yes, for text. Images and layout are not included, so keep the export ZIP as the real backup.
Official documentation
Free tools for this job
- Website MD File GeneratorConvert any webpage into a clean Markdown file optimized for AI ingestion.
- Markdown ConverterConvert files, pasted text, webpage content, Notion, and Google Docs into Markdown.
- Sitemap URL ExtractorExtract all <loc> URLs from sitemap files, including sitemap index files.
- AI FAQ GeneratorGenerate structured FAQ sections from a topic or URL for your website.
Start with the files
Prompts work best on a WebExport download of your site. Paste your public URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.