Creates new Claude Code agent configuration files or audits existing ones in .claude/agents/. Validates frontmatter, routing keywords, body-frontmatter alignment, ecosystem integration, and cross-agent consistency using a 17-point checklist.
Ships in ai-asset-pricing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two modes: Create a new agent or Audit an existing one.
/create-audit-agent my-data-expert -- create a new agent/create-audit-agent audit my-data-expert -- audit a specific agent/create-audit-agent audit all -- audit all agents with summary tableParse $ARGUMENTS:
audit, audit <name>, or audit all → Audit modeFive phases: Gather → Reference → Generate → Register → Verify.
List all .md files in .claude/agents/ to prevent name collisions and understand existing scope.
If $ARGUMENTS contains a name or description, use it. Otherwise, use AskUserQuestion with all of the following:
my-data-expert)wrds-psql)inherit (default), sonnet, opus, or haiku?Before proceeding, ask: "Is this a known, rigid workflow with fixed inputs?" If yes, recommend a skill (/create-skill) instead. Agents are for tasks requiring judgment, discovery, or error recovery. Skills run in the caller's context with zero spawn overhead (75-80% fewer tokens). See docs/AGENT_LESSONS_LEARNED.md for rationale.
Compare the user's answers against existing agents. If there's scope overlap (same tables, same databases), warn the user and ask whether to:
Build the agent .md file:
Frontmatter:
---
name: [validated name]
description: "[WHAT + WHEN statement with 3 <example> blocks including <commentary>]"
tools: [appropriate tool list]
model: [inherit unless specified]
---
Description requirements:
<example> blocks with realistic user queries, assistant responses, and <commentary>Body structure:
You are [role description matching frontmatter scope].
**Before running any psql query, invoke the `wrds-psql` skill** [if applicable]
## Overview
[Domain knowledge, key paper references, data sources]
## Table(s)
[Schema.table names with brief descriptions]
## Database Connection
[Connection pattern]
## [Domain-Specific Sections]
[Filters, identifiers, signal names, etc.]
## Example Queries
[2+ tested query patterns with explanations]
## Gotchas
[Data quality issues, common mistakes, edge cases]
Body rules:
.claude/rules/, reference it with a one-liner instead of duplicating.claude/rules/workflow.md (or similar) stating WHEN to use this agent. Description-based routing is opt-in; rule-based routing is enforced.Print the complete agent file to the user before writing. Ask if they want changes.
Write to .claude/agents/{name}.md.
Add the agent to the specialist agent list in root CLAUDE.md under "WRDS Database Access" (for WRDS agents) or appropriate section.
If this is a WRDS agent, add a row to .claude/agents/wrds-query-orchestrator.md in the "Specialized Agents Available" table.
Print confirmation:
Agent created: .claude/agents/{name}.md
Lines: {count}
Registered in: CLAUDE.md, wrds-query-orchestrator.md
Run the full 17-point audit checklist (from Audit Mode below) against the new agent. Report results. Fix any FAIL items before considering the skill complete.
Four phases: Read → Analyze → Report → Fix.
Parse the audit target from $ARGUMENTS:
audit <name> → read .claude/agents/{name}.mdaudit all → list and read all .md files in .claude/agents/audit (no target) → list all agents as a numbered list, ask which to audit (or offer all)Also read:
CLAUDE.md to check ecosystem integration (specialist agent section).claude/agents/wrds-query-orchestrator.md to check dispatch table (for WRDS agents, if it exists)Run 17 checks grouped in 5 categories. For each: PASS, WARN, or FAIL.
name present, matches ^[a-z][a-z0-9-]{0,63}$, no reserved words ("anthropic", "claude"), not generichelper, data-agent, utils)name, invalid characters, or contains reserved wordsdescription present, non-empty, under 1024 characters<example> blocks with realistic user queries and <commentary><example> blocks<example> blocksScan body for database names, schema.table patterns (e.g., contrib.global_factor, crsp.dsf), key acronyms, and paper/author names. Check if each appears in the description.
tools field present with tool list appropriate for agent's roletools omitted (inherits all — may be intentional but worth noting)Compare body opening paragraph with frontmatter description scope.
Extract all schema.table patterns, database identifiers, acronyms, and domain terms from body. Compute what percentage appear in description.
Check if body contains substantial documentation for databases/tools/workflows NOT mentioned in the description.
wrds-psql skill")Check for organized sections with headers.
Every line in an agent body is loaded on every spawn. Treat agent definitions like hot code paths.
.claude/rules/ content.claude/rules/ (suggest replacing with one-liner references like "See .claude/rules/api-gotchas.md for parameter validation")Check for: Windows-style backslash paths, verbose explanations of fundamentals Claude already knows, magic numbers without justification, menus without defaults.
Check root CLAUDE.md for the agent under the specialist agent section.
For WRDS agents only: check .claude/agents/wrds-query-orchestrator.md dispatch table.
Compare this agent's documented tables/schemas against all other agents.
Each unused tool adds ~200 tokens of JSON schema to every spawn. Start minimal, add only when needed.
Print structured report:
AGENT AUDIT: {name}
=============================
File: .claude/agents/{name}.md | Lines: {count} | Model: {model}
A. FRONTMATTER B. ALIGNMENT C. BODY QUALITY
[PASS] A1 Name [PASS] B6 Scope [PASS] C9 Skill invocation
[PASS] A2 Description [WARN] B7 Keywords [PASS] C10 Sections
[PASS] A3 Examples [PASS] B8 Orphans [PASS] C11 Examples
[FAIL] A4 Routing [PASS] C12 Lines ({n})
[PASS] A5 Tools [PASS] C13 Anti-patterns
D. ECOSYSTEM E. CONSISTENCY
[PASS] D14 CLAUDE.md [PASS] E16 Overlap
[PASS] D15 Orchestrator [PASS] E17 Tools
SUGGESTIONS:
1. [A4] Add "contrib.global_factor" and "JKP" to description — these
key body terms are missing from routing metadata.
2. [B7] Keyword coverage is 75% — consider surfacing "permno",
"gvkey" in description.
RESULT: 15/17 passed, 1 warning, 1 failure
For all mode, print each agent's report separately, then a summary table:
SUMMARY: {N} agents audited
==============================
| Agent | Pass | Warn | Fail |
|-----------------------------|------|------|------|
| crsp-wrds-expert | 16 | 1 | 0 |
| jkp-wrds-expert | 17 | 0 | 0 |
| bonds-wrds-expert | 15 | 1 | 1 |
| ff-wrds-expert | 16 | 0 | 1 |
| optionmetrics-wrds-expert | 17 | 0 | 0 |
| taq-wrds-expert | 16 | 1 | 0 |
| paper-reader | 15 | 2 | 0 |
| wrds-query-orchestrator | 16 | 1 | 0 |
After reporting, offer to fix FAIL items:
Never auto-fix without showing the proposed change first.
Reading agent configuration and reference material...What SKILL.md sets; muted values are Claude Code's defaults
38 skills in this plugin
/audit-captionsAudit all table and figure captions for language, notation, and formatting consistency/audit-mathAdversarial audit of mathematical proofs, derivations, and formal environments/audit-sectionDeep audit of a single section -- style, factual accuracy, citations, logical flow/bond-dataReference for the Dickerson corporate bond dataset: column mappings between WRDS and PyBondLab, rating encoding, return definitions, signal clusters, and data gotchas. Auto-apply when loading bond data for PyBondLab analysis./build-contextGenerate guidance/paper-context.md from user-provided .tex, .md, or .pdf files/build-deckCreate and compile Beamer presentations following the Rhetoric of Decks philosophy. Use when making seminar or conference slides./ai-asset-pricing:create-audit-agent [agent-name | audit [agent-name | all]]from ai-asset-pricing
ai-asset-pricing@fin-skills is listed by howard-lynn-ye/fin-rsi — review the source before installing
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin ai-asset-pricingOther plugins' skills for the same job