← Back to Barrios Skills

John Barrios · empirical workflow

Accounting research pipeline: skills, MCP, and verification

Skills teach how — Compustat filters, CIK discipline, attrition rows. MCP servers run live access — authenticated WRDS queries, EDGAR filings, macro series, with credentials in .env and never in chat. Neither replaces verification: agents make pipelines cheap to produce, and the costly part stays yours.

Nine pipeline stages from research question to verified manuscript, each node labeled skill, MCP, or both, with the empirical loop highlighted in the middle Horizontal flow of nine pipeline stages in two rows; each stage node links to its detail card below. Stages 1 Question, 2 Prompt, 4 Clean/join, 6 Measures, 8 Tables/figs, and 9 Write/verify use skills only; stages 3 Pull and 5 Text use both a skill and an MCP server; stage 7 Estimate uses a skill plus an optional Stata MCP. Stage 5 is a dashed optional branch that can be skipped. The empirical loop — nine stages Empty folder to seminar-ready draft. Badges mark where a skill, an MCP server, or both carry the stage. 1 Question skill 2 Prompt skill 3 Pull skill + MCP 4 Clean/join skill 5 Text (optional) skill + MCP no text: skip stage 5 6 Measures skill 7 Estimate skill + MCP 8 Tables/figs skill 9 Write/verify skill skill conventions installed locally skill + MCP pair conventions with live, authenticated access skill + MCP stage 7: Stata-MCP only if the agent drives Stata dashed node = optional branch Every stage ends at a verification gate: results live as files on disk, never chat-only.
The nine stages of an archival accounting paper, from empty folder to seminar-ready draft. Click a stage node to jump to its card.

Start here: install these first

The small set for a first Compustat firm–year paper, with optional EDGAR text and a Stata or Python estimator. Everything else in the 46-skill catalog (Bayesian, geospatial, posters) can wait. Browse the full catalog when you need it.

Skills to install first

RoleSkills
Data access conventionswrds; add sec-edgar if any filing work
Panel & estimateStata lane: stata-data-cleaning + stata-regression; Python lane: pyfixest + python-panel-data
Outputlatex-tables, econ-visualization
Write & checkecon-write, econ-humanizer, econ-referee

MCP priority

PriorityServer
Required for WRDS paperswrds-mcp setup
OptionalSEC EDGAR MCP · OpenEcon Data / FRED · Stata-MCP (install guide)

Five non-negotiable habits

These are habits, not packages. No install fixes their absence.

  • Empty folder plus the six-part prompt (stage 2)
  • Iron-law Compustat filters plus the four WRDS inspections (stage 3)
  • Attrition rows on every sample change (stage 4)
  • No hand-typed manuscript numbers (stage 8)
  • Two named sanity checks before signing off on a figure (stage 6)

Skill vs MCP vs both

If the bottleneck is knowing the convention, use a skill; if it is talking to a remote system with secrets or rate limits, use MCP.

Research taskSkillMCPUse
Compustat / CRSP / CCM pullwrdswrds-mcpBoth: skill for filters and query patterns; MCP for auth and live SQL
EDGAR filings, Form 4, XBRL factssec-edgarSEC EDGAR MCPBoth: CIK and rate-limit conventions plus live fetch
FinBERT / 10-K text featuresfinancial-text-nlpEDGAR MCP only to obtain textSkill (+ MCP upstream)
FRED / World Bank / IMF seriesapi-data-fetcherOpenEcon Data or FRED MCPEither / both: MCP to discover; skill for pinned reproducible scripts
Stata clean / reghdfe / esttabstata-data-cleaning, stata-regressionStata-MCPBoth if the agent drives Stata; skill only if you run .do files yourself
Panel FE in Pythonpyfixest, python-panel-datanoneSkill only
Lit search / BibTeXecon-lit-search, citation-managementnoneSkill only
Figures / LaTeX tablesecon-visualization, latex-tablesnoneSkill only
Paper / slides / referee prepecon-write, econ-slides, econ-refereenoneSkill only
Choosing the tool rungChat for thinking; editor for edits; agent for pipelines; agent + MCP only when live licensed or public APIs are required

The nine stages

Each stage lists its default skills, the MCP server if one applies, and the verification gate you pass before moving on. Chip text opens the skill in the catalog; the arrow downloads the zip.

Research question and literature

Question

Sharpen a question that Compustat, CRSP, EDGAR, or a public panel can answer; map prior designs and measurement conventions before writing any code.

Verify this

Name the identifying variation and the unit of observation (firm–year, filing, event) in one sentence. If you cannot, do not open a data session yet.

Empty folder and the six-part opening prompt

Question

Start in a clean directory and write the six-part prompt before any code runs. Require named scripts, DECISIONS.md, LOG.md, and attrition rows, not chat-only results.

  1. DATA: source, years, tables or files, variables
  2. JOIN: key(s), pre/post row counts, unmatched-key report
  3. MEASURE: exact definition and filters (e.g. qtrs, form type, Compustat iron laws)
  4. AGGREGATION: statistic, grouping, time unit
  5. OUTPUT: figure and table filenames plus the underlying CSV/Parquet
  6. PAPER TRAIL: named scripts, DECISIONS.md, LOG.md, attrition printed on every filter
MCP None at prompt-writing time; MCP comes online in stage 3. Install wrds / sec-edgar here so the prompt carries the iron laws and CIK discipline from the start.
Verify this

Paste the six headings. Fill in every blank an agent would have to guess: years, tags, filters, join key, filename.

Live data pull

Data

Pull WRDS extracts, EDGAR filings and XBRL facts, and macro controls into data/raw/. Every pull, authenticated or bulk, ends as files on disk.

Credentials live in .env, never in chat. The MCP server reads WRDS_USERNAME and related variables from an env file with chmod 600. If a password ever appears in a prompt or a log, rotate it.
Verify this

Four inspections before trusting any extract: (1) row count vs an expectation written down beforehand, (2) a sample of rows, (3) null check on the analysis columns, (4) date-range min/max. Compustat SQL must include indfmt='INDL', datafmt='STD', popsrc='D', consol='C'. CRSP share-type and exchange filters are manual. Never assume a helper applied them.

Clean, join, attrition panel

Data

Turn raw extracts into an analysis-ready firm–year panel. Join on the correct key: gvkeyfyear, adsh, the CCM link table. Never join on hand-typed tickers. Print attrition at every filter.

MCP None. Scripts on disk. Stata-MCP is optional if cleaning runs in Stata interactively (see the MCP install guide).
Verify this

One join check: n before, n after, and the reason for every drop. Flag unmatched keys. No silent row inflation from many-to-many joins.

Disclosure and EDGAR text measures (optional branch)

Text

CIK resolution → filing retrieval (cached HTML) → section extraction with fallback patterns → quality report → text feature or NLP score. Construct validity is the accounting contribution; automation is not the finding. Resolve and pin CIKs: ticker strings are not stable firm ids across EDGAR joins.

Verify this

Read the quality report: the failures and the suspiciously short sections, not the headline success rate. Before a text measure enters a main table, run a stratified human audit (~50 filings across measure level, size, and industry) against a written rubric.

Construct measures and sanity EDA

Data · Estimate

Build ratios, treatments, instruments, and controls; winsorize or trim with documented rules; plot distributions and known-event windows before any regression.

Verify this

Name two checks before looking at the figure: (1) benchmark industries or firms where you hold a strong prior, (2) plausibility around a known shock. Write both into the README.

Estimation and identification

Estimate

Run the main specs and pre-committed robustness: FE OLS, Poisson, IV, DiD including modern estimators, clustering. Prefer high-dimensional FE tools that match accounting panel practice: pyfixest if Python, stata-regression if Stata.

MCP Stata-MCP if the agent drives Stata (see the MCP install guide); otherwise none.
Verify this

Check one coefficient or N from the log file against an independent re-run or a hand calculation on a tiny subsample. Confirm FE and cluster choices match DECISIONS.md.

Tables, figures, and the paper trail

Write

Export publication tables and figures from scripts. Every manuscript number comes from a generated file, \input{} or a read CSV, never hand-typed from a terminal. Finish the README so a stranger can rerun the project from empty folder to figure.

Verify this

Pick one table cell. Check it against the script output file and confirm the manuscript inputs that file. No copied digits.

Manuscript, slides, pre-submission verification

Write

Draft and revise, strip AI tells, build the seminar deck, and run an adversarial pre-submission pass. The default writing sequence: econ-writeecon-writing-plus for identification prose → econ-humanizer (plus econ-humanizer-plus) for voice.

Verify this

Cross-check one DECISIONS.md claim against the git commit it cites. Run a credential audit: grep the history for secrets; it should come back empty. On identification, the agent is an editor, not a rewriter: comments only, no ghostwritten argument.

Verification debt

Agents break the old correlation between effort and checking: output that once took a week of RA time now appears in minutes, and the checking cost did not fall with it. The danger sits exactly where this catalog is strongest: text measures from financial-text-nlp plus EDGAR, dense pyfixest / stata-regression batteries, and fluent econ-write drafts. All of it is cheap to produce and expensive to validate.

Two-by-two matrix of production cost versus verification cost; agent output such as NLP disclosure scores, regression batteries, and AI-drafted prose falls in the cheap-to-make, costly-to-verify quadrant
Cheap to make, costly to verify: where agent output accumulates debt.

Pay the debt with the stage gates above, not with more autonomy. Row counts, iron-law filter checks, and date ranges are cheap; run them every time. Human audits of text measures and independent re-runs of headline coefficients are expensive; budget for them before the result enters a main table.