sourcecoop
Skill8 starsChanged 4 months agoApache-2.0View on GitHub
Upload geospatial data to Source Cooperative with proper metadata and READMEs using Portolan CLI.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- isaaccorley/geospatial-skillstheir own version, first seen Mar 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- isaaccorley/geospatial-skills★ 78same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- git-backed-catalogSkill
- portolan-bootstrapSkill
- portolan-cliSkill
- portolan-migrateSkill
- portolan-thumbnailsSkill
- reading-portolanSkill
- register-catalogSkill
- report-catalog-issueSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 24
If no credentials exist, the user with automated access sets them up in Step 2.
- Very specific: line 32
Write metadata: contact, license, providers, source_url.
- Distinctive: line 34
Run the validator locally.
- Distinctive: line 39
Ask the user for:
- Very specific: line 88
Add --pmtiles for vector collections so the catalog provides a render path (PORTO-CORE-065).
- Very specific: line 118
Never hand-edit a generated README.
- Distinctive: line 147
Read the PTL rule ids in the output.
- Very specific: line 158
After the push, probe the published host.
- Very specific: line 179
Check ~/.aws/credentials under [source-coop].
- Very specific: line 180
Check that PORTOLAN_REMOTE matches the assigned prefix exactly.
- Very specific: line 203
Run portolan metadata validate.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- drift: depends-on: portolan-cli, rashid, portolan-spec -->Source Cooperative Upload Skill
You are helping a user publish a Portolan catalog to Source Cooperative, an open data commons for geospatial data. This skill covers the upload path. To build the catalog from a data source, use the portolan-bootstrap skill first, then return here.
The Portolan spec is ground truth. The CLI and the validator implement it. Run portolan <cmd> --help for the flags of any command below. Do not restate the help text in your answers.
Prerequisites
Source Cooperative requires automated access for programmatic uploads. Check for it before anything else:
grep -l "source" ~/.aws/credentials 2>/dev/null \
|| echo "No source profile found"
portolan config listIf no credentials exist, the user with automated access sets them up in Step 2. The user without access requests it at hello@source.coop.
Workflow Overview
- Gather the organization and product names.
- Set credentials in
.env. - Initialize the catalog with a license.
- Add files.
- Write metadata: contact, license, providers,
source_url. - Generate READMEs and write
AGENTS.md. - Run the validator locally.
- Push, then probe the published host.
Step 1: Gather Information
Ask the user for:
- The Source Cooperative organization slug (required). Examples:
nlebovits,radiant-mlhub,vida. - The product name (optional). Defaults to the current directory name.
Build the remote URL:
s3://us-west-2.opendata.source.coop/{org}/{product}/Step 2: Credential Setup
The CLI refuses to store remote, profile, and region in .portolan/config.yaml. That file is pushed with the catalog. Put them in .env at the catalog root or in PORTOLAN_REMOTE and PORTOLAN_PROFILE environment variables.
# ~/.aws/credentials needs a profile named "source-coop"
# with the key pair from the Source Cooperative dashboard.
cat > .env << 'EOF'
PORTOLAN_REMOTE=s3://us-west-2.opendata.source.coop/{org}/{product}/
PORTOLAN_PROFILE=source-coop
EOF
portolan config listSource Cooperative issues temporary credentials. When an upload fails with an auth error, refresh the key pair from the dashboard.
Step 3: Initialize Catalog
portolan init requires a license. With --auto and no --license, it exits with PRTLN-VAL004. Every collection inherits the catalog license, and portolan add refuses a collection without one.
portolan init --title "{product_title}" --auto --license CC-BY-4.0
portolan infoinit writes catalog.json, AGENTS.md, and README.md beside each other, linked with rel: agents and rel: describedby (PORTO-CORE-005, PORTO-CORE-061, PORTO-CORE-062). It also writes versions.json. That file is a CLI artifact, not part of the spec.
Step 4: add files
Files must sit in collection subdirectories. Files at the catalog root are skipped.
mkdir -p buildings
mv *.parquet buildings/
portolan add .Add --pmtiles for vector collections so the catalog provides a render path (PORTO-CORE-065). The CLI writes the PMTiles as a rel: pmtiles link with a pmtiles:layers array (PORTO-FMT-011) and a default style asset under styles/.
Step 5: write metadata
portolan metadata init writes a .portolan/metadata.yaml template at every STAC level. portolan metadata validate requires contact.name, contact.email, and license. The CLI requires no other field. The spec requires more.
Fill these fields at every level:
contact: name and email of the maintainer.license: an SPDX identifier.providers: at least oneproducer, the organization that created the data (PORTO-CORE-047). Thehostis whoever maintains this catalog, not AWS or Source Cooperative. Leave the host out and the CLI derives it fromcontact. The host needs aurlor anemail(PORTO-CORE-051).source_url: the page the data came from.
Most Source Cooperative uploads are mirrors. The producer and the host differ. For a mirror, the spec requires a via link of type text/html to the original source (PORTO-CORE-053) and a top-level updated field set at each sync (PORTO-CORE-057). The CLI derives both from providers and source_url when you run portolan add. When the source publishes its own STAC catalog, add a canonical link to that STAC root as well (PORTO-CORE-054).
Temporal defaults for items without a date live under defaults.temporal in the same file. There is no temporal_extent key.
Recommended fields: keywords, citation, attribution, processing_notes, and known_issues.
portolan metadata init
portolan metadata validateStep 6: Generate READMEs and write AGENTS.md
portolan readmeNever hand-edit a generated README. Edit .portolan/metadata.yaml and regenerate. PORTO-CORE-063 requires four things in the README:
- the title
- the description
- the license
- the data provenance
AGENTS.md is not generated from metadata. The CLI scaffolds a stub. Replace the stub at the catalog and at every collection with real content. Describe the data, explain how the files connect, and show queries you ran against the data. Follow the portolan-bootstrap skill and specs/best-practices/documentation.md for what belongs there.
Linking to Source Cooperative
Source Cooperative serves the same objects under two hostnames. source.coop renders a page a person can read. data.source.coop returns raw bytes.
source.coop: the human-facing host. Use it inmetadata.yamllinks, STACdescriptionfields, generated READMEs, and issue and pull request bodies.data.source.coop: STAC assethrefvalues,curl, DuckDBread_parquet(), anything a client resolves programmatically.
https://source.coop/{org}/{product} # human-facing page
https://data.source.coop/{org}/{product}/catalog.json # machine-facing bytesStep 7: Validate before push
An object conforms only when it passes the validator. Run it before every push and fix every error:
portolan checkRead the PTL rule ids in the output. Each one cites the spec requirement it enforces.
Step 8: Push and probe
portolan push --dry-run
portolan push --verbose--workers sets the number of parallel collections and has no cap. --concurrency sets the concurrent uploads within a collection and defaults to 8. On a home network, leave --adaptive on and lower --chunk-concurrency before you raise anything.
After the push, probe the published host. The host must honor Range requests with an accurate HEAD Content-Length (PORTO-CORE-043) and send CORS headers on every file (PORTO-CORE-045). rashid check takes the local catalog directory, never a URL. The base URL makes the relative hrefs probeable:
rashid check --live \
--live-base-url https://data.source.coop/{org}/{product}/ .Then open the catalog in the browser and confirm the default style renders visible data: https://browser.portolan-sdi.org/#/external/data.source.coop/{org}/{product}/catalog.json.
Styles
Styles are collection-level assets with the style role and media type application/vnd.mapbox.style+json (PORTO-CORE-069, PORTO-FMT-015). With more than one style, exactly one asset carries both style and default (PORTO-CORE-070). The CLI writes the source URL in each style as pmtiles://../<file>.pmtiles. A bare relative path fails to load in MapLibre. There is no portolan:styles array in the spec.
Style files upload with portolan push like any other asset. For how many styles to write and what they should show, follow the portolan-bootstrap skill and specs/best-practices/styling.md.
Troubleshooting
Access denied or 403 Forbidden
The credentials are invalid, expired, or scoped to another prefix.
- Check
~/.aws/credentialsunder[source-coop]. - Check that
PORTOLAN_REMOTEmatches the assigned prefix exactly. - Refresh the credentials from the Source Cooperative dashboard.
- Contact hello@source.coop for access to a different prefix.
No such bucket
The bucket is always us-west-2.opendata.source.coop. Check PORTOLAN_REMOTE in .env.
Push conflict
Someone else pushed since your last pull. portolan pull requires the remote URL as an argument:
portolan pull s3://us-west-2.opendata.source.coop/{org}/{product}/
portolan pushSlow uploads
Raise --concurrency first, then --workers when the catalog has many collections. Watch for errors.
Metadata validation fails
Run portolan metadata validate. Add the missing contact.name, contact.email, or license to the named metadata.yaml.
Live probe fails
A CORS or range finding from rashid check --live names a host you do not control. Report it to hello@source.coop with the failing URL and the rule id.
Complete Example
cd ~/data/phl-aerial-imagery
portolan init --title "Philadelphia Aerial Imagery" --auto --license CC-BY-4.0
cat > .env << 'EOF'
PORTOLAN_REMOTE=s3://us-west-2.opendata.source.coop/nlebovits/phl-aerial-imagery/
PORTOLAN_PROFILE=source-coop
EOF
portolan add . --pmtiles
portolan metadata init
# Edit .portolan/metadata.yaml: contact, license, providers, source_url
portolan metadata validate
portolan readme
# Write AGENTS.md at the catalog and at every collection
portolan check
portolan push --verbose
rashid check --live \
--live-base-url https://data.source.coop/nlebovits/phl-aerial-imagery/ .Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

