open-data CLAUDE.md

Project instructions for CivicPatch's open-data repository, which stores YAML records about local government officials and validates them against defined data models.

In plain words
What is it for?
Use them when adding or updating government data, validating YAML files, or working with the repository's scraping and pull-request pipeline.
Why use it?
They explain where jurisdiction data belongs, how the files are structured, and how changes are checked before or after merging.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/civicpatch/open-data/claude-md
Clone the repo
git clone --depth 1 https://github.com/CivicPatch/open-data
Per session 853 This file is loaded in full into every session.
When invoked 853 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00853 $0.00853
Opus 5 $0.00426 $0.00426
Sonnet 5 $0.00171 $0.00171
Haiku 4.5 $0.00085 $0.00085

Measured yesterday against content hash 26cfd2fa6ea6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

open-data CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

open-data — Project Context

See root AI_CONTEXT.md for shared coding standards (via civicpatch-tools).

What this is

The canonical data repository for CivicPatch. Contains YAML files for municipal government officials, organised by state and jurisdiction. Pull requests to this repo are the primary output of the civicpatch scraping pipeline.

Project layout

data/
  <state>/
    local/
      <place_name>.yml    ← one file per jurisdiction; list of Official records
data_source/
  <state>/
    local/
      jurisdictions.yml         ← municipalities: list of known jurisdictions for the state
      <place_name>/
        pipeline_run_context.json   ← pipeline config/state for the jurisdiction
    state/
      jurisdictions.yml         ← state government (one entry)
    counties/
      jurisdictions.yml         ← county governments for the state
schemas.py                      ← Pydantic models: Jurisdiction, Office, Official
scripts/
  github_actions/               ← run in CI on PRs and post-merge
    validate_jurisdiction.py    ← validates YAML against schemas.py
    get_jurisdiction_folder.py
    pull_request_body_markdown.py
    local/
      pull_request/             ← scripts run locally to generate PR content
      post_merge/               ← scripts run locally after a PR is merged
  jurisdictions/                ← the pipeline that builds data_source/**/jurisdictions.yml
    config.py                   ← state registry: fips, name, census sources, scraper
    headers.py                  ← generates each jurisdictions.yml header (fields + provenance)
    yaml_io.py                  ← shared comment-preserving YAML load/dump
    states.py                   ← fetch state government jurisdiction for a state
    counties.py                 ← fetch + enrich county jurisdictions for a state
    local.py                    ← fetch + enrich municipality jurisdictions for a state
    run.py                      ← orchestrator: state → counties → local → maps → tiles
    scrapers/                   ← per-state Wikipedia scrapers + wikipedia_utils
    maps/                       ← geo utilities (local.py, county.py, state.py) + tiles
  ocdids/                       ← OCD-ID parsing (parse.py) and repair (fix.py)
  track_progress/               ← data quality dashboards and gap analysis
  one_off/                      ← completed migrations, kept for reference
  paths.py                      ← PROJECT_ROOT anchor; never recompute it from __file__

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 79 lines · 853 tokens per session scan A 26cfd2fa6ea6

Subscribe to this mod's changes

open-data CLAUDE.md is an instructions file published in the GitHub repository CivicPatch/open-data (5 stars, last pushed 4d ago), licensed CC0-1.0. It adds 853 tokens to every session, about $0.0043 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.