skills/58-charlescoverdale-econstack/fiscal-briefing/SKILL.md
Public finances briefing. Supports UK, US, and Australia. Produces a single compact briefing on borrowing, debt, receipts, spending, and fiscal rules. Optional debt sustainability analysis via the debtkit R package. User-selectable sub-components and multi-format export.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research fiscal-briefingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Only stop to ask the user when: the country is ambiguous or a non-standard fiscal indicator is requested. Never stop to ask about: data sources (use official sources), section selection, fiscal rule definitions, or output filename.
<!-- preamble: update check -->Before starting, run this silently. If it outputs UPDATE_AVAILABLE, tell the user:
"A new version of econstack is available. Run cd ~/.claude/skills/econstack && git pull to update."
Then continue with the skill normally.
~/.claude/skills/econstack/bin/econstack-update-check 2>/dev/null || true
<!-- preamble: project learnings -->
After the update check, run this silently to load prior learnings for this project:
eval "$(~/.claude/skills/econstack/bin/econstack-slug)"
~/.claude/skills/econstack/bin/econstack-learnings-read --limit 3 2>/dev/null || true
If learnings are found, apply them. When a prior learning influences a decision, note: "Prior learning applied: [key]".
Capturing new learnings: After completing this skill, log new insights via:
~/.claude/skills/econstack/bin/econstack-learnings-log '{"skill":"...","type":"...","key":"...","insight":"...","confidence":N,"source":"observed|user-stated|inferred"}'
Types: framework (preferred appraisal framework), parameter (custom overrides), data-source (preferred data), output (past report references), operational (tool/env quirks), preference (formatting/style). Confidence: 9-10 observed/stated, 6-8 strong inference, 4-5 weak. User-stated never decays; observed/inferred lose 1 point per 30 days. All data stored locally. Nothing transmitted.
After the update check, verify the parameter database is available and check staleness:
PARAMS_DIR="$HOME/econstack-data/parameters"
if [ -d "$PARAMS_DIR" ]; then
PARAM_COUNT=$(find "$PARAMS_DIR" -name "*.json" 2>/dev/null | wc -l | tr -d ' ')
echo "PARAMS: $PARAM_COUNT files loaded from $PARAMS_DIR"
# Check for stale files (last_verified > 2 years ago)
STALE=$(find "$PARAMS_DIR" -name "*.json" -mtime +730 2>/dev/null | wc -l | tr -d ' ')
if [ "$STALE" -gt 0 ]; then
echo "PARAMS_WARNING: $STALE file(s) not updated in 2+ years. Run: cd ~/econstack-data && git pull"
fi
else
echo "PARAMS: not found. Using built-in defaults. For full parameter support: git clone https://github.com/charlescoverdale/econstack-data.git ~/econstack-data"
fi
If PARAMS_WARNING appears, tell the user which parameter files may be stale and recommend updating. Continue with the skill normally using whatever parameters are available.
<!-- preamble: safety hooks -->Safety rules for this skill:
Parameter database is read-only. Never write to, modify, or delete files in ~/econstack-data/parameters/. These are shared, versioned parameters maintained separately. If a parameter needs updating, tell the user to update the econstack-data repo.
Confirm before overwriting. Before writing an output file, check if a file with the same name already exists. If it does, ask the user: "A file named [filename] already exists. Overwrite it, or save with a new name?" Do not silently overwrite.
At the end of every skill run, report one of these statuses:
Format: STATUS: [status] | [one-line reason]
Produces a compact public finances briefing for the UK, US, or Australia. Covers the current deficit or surplus, debt position, receipts by tax, spending by category, and fiscal rules or sustainability context. Every number is traceable to an official source with a vintage date.
Optionally adds a full Debt Sustainability Analysis (DSA) via the debtkit R package with --dsa.
/fiscal-briefing [country or topic] [options]
Example:
/fiscal-briefing --country uk --format pdf
Options:
--country <code> : uk (default), us, or au. Auto-detected if not set.--focus <topic> : Narrow to a theme. Options: deficit, debt, receipts, spending, rules, outlook.--dsa : Add a Debt Sustainability Analysis section (Bohn test, fan charts, stress tests) via the debtkit R package.--section <name> : Emit only one sub-component. Options: full (default), headline, deficit, debt, receipts, spending, rules, outlook, dsa. Combinable with commas.--format <type> : Output format(s). markdown (default, always generated), xlsx, word, pptx, pdf, or all.--client "Name" : Add "Prepared for" metadata.| Code | Country | Fiscal agency | Forecast body | Primary data sources |
|------|---------|--------------|---------------|--------------------|
| uk | United Kingdom (default) | HMT | Office for Budget Responsibility (OBR) | ONS, HMRC, HMT, OBR |
| us | United States | Treasury | Congressional Budget Office (CBO) | BEA, BLS, FRED, Treasury, OMB, CBO |
| au | Australia | Treasury | Parliamentary Budget Office (PBO) | ABS, Treasury, RBA, PBO |
Auto-detection rules:
ukusauukIf --country is not set, detect from context. Default to uk. If --focus is set, narrow the briefing to the relevant sections only.
Pull the core fiscal indicators from official sources for the detected country. Note any staleness in the Data sources footer.
UK (ONS, HMRC, HMT, OBR):
US (BEA, Treasury, OMB, CBO):
Australia (ABS, Treasury, PBO):
Silent fetching. Cite sources in a References footer at the end of the briefing.
Structure by country using the standard fiscal reporting order:
--dsa)If --dsa is set, invoke the debtkit R package to produce:
Note if debtkit is not installed: "Install debtkit from GitHub to enable DSA: devtools::install_github('charlescoverdale/debtkit')."
Save fiscal-[country]-[YYYY-MM-DD].md with this structure.
<!-- KEY NUMBERS
type: fiscal-briefing
country: [uk|us|au]
vintage: [latest data date]
deficit_pct_gdp: [value]
debt_pct_gdp: [value]
fiscal_rule_status: [met|at risk|breached]
dsa_run: [true|false]
date: [YYYY-MM-DD]
-->
# Fiscal Briefing: [Country]
**Date**: [YYYY-MM-DD] · **Data vintage**: [latest release]
**Headline**: [One-line summary: e.g. "UK deficit running above forecast, debt rule at risk of being breached in FY26-27."]
## Headline position
| Indicator | Latest | Prior | % of GDP | Vs forecast |
|-----------|-------:|------:|---------:|:------:|
| Deficit / surplus | [val] | [val] | [val]% | [above/below forecast] |
| Gross debt | [val] | [val] | [val]% | [above/below forecast] |
| Net debt | [val] | [val] | [val]% | [above/below forecast] |
| Debt interest | [val] | [val] | [val]% | [above/below forecast] |
| Primary balance | [val] | [val] | [val]% | [above/below forecast] |
## Tax receipts
[Two paragraphs: main tax contributions, YoY change, surprises vs forecast. Include one small table.]
| Tax | Latest (YTD) | Prior year | Change | Notes |
|-----|-------------:|-----------:|:------:|-------|
| [Main tax 1] | [val] | [val] | [↑/↓] | [brief] |
| [Main tax 2] | [val] | [val] | [↑/↓] | [brief] |
| [Main tax 3] | [val] | [val] | [↑/↓] | [brief] |
| **Total receipts** | **[val]** | **[val]** | [↑/↓] | |
## Public expenditure
[Two paragraphs: main spending lines, YoY change, budgetary pressures. Include one small table.]
| Category | Latest (YTD) | Prior year | Change | Notes |
|----------|-------------:|-----------:|:------:|-------|
| [Category 1] | [val] | [val] | [↑/↓] | [brief] |
| [Category 2] | [val] | [val] | [↑/↓] | [brief] |
| [Category 3] | [val] | [val] | [↑/↓] | [brief] |
| **Total spending** | **[val]** | **[val]** | [↑/↓] | |
## Fiscal rules
| Rule | Threshold | Current | Status | Headroom |
|------|-----------|--------:|:------:|---------:|
| [Rule 1] | [threshold] | [val] | [Met / At risk / Breached] | [val] |
| [Rule 2] | [threshold] | [val] | [Met / At risk / Breached] | [val] |
[One paragraph: which rule is binding, the political consequences of breach, whether the government has signalled policy changes.]
## Outlook
[Two paragraphs: latest forecast body projections for deficit and debt over the medium term. Cite the forecast body directly (OBR, CBO, PBO).]
## Risks
- **Upside**: [one bullet on potential improvements]
- **Downside**: [one bullet on potential deteriorations]
- **Key events**: [next fiscal event to watch: Budget, Autumn Statement, MYEFO, CBO update, etc.]
## Debt sustainability analysis (if --dsa)
[Bohn test result, IMF stress test outcomes, debt fan chart interpretation. One paragraph each. Refer the reader to the full debtkit output file for details.]
## Data sources
[One-line references with vintages.]
Sub-component selection (via --section): emit only the requested parts. Always include the header block and Headline position table.
full (default): the whole structure above.headline: headline position table only.deficit / debt / receipts / spending / rules / outlook / dsa: that single section only.--section headline,rules,outlook.Format-specific output structure (only produce when explicitly requested; see dispatcher below):
fiscal-[country]-[date].md with the structure shown above.The user requests format(s) via --format. Default: md. Comma-separated lists are allowed (e.g. --format md,pdf); all expands to every supported format.
For each format explicitly requested, produce that file and only that file:
md: write the markdown inline (only when md is in the requested set).docx: invoke the docx skill with the rendered content.pdf: render via the econstack Quarto template (or invoke the pdf skill if no template exists for this skill).xlsx: invoke the xlsx skill with the structured tables.pptx: invoke the pptx skill with the briefing as a deck.Do NOT produce formats that were not requested. This is the v0.4 fix for the multi-format leak that previously caused --format pdf to also write .md and .docx files alongside the PDF. Any intermediate files needed during rendering must go to a temp directory and be cleaned up before the skill returns.
When you finish, the file listing in your "Saved:" message must contain exactly the files the user asked for, no extras.
Tell the user (listing only files produced):
Fiscal briefing complete. [Country]. Deficit [val]% of GDP, debt [val]% of GDP. Fiscal rule: [status].
Saved:
[only the files actually produced for the requested format(s)]
Every numerical claim in the briefing must be followed by an inline citation in the form [SOURCE_CODE, vintage]. SOURCE_CODE is a short tag (e.g. ONS_PSF, OBR_EFO, BoE_MPR, HMRC_PB, Treasury_MTS, CBO_BBO, ABS_GFS) that maps to a full reference in the Data sources footer. vintage is the publication date of the source data (e.g. Mar 2026).
Examples:
Public sector net debt reached 95.8% of GDP in February 2026 [ONS_PSF, Feb 2026].
The OBR forecasts borrowing falling to 1.6% of GDP by 2028-29 [OBR_EFO, Mar 2026].
CBO projects the federal deficit at USD 1.7 trillion in FY2025 [CBO_BBO, Jan 2025].
Numbers that cannot be sourced to a primary publication must NOT appear in the briefing. No exceptions: do not estimate, infer from training data, interpolate, or recall from memory. If a needed number isn't in the fetched data, state it explicitly:
[Source] has not yet published this measure. Headroom for FY26-27 will be available after the Spring Statement on [date].
Self-check before output: scan the draft for every number. If any number lacks an inline citation, either add the citation or remove the number. Do not ship a briefing where the citation density is uneven across sections.
A wrong claim that has a citation is still wrong. Before asserting any factual claim about how a fiscal rule, definition, or formula works, consult the fact pack at fiscal-briefing/facts/ (one markdown file per topic). Topics covered: triple lock, fiscal mandate, debt definitions, benefit uprating, ONS classification thresholds.
Things you must NOT assert without computing them from the latest data:
If the fact pack and current data disagree, trust the current data and note the discrepancy in the Risks section so the user can sanity-check.
Fact pack structure: each topic is a small markdown file in fiscal-briefing/facts/ with the canonical definition, the rule for which-arm-binds (where applicable), and dated wording. Read the relevant fact file before drafting any section that touches that topic.
The following are NOT produced unless the user explicitly asks for them via flags or natural language:
--policies "X, Y, Z" (a comma-separated list of policies they want analysed).--dsa (which produces standardised IMF stress tests via debtkit).If the user's request requires content from this list, ask first.
debtkit. Note the install command if it is missing./macro-briefing is the broader macro companion. /fiscal-briefing is the deep-dive on public finances specifically./econ-audit can audit this skill's output for source vintages and consistency.tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.