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
3.3k200 skills146 agents
Install
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill workflows-work --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/workflows-work

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

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
Ships withauto-empirical-research-skills

📌 文档结构(2026-07-22 起): 本文件是中文默认入口 —— banner + badges + 信任面 + 9 阶段流水线速览 + 76 行合集总表。 每个合集的完整描述、按用途分组、精确数字、验证方法在 docs/CONTENT_ZH.md(扩展正文,总表行内的 → 直接跳转到对应锚点)。 English version: README-en.md · 中文扩展正文:docs/CONTENT_ZH.md · README-zh-CN.md 已弃用(重定向占位) 🌐 语言: English |

Get the whole plugin