Imported from tiangong-ai/agent-skills (
usbr-project-records-fetch/SKILL.md). Install upstream withnpx skills add tiangong-ai/agent-skills --skill usbr-project-records-fetch. Copyright stays with the author.
USBR Project Records Fetch
Use the CLI-owned usbr.project-records/fetch operation. This Skill supplies
intent routing, URL-selection discipline, and result-use boundaries only; the
CLI TypeScript 7 runtime owns exact-origin enforcement, HTML parsing, schemas,
limits, retries, link normalization, partial results, and receipts.
Before running
- Read
references/tiangong-data-requirement.json. - Use the caller- or workspace-resolved stable CLI. The requirement declares compatible capability and operation contract majors; it does not select a package build.
- Run
data describewith that same CLI. Continue only when the capability ID and required contract majors match, and copy the exact current capability/operation versions from that response into the run request. - Immediately inspect
manifest.availabilityanddiscovery.availability. If either does not reportavailable, stop before constructing a request and report its exactreasonCode, description, and resume criteria. Do not bypass suspension with a direct page fetch or another USBR endpoint.
tiangong-ai data describe usbr.project-records --json
Use the returned Discovery Metadata to confirm current coverage, granularity,
limits, selection hints, provides, and doesNotProvide. Do not rely on
objective source facts copied from an older Skill revision.
Choose source pages
- Supply exact official
https://www.usbr.govproject or program page URLs already grounded by the user or another reviewed source. This operation is not site search, ranking, discovery across USBR, or recursive crawling. - Use
usbr-rise-fetchinstead when the task needs RISE catalog item IDs or operational and water-environment time-series values. - Select only pages relevant to the evidence need. The CLI preserves caller order, allows no other USBR subdomain, and inventories only links present on each fetched page.
- Set
maxLinkedRecordsPerPagedeliberately when a smaller bounded inventory is sufficient. Reaching it means later page links were not returned.
Prepare the request
Build one tiangong.data.run-request.v1 envelope. Replace both version
placeholders with the exact versions from the same data describe response and validate input against the current
operation schema returned by data describe.
{
"schemaVersion": "tiangong.data.run-request.v1",
"capabilityId": "usbr.project-records",
"capabilityVersion": "<describe.manifest.capabilityVersion>",
"operationId": "fetch",
"operationVersion": "<describe.manifest.operations[0].operationVersion>",
"input": {
"urls": [
"https://www.usbr.gov/uc/progact/amp/index.html",
"https://www.usbr.gov/lc/region/programs/crbstudy.html"
],
"maxLinkedRecordsPerPage": 25
}
}
Use run-request limits only when intentionally lowering the manifest's page,
record, response-byte, or timeout ceiling. Do not place output paths, retry
settings, a custom base URL, external-link instructions, or credentials in
input.
Run
tiangong-ai data run usbr.project-records fetch \
--input /absolute/path/to/request.json --json
Preserve the complete tiangong.data.run-result.v1 envelope, including
contract, warnings, errors, observations, and receipt, with data.
Result boundaries
- A
project-pagerecord represents bytes actually fetched by this operation; preserve its URL, title, description, digest, byte length, safe response metadata, and selected links together. - A
linked-documentrecord is only an availability cue derived from one anchor. Its extension-derived type is not content validation, and null content metadata means the target was not downloaded or reviewed. - Treat
partialas a failed later source page: retain successful records and report the missing page. Treatblockedas no usable result. - Treat
max-pages,max-records, andmax-linked-recordsas explicit bounded coverage. Do not infer that omitted or unlinked records do not exist. - Same-origin filtering excludes external sources and other USBR subdomains; it is a security and scope boundary, not an assessment of relevance.
- Downloading linked files, OCR, document parsing, durable evidence admission, cross-source synthesis, and legal, policy, operating, environmental-effects, or governance judgments remain outside this atomic Skill.
Reference
references/tiangong-data-requirement.json: stable capability requirement; it is not a package lock.