skills/17-DAAF-Contribution-Community-daaf/dot-claude/skills/agent-authoring/SKILL.md
Guide for creating DAAF agent definition files. Covers 12-section template, hook registration, skills-in-frontmatter, integration checklist. Use when adding or revising agents. For SKILL.md files, use skill-authoring instead.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research agent-authoringInstall 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.
Guide for creating new DAAF agent definition files with full ecosystem integration. Covers the 12-section agent template, cross-agent consistency standards, per-agent hook registration, skills-in-frontmatter assignment, and the complete integration checklist for wiring new agents into documentation. Use when adding a new specialized agent, revising agent structure, configuring per-agent hooks, or verifying agent integration completeness. For creating SKILL.md files (not agent definition files), use skill-authoring instead.
Create new DAAF agents that conform to the canonical template and are fully wired into the system documentation for discoverability and usability.
.md files conforming to agent_reference/AGENT_TEMPLATE.md (12 mandatory sections)skill-authoring: this skill handles the behavioral protocol file; if the new agent also needs a companion skill, invoke skill-authoring separatelyWhat are you doing?
│
├─ Creating a brand-new agent
│ └─ Follow "New Agent Workflow" below
│
├─ Revising an existing agent to match the template
│ └─ Read: references/template-walkthrough.md
│ + agent_reference/AGENT_TEMPLATE.md (the canonical blueprint)
│
├─ Checking if an agent is fully integrated into the ecosystem
│ └─ Read: references/integration-checklist.md
│
├─ Understanding what must be identical across all agents
│ └─ Read: references/cross-agent-standards.md
│
└─ Understanding the current agent landscape before adding to it
└─ Read: .claude/agents/README.md (Agent Index + "Commonly Confused Pairs")
Before beginning, you MUST have a clear, coherent, and compelling answer to each of the following questions:
.claude/agents/README.md (Agent Index + "Commonly Confused Pairs") to find the 1-3 most similar existing agents. You MUST differentiate from these in your Core Distinction table.general-purpose — needs file writes, code execution, or tool access beyond readingPlan — read-only validation, discovery, or verificationIf any of these answers are vague, in doubt, or incomplete, the quality and reliability of the ensuing agent file will suffer. If the agent authoring process has been initiated by the user, make sure to ask these questions directly, and ask follow-up questions to enhance the quality of their responses as you go. Before proceeding to Phase 2, make sure the user agrees with your enhanced answers explicitly.
agent_reference/AGENT_TEMPLATE.md for the canonical 12-section structurereferences/template-walkthrough.md for section-by-section guidance and common mistakesreferences/cross-agent-standards.md for mandatory standardized elements.claude/agents/[agent-name].md following the template exactlyagent_reference/ only if shared across agents)agent_reference/FRAMEWORK_INTEGRATION_CHECKLIST.md § 2 for the canonical checklist of registration pointsreferences/integration-checklist.mdRun these verification checks:
# 1. Verify agent appears in all registry files
grep -l "agent-name" .claude/agents/README.md CLAUDE.md README.md
# 2. Cross-agent consistency (run for new agent file)
grep -c "HIGH.*MEDIUM.*LOW\|BLOCKER.*WARNING.*INFO\|Learning Signal\|STOP Conditions" .claude/agents/[agent-name].md
# 3. Verify agent count matches actual count
ls .claude/agents/*.md | grep -v README | grep -v _revised | wc -l
# Compare with the number in README.md "Agent Ecosystem (N Specialized Agents)"
Before any agent authoring process is fully complete, a human user MUST review it for accuracy, intention, completeness, and value. When Phase 4 is complete, you MUST ask the user for review, providing as many details, file references, and decision points as possible to ensure full clarity for their awareness and revision if needed.
Consult .claude/agents/README.md for the authoritative Agent Index with:
| File | When to Read | Purpose |
|------|-------------|---------|
| references/template-walkthrough.md | Writing or revising an agent | Section-by-section guidance for AGENT_TEMPLATE.md |
| references/integration-checklist.md | After writing, during Phase 3 | Complete list of files to update |
| references/cross-agent-standards.md | During writing, for consistency | Mandatory identical elements across all agents |
| Resource | Relationship |
|----------|-------------|
| skill-authoring skill | Invoke separately if the new agent also needs a companion skill |
| agent_reference/AGENT_TEMPLATE.md | The structural blueprint — read directly during Phase 2 |
| agent_reference/PLAN_TEMPLATE.md | Reference for wave-based task sequencing and plan structure |
| .claude/agents/README.md | The single source of truth for the agent landscape — read during Phase 1 |
| data-ingest agent | Related: creates new data source skills; agent-authoring creates new agents |
Agents can register hooks in their YAML frontmatter that fire only when that agent
is active. This is distinct from project-wide hooks in settings.json which fire
for all contexts.
When to use per-agent hooks vs project-wide hooks:
| Scope | Register in | Example |
|-------|-------------|---------|
| All agents, all contexts | settings.json | bash-safety.sh (destructive command prevention) |
| Specific agents only | Agent frontmatter hooks field | enforce-file-first.sh (file-first protocol for coding agents) |
Current per-agent hook: enforce-file-first.sh
Any agent that writes and executes Python scripts via run_with_capture.sh MUST
register this hook. It blocks direct python/python3 invocations, enforcing the
file-first execution protocol at the hook layer.
Agents that need it: those with Bash in tools that execute Python scripts
(currently: research-executor, code-reviewer, debugger, data-ingest).
Agents that do NOT need it: read-only agents (permissionMode: plan), agents that
don't execute Python (report-writer, notebook-assembler), and the orchestrator.
Frontmatter syntax:
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "$CLAUDE_PROJECT_DIR/.claude/hooks/enforce-file-first.sh"
timeout: 5
Hook authoring conventions:
.claude/hooks/ and are protected by deny rules (Edit(.claude/hooks/*), Write(.claude/hooks/*)) — human-only deploymentexit 2 with stderr message to block Bash commands (convention from bash-safety.sh)permissionDecision: deny output for Agent/Task tool hooks (convention from enforce-explore-model.sh)jq) explicitly rather than relying on fallbacks that silently degradeAgents can preload skills via the skills frontmatter field. The skill is loaded
into the agent's context when it starts, providing domain knowledge without
requiring the agent to invoke the Skill tool.
Syntax:
# Single skill
skills: data-scientist
# Multiple skills (YAML block list — matches official Claude Code docs)
skills:
- data-scientist
- polars
The full skill content is injected into the agent's context at startup. The agent does NOT need to call the Skill tool for preloaded skills — doing so would load the content a second time and waste context tokens.
When to assign skills to an agent:
data-scientist)When NOT to assign skills:
Current skill assignments:
| Skill | Assigned to |
|-------|-------------|
| data-scientist | research-executor, code-reviewer, debugger, data-ingest, data-planner, plan-checker, data-verifier, source-researcher, research-synthesizer, integration-checker, report-writer, notebook-assembler |
| marimo | notebook-assembler |
.claude/agents/[lowercase-hyphenated].mdlowercase-hyphenated (must match directory/file convention)# [Agent Name] Agent (title case with "Agent" suffix)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.