Agent skill · Data & Analytics

usfiscaldata

Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds, or U.S. government revenue and spending statistics.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill usfiscaldata --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 7 KB
Bundled scripts: none
Version: 1.1
Allowed tools: ReadWriteEditBash
Path: skills/usfiscaldata/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# U.S. Treasury Fiscal Data API Free, open REST API from the U.S. Department of the Treasury for federal financial data. No API key or registration required. **Base URL:** `https://api.fiscaldata.treasury.gov/services/api/fiscal_service` Browse [54 datasets and 179 data tables](https://fiscaldata.treasury.gov/datasets/) via the dataset search. Verify endpoint paths on each dataset's API Quick Guide — paths change over time. ## Installation ```bash uv pip install requests pandas ``` ## Quick Start ```python import requests import pandas as pd BASE_URL = "https://api.fiscaldata.treasury.gov/services/api/fiscal_service" # Get the current national debt (Debt to the Penny) resp = requests.get(f"{BASE_URL}/v2/accounting/od/debt_to_penny", params={ "sort": "-record_date", "page[size]": 1 }) data = resp.json()["data"][0] print(f"Total public debt as of {data['record_date']}: ${float(data['tot_pub_debt_out_amt']):,.0f}") ``` ```python # Get Treasury exchange rates for recent quarters resp = requests.get(f"{BASE_URL}/v1/accounting/od/rates_of_exchange", params={ "fields": "country_currency_desc,exchange_rate,record_date", "filter": "record_date:gte:2024-01-01", "sort": "-record_date", "page[

What's inside
Steps it walks through
  1. Installation
  2. Quick Start
  3. Authentication
  4. Core Parameters
  5. Key Datasets & Endpoints
  6. Debt
  7. Daily & Monthly Statements
  8. Interest Rates & Exchange
  9. Securities & Auctions
  10. Savings Bonds
  11. Response Structure
  12. Common Patterns
  13. Load all pages into a DataFrame
  14. Aggregation (automatic sum)
Ships with 8 files
  • references/api-basics.md
  • references/datasets-debt.md
  • references/datasets-fiscal.md
  • references/datasets-interest-rates.md
  • references/datasets-securities.md
  • references/examples.md
  • references/parameters.md
  • references/response-format.md
Commands it runs
uv pip install requests pandas
More from scientific-agent-skills
All skills →
About this skill
What does the usfiscaldata skill do?

Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds, or U.S. government revenue and spending statistics.

How do I install it?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill usfiscaldata --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going