ai-asset-pricing: Agent for Claude Code

.claude/agents/crsp-wrds-expert.md

crsp-wrds-expert is an agent for Claude Code from Alexander-M-Dickerson/ai-asset-pricing. It costs 341 tokens per session (11,682 once invoked), scanned A, original, MIT.

A specialist for CRSP, a major US stock-market research database, and its links to Compustat company financial data. It uses PostgreSQL, a database query system, through WRDS.

In plain words
What is it for?
It helps retrieve returns, prices, dividends, delisting information, company identifiers, and Compustat fundamentals for finance research.
Why use it?
It helps avoid common mistakes with stock returns, price adjustments, delisted companies, identifiers, and links between market and financial data.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; names the NotebookEdit tool.

This is Alexander-M-Dickerson/ai-asset-pricing's own configuration. It tells Claude Code how to work on ai-asset-pricing itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-asset-pricing configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Alexander-M-Dickerson/ai-asset-pricing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Alexander-M-Dickerson/ai-asset-pricing/main/.claude/agents/crsp-wrds-expert.md
Clone the repo
git clone --depth 1 https://github.com/Alexander-M-Dickerson/ai-asset-pricing

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for crsp-wrds-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert/github.svg)](https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert)
Your own site
<a href="https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert"><img src="https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for crsp-wrds-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert"><img src="https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/crsp-wrds-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 341 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 11,682 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00341 $0.11682
Opus 5 $0.00170 $0.05841
Sonnet 5 $0.00068 $0.02336
Haiku 4.5 $0.00034 $0.01168

Measured 12d ago against content hash 18d11915f957, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

crsp-wrds-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/crsp-wrds-expert.md · 872 lines

How it starts

The opening of the file, as written. The whole thing — 872 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert agent for CRSP stock data and CRSP-Compustat linked data on WRDS via PostgreSQL. You have deep knowledge of the CRSP database structure, CCM linking conventions, Compustat fundamentals, data quality considerations, and efficient SQL extraction techniques for empirical finance research.

Before running any psql query, invoke the wrds-psql skill to load connection patterns and formatting rules.

DEFAULT: CRSP v2. All new queries must use v2 tables (dsf_v2, msf_v2, wrds_dsfv2_query, wrds_msfv2_query). v1 (dsf, msf) is frozen at 2024-12-31. See the v1→v2 column mapping in "CRSP Data Versions" below.

Database Connection

PostgreSQL Connection:

  • Host: wrds-pgdata.wharton.upenn.edu
  • Port: 9737
  • Database: wrds
  • Schema: crsp
  • Credentials: ~/.pg_service.conf (connection) + ~/.pgpass (password)
psql service=wrds

Python (psycopg2 only — never use the wrds library):

import psycopg2
conn = psycopg2.connect("service=wrds")

CRSP Data Versions

v1 (SIZ / Legacy) — FROZEN as of December 2024

  • Tables: crsp.dsf, crsp.msf, crsp.stocknames, crsp.dsenames, crsp.msenames, crsp.dsedelist, crsp.msedelist, crsp.dsedist, crsp.msedist, crsp.dsi, crsp.msi
  • Data ends at 2024-12-31 — no further updates
  • Missing returns encoded as special numeric values (-44, -55, -66, -77, -88, -99)
  • Negative prices indicate bid/ask average (no closing trade)
  • Delisting returns in separate table — must be manually merged

v2 (CIZ / Current) — Actively updated

  • Tables: crsp.dsf_v2 (50 cols), crsp.msf_v2 (45 cols), crsp.stocknames_v2, crsp.stksecurityinfohist (36 cols), crsp.stkissuerinfohist, crsp.stkdelists (19 cols), crsp.stkdistributions (19 cols)
  • Data extends to 2025-12-31 and updated monthly
  • Missing returns as NULL with descriptive flag column (dlyretmissflg)
  • Prices always positive; dlyprcflg indicates source
  • Delisting returns ALREADY INCORPORATED in dlyret/mthret — no separate merge needed
  • Numeric codes (shrcd, exchcd, distcd, dlstcd) replaced by descriptive string flags
  • WRDS convenience views: crsp.wrds_dsfv2_query (98 cols), crsp.wrds_msfv2_query (91 cols), crsp.wrds_names_query (24 cols)

Read the full file on GitHub · 872 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 872 lines · 341 tokens per session scan A 18d11915f957

Subscribe to this mod's changes

crsp-wrds-expert is an agent published in the GitHub repository Alexander-M-Dickerson/ai-asset-pricing (59 stars, last pushed 4mo ago), licensed MIT. It adds 341 tokens to every session and 11,682 once invoked, about $0.0017 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

PostgreSQL Database Administrator

Work with PostgreSQL databases using the PostgreSQL extension.

github/awesome-copilot · 17 tokens

supabase-substrate-explorer

Specialist research agent for discovering creative, non-obvious applications of the Supabase SUBSTRATE dimension (Postgres Database, Storage object store, pgvector) to Thoughtbox's reasoning-persistence surfaces. Use proactively when exploring how substrate-layer primitives could become new "organs" for Thoughtbox…

Kastalien-Research/thoughtbox · 117 tokens

database-reviewer

PostgreSQL specialist for query performance, schema design, security/RLS, and migration safety. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance.

sjarmak/coding-agent-workflows · 43 tokens

supabase-rag-implementer

Materializa RAG em Supabase em 3 layers - migration vector(N)+HNSW, RPC matchdocuments security invoker com RLS por tenant, Edge Function embedding server-side. Use ao implementar RAG.

luanpdd/kit-mcp · 52 tokens

supabase-roles-implementer

Gera SQL de Postgres Roles em Supabase (CREATE ROLE + GRANT matrix + BYPASSRLS) para system access — service accounts, BI, cron jobs. Recebe spec via Task(). Nao substitui RLS + Custom Claims.

luanpdd/kit-mcp · 59 tokens

multi-tenant-isolation-auditor

Produz ISOLATION-AUDIT.md scored P0/P1/P2 com gaps de isolamento cross-tenant Supabase B2B — tabelas sem RLS, helpers VOLATILE, JOINs cross-tenant. Use antes de release ou periodicamente. (pesado).

luanpdd/kit-mcp · 67 tokens