Skip to content
Automation
Skill

/workflows-work

Execute research implementation plans efficiently while maintaining estimation quality and finishing features

From plugin
auto-empirical-research-skills
5k200 skills

Claude Code

$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill workflows-work --agent claude-code

SKILL.md

workflows-work.SKILL.md
name: workflows:work
description: Execute research implementation plans efficiently while maintaining estimation quality and finishing features
argument-hint: "<plan file, estimation specification, or task description>"
allowed-tools: Read, Glob, Edit, Write, Bash

Work Plan Execution Command

**Pipeline mode:** This command operates fully autonomously. All decisions are made automatically.

Execute a research implementation plan systematically. The focus is on **shipping complete, reproducible research code** by understanding requirements quickly, following existing patterns, and maintaining estimation quality throughout.

Input Document

<input_document> #$ARGUMENTS </input_document>

**If no input document is provided:** Look for the most recent plan in `docs/plans/` and use it. If no plans exist, state "No plan found. Run `/workflows:plan` first." and stop.

Execution Workflow

Phase 1: Quick Start

1. **Read Plan**

  • Read the work document completely
  • Review any references, brainstorm origins, or linked code paths
  • Identify the estimation method, identification strategy, and key deliverables
  • Note any open questions from planning — resolve by picking the conservative default and documenting the choice
  • **Proceed immediately** — do not wait for approval

2. **Setup Environment**

First, detect the project environment:

   # Detect estimation language
   if [ -f "requirements.txt" ] || [ -f "setup.py" ] || [ -f "pyproject.toml" ]; then
     echo "LANG=python"
   elif [ -f "DESCRIPTION" ] || [ -f "renv.lock" ] || [ -f ".Rprofile" ]; then
     echo "LANG=R"
   elif [ -f "Project.toml" ]; then
     echo "LANG=julia"
   elif ls *.do >/dev/null 2>&1; then
     echo "LANG=stata"
   fi

   # Detect pipeline tools
   ls Makefile Snakefile dvc.yaml 2>/dev/null

Then check the current branch:

   current_branch=$(git branch --show-current)
   default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
   if [ -z "$default_branch" ]; then
     default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")
   fi

**If already on a feature branch** (not the default branch):

  • Continue working on it. Proceed to step 3.

**If on the default branch:**

**Option A: Create a new branch (default)**

   git pull origin $default_branch
   git checkout -b <branch-name-from-plan>

Use a meaningful name derived from the plan (e.g., `feat/callaway-santanna-did`, `fix/blp-convergence`).

**Option B: Use a worktree (for parallel estimation runs)** See `references/worktree-patterns.md` if the plan involves parallel workstreams or the user has multiple active branches.

Automatically choose Option A unless the plan explicitly mentions parallel workstreams.

3. **Activate Research Environment**

Read `compound-science.local.md` for environment configuration. Then activate:

**Python:**

   # Activate virtual environment
   if [ -d ".venv" ]; then source .venv/bin/activate
   elif [ -d "venv" ]; then source venv/bin/activate
   elif command -v conda &>/dev/null; then conda activate $(basename $PWD)
   fi
   # Verify key packages
   python -c "import numpy, scipy, pandas; print('Core packages OK')"

**R:**

   # Check renv status
   Rscript -e "if (file.exists('renv.lock')) renv::status()"

**Verify data paths:**

   # Check that referenced data files exist
   ls data/ 2>/dev/null | head -5

4. **Create Task List**

  • Use TodoWrite to break plan into actionable tasks
  • Include dependencies between tasks
  • Prioritize based on the plan's phase structure
  • Include estimation-specific quality check tasks:
  • Convergence verification after each estimation step
  • Standard error computation and diagnostic tests
  • Robustness checks specified in the plan
  • Keep tasks specific and completable

Phase 2: Execute

1. **Task Execution Loop**

For each task in priority order:

   while (tasks remain):
     - Mark task as in_progress in TodoWrite
     - Read any referenced files from the plan
     - Look for similar patterns in codebase
     - Implement following existing conventions
     - Write tests for new functionality
     - Run Estimation Quality Check (see below)
     - Run tests after changes
     - Mark task as completed in TodoWrite
     - Mark off the corresponding checkbox in the plan file ([ ] → [x])
     - Evaluate for incremental commit (see below)

**Estimation Quality Check** — Before marking an estimation task done:

| Check | What to verify | |-------|---------------| | **Convergence** | Did the optimizer converge? Check exit flag, gradient norm, iteration count. Multiple starting values yield consistent results? | | **Sensible estimates** | Are parameter signs correct? Magnitudes economically reasonable? No values at boundary constraints? | | **Standard errors** | Computed with appropriate method (robust, clustered, bootstrap)? Positive definite Hessian? No suspiciously small or large SEs? | | **Diagnostics** | First-stage F > 10 (if IV)? Overidentification test (if overidentified)? Hausman or specification tests where relevant? | | **Numerical stability** | Log-likelihood (not likelihood) used? Condition number of key matrices acceptable? No NaN/Inf in outputs? | | **Reproducibility** | Random seeds set? Results identical across runs? Dependencies pinned? |

**When to skip:** Pure data cleaning, documentation updates, or pipeline configuration changes that don't involve estimation. If the task is purely additive (new utility function, data loading), the check takes 10 seconds and the answer is "no estimation, skip."

**When this matters most:** Any change that touches estimation routines, moment conditions, likelihood functions, or simulation code.

**IMPORTANT**

Read more
@brycewang-stanford
Ships withauto-empirical-research-skills

## 🔥 力荐 · StatsPAI — Stata 与 R 的 Python 平替,为 AI Agent 而生 🔁 Stata / R 平替:reghdfe、csdid、rdrobust、synth、fixest、did 等常用命令在 Python 中一站式替代,一个 import statspai as sp 搞定 DID / RD / IV / SCM / DML / matching 🤖 面向 Agent 设计:结构化结果对象 + 内置 MCP Server,Claude / Codex

Stars on GitHub

Momentum

stars in total
5.0k
Star history of brycewang-stanford/Auto-Empirical-Research-Skills on GitHub, a chart by star-history.com

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about workflows-work.

Which coding agents can use workflows-work?
workflows-work installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.