Turn an official public source into a versioned git history, one agent session per source
by PaperChaseWebb
A builder used separate Claude Code sessions, one per country, to download every version of each law from official publishers and write it out as git history with one commit per change on its in-force date. Each session checked robots.txt and the terms first, and two independent builds had to match hash for hash.
- Price
- Free
- Difficulty
- Advanced
- Setup
- 1 hr
- Format
- .md file
turn-an-official-public-source-into-a-versioned-git-history-one-agent-session-per-source.md · 3 KB · direct download, no signup
What you end up with
The pattern fits any regularly updated public dataset: one session per source, terms checked before any download, and a reproducible build you can prove.
What you get
- A plain-language summary of the workflow
- A fill-in prompt template
- What to watch out for
- A link to the original source
Who it is for
Builders who already use AI agents and want a proven workflow they can copy into their own project.
Works with
Solid chips: the agent is named in this listing's own tools list. Dashed chip: Plain Markdown, so it also pastes into other agents such as Grok Bot, Hermes, OpenClaw or Muse. We list those as compatible by format only, not as tested.
Tools needed
Cost to run: Free with the agent plan you already use.
Time to result: One working session
How it works
Pick one official source and give it its own agent session
Pick one official source and give it its own agent session.
Expected: Done before you move to the next step.
Have the session read robots.txt and the terms of use and stop if reus
Have the session read robots.txt and the terms of use and stop if reuse is not allowed.
Expected: Done before you move to the next step.
Write a downloader that fetches every version with its effective date
Write a downloader that fetches every version with its effective date.
Expected: Done before you move to the next step.
Write each version as a git commit dated to when it took effect
Write each version as a git commit dated to when it took effect.
Expected: Done before you move to the next step.
Run the build twice from scratch and compare hashes before trusting it
Run the build twice from scratch and compare hashes before trusting it.
Expected: Done before you move to the next step.
Keep a shared notes file where sessions record edge cases they find
Keep a shared notes file where sessions record edge cases they find.
Expected: Done before you move to the next step.
Sample prompt from the pack
Apply this workflow to [your project]: 1. Pick one official source and give it its own agent session. 2. Have the session read robots.txt and the terms of use and stop if reuse is not allowed. 3. Write a downloader that fetches every version with its effective date. 4. Write each version as a git commit dated to when it took effect. 5. Run the build twice from scratch and compare hashes before trusting it. 6. Keep a shared notes file where sessions record edge cases they find. Stop and ask me before anything irreversible: deploys, payments, sends or deletes.
Adapted by PaperChaseWebb. Not the original author's prompt.
Free preview of the file
# Turn an official public source into a versioned git history, one agent session per source PaperChase agent use case (free feed entry), version 1.0. Source: [u/SnooPeripherals5313 (lexifina/global-law)](https://www.reddit.com/r/ClaudeCode/comments/1xiv13m/using_claude_to_put_all_global_law_into_git/), 2026-10-29. ## What they did Each session read one publisher's site or API, confirmed robots.txt and the terms of use, and wrote a downloader that rebuilds past versions, including by applying amending acts in order where only those are published. Sessions shared edge cases with each other, such as dates before 1970 and daylight-saving quirks. Countries are combined as git submodules, and the build script is checked by running it twice and comparing hashes. ## Worth knowing The pattern fits any regularly updated public dataset: one session per source, terms checked before any download, and a reproducible build you can prove. Check that the publisher allows reuse before you publish a copy.
Worth knowing
- The pattern fits any regularly updated public dataset: one session per source, terms checked before any download, and a reproducible build you can prove. Check that the publisher allows reuse before you publish a copy.
- Figures are as reported by the original author and were not re-measured by us.
Questions
Where does this come from?
A public post credited to u/SnooPeripherals5313 (lexifina/global-law). Source: https://www.reddit.com/r/ClaudeCode/comments/1xiv13m/using_claude_to_put_all_global_law_into_git/
Is it free?
Yes. Feed entries are free to read and download.
Details
Version 1.0 · Updated Oct 30, 2026 · Markdown version of this page
License: Personal and commercial use. Credit the original source when you share the workflow. Download terms
Related

AGENTS.md, CLAUDE.md and Cursor rules starter files
Six fill-in instruction files for coding agents (base, Next.js plus Supabase, FastAPI, browser game, CLAUDE.md pointer, scoped Cursor rules), an Approvals section that makes the agent stop and wait for your yes, a table of what Grok Bot, Claude Code, Codex, Hermes and Cursor each read, a read-only checker for your rule files and 9 prompts to write, trim and test your own.

Ask-first rules for AI agents: hard nos, approval cards and a test set
Paste-in rules that make an agent ask before it sends, spends, posts or deletes, define what a real yes is, and stop retries after a no, plus 12 test scenarios to check it.