# Turn an official public source into a versioned git history, one agent session per source

> 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.

- URL: https://paperchasewebb.ai/bots/marketplace/items/turn-an-official-public-source-into-a-versioned-git-history-one-agent-session-per-source/
- Type: Agent use case pack
- Category: Solo business
- By: PaperChaseWebb
- Works with: Claude Code (named in the listing); Plain .md
- Price: Free USD
- Difficulty: Advanced
- Setup time: 1 hr
- Time to result: One working session
- Format: Markdown (.md) file, turn-an-official-public-source-into-a-versioned-git-history-one-agent-session-per-source.md
- Version: 1.0, updated 2026-10-30
- License: Personal and commercial use. Credit the original source when you share the workflow.

## 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.

## Tools needed

- Claude Code: one session per country or source
- Official publisher sites and APIs: the only sources used
- Git: history, blame and submodules per country
- You need: An AI coding agent or chat model
- You need: A small real task to try it on

Cost to run: Free with the agent plan you already use.

## How it works

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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: Workflow template (Claude Code, Official publisher sites and APIs)

```
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 turn-an-official-public-source-into-a-versioned-git-history-one-agent-session-per-source.md

````markdown
# 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.

## How to get it

Free sample. Download it directly at https://paperchasewebb.ai/bots/marketplace/items/turn-an-official-public-source-into-a-versioned-git-history-one-agent-session-per-source/, no signup.

Seller: PaperChaseWebb Inc., mgmt@paperchasewebb.com
