Logo van Workflows:Work

Workflows:Work

CommunityPopulair
brycewang-stanford
workflows:work

Voer onderzoeksimplementatieplannen efficiënt uit, met behoud van de kwaliteit van schattingen en aandacht voor het afronden van functies.

Add to TypingMind

Overzicht

Uitgeverbrycewang-stanford
RepositoryAuto-Empirical-Research-Skills
Skillnaamworkflows:work
Sterren
4.6K
Forks
543
Meegeleverde bestanden
2
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 2

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door brycewang-stanford op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Workflows:Work in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/tree/main/skills/11-James-Traina-compound-science/skills/workflows-work
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills.git /tmp/Auto-Empirical-Research-Skills
mkdir -p .claude/skills
cp -r /tmp/Auto-Empirical-Research-Skills/skills/11-James-Traina-compound-science/skills/workflows-work .claude/skills/brycewang-stanford-workflows-work
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Workflows:Work in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Workflows:Work automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Workflows:Work niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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:

    bash
    # 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:

    bash
    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)

    bash
    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:

    bash
    # 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:

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

    Verify data paths:

    bash
    # 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:

    CheckWhat to verify
    ConvergenceDid the optimizer converge? Check exit flag, gradient norm, iteration count. Multiple starting values yield consistent results?
    Sensible estimatesAre parameter signs correct? Magnitudes economically reasonable? No values at boundary constraints?
    Standard errorsComputed with appropriate method (robust, clustered, bootstrap)? Positive definite Hessian? No suspiciously small or large SEs?
    DiagnosticsFirst-stage F > 10 (if IV)? Overidentification test (if overidentified)? Hausman or specification tests where relevant?
    Numerical stabilityLog-likelihood (not likelihood) used? Condition number of key matrices acceptable? No NaN/Inf in outputs?
    ReproducibilityRandom 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: Always update the original plan document by checking off completed items. Use the Edit tool to change - [ ] to - [x] for each task you finish.

  2. Incremental Commits

    After completing each task, evaluate whether to create an incremental commit:

    Commit when...Don't commit when...
    Estimation step complete with verified convergencePartial estimation code that won't run
    Data pipeline stage verifiedIncomplete data transformation
    Tests pass + meaningful progressTests failing
    About to switch contexts (data work → estimation)Purely scaffolding with no behavior
    Robustness check completeWould need a "WIP" commit message

    Heuristic: "Can I write a commit message that describes a complete, verifiable change? If yes, commit."

    Commit workflow:

    bash
    # 1. Verify tests pass (use project's test command)
    # Examples: pytest, Rscript tests/run_tests.R, etc.
    
    # 2. Stage only files related to this logical unit
    git add <files related to this logical unit>
    
    # 3. Commit with conventional message
    git commit -m "feat(estimation): description of this unit"

    Note: Incremental commits use clean conventional messages. The final Phase 4 commit/PR includes full attribution.

  3. Follow Existing Patterns

    • The plan should reference similar code — read those files first
    • Match naming conventions exactly (variable names, function signatures, file organization)
    • Reuse existing estimation utilities where possible
    • Follow project coding standards (see CLAUDE.md)
    • When in doubt, grep for similar implementations
  4. Test Continuously

    • Run relevant tests after each significant change
    • Don't wait until the end to test
    • Fix failures immediately
    • Add new tests for new functionality
    • For estimation code: verify convergence AND test with known-parameter DGP if feasible
  5. Track Progress

    • Keep TodoWrite updated as you complete tasks
    • Note any convergence issues or unexpected results
    • Create new tasks if scope expands (e.g., new robustness check needed)
    • Log estimation results at milestones (point estimates, standard errors, diagnostics)

Phase 3: Quality Check

  1. Run Core Quality Checks

    Always run before submitting:

    bash
    # Run full test suite
    # Python: pytest
    # R: Rscript tests/run_tests.R or testthat::test_dir("tests")
    
    # Run linting (per CLAUDE.md)
    # Python: ruff check . or flake8
    # R: lintr::lint_dir()
  2. Estimation-Specific Validation

    For any work involving estimation:

    • Estimation converges with sensible parameters (check all specifications)
    • Standard errors computed correctly (appropriate clustering/robustness)
    • Diagnostic tests run and results documented
    • Multiple starting values checked (if nonlinear estimation)
    • Results reproducible with fixed random seed
    • No numerical warnings (NaN, overflow, singular matrices)
  3. Consider Reviewer Agents (Optional)

    Use for complex or risky changes. Read agents from compound-science.local.md frontmatter (review_agents). If no settings file, create one following the template in workflows-review/references/project-config.md.

    Run configured agents in parallel with Task tool. Address critical issues before proceeding.

    Default agents for estimation work:

    • econometric-reviewer — identification and inference review
    • numerical-auditor — numerical stability and convergence
    • identification-critic — identification argument completeness
  4. Final Validation

    • All TodoWrite tasks marked completed
    • All tests pass
    • Linting passes
    • Estimation converges with sensible results
    • Standard errors and diagnostics computed
    • Code follows existing patterns
    • Random seeds set and documented
    • No console errors or warnings

Phase 4: Ship It

  1. Create Commit

    bash
    git add <relevant files>
    git status  # Review what's being committed
    git diff --staged  # Check the changes
    
    git commit -m "$(cat <<'EOF'
    feat(estimation): description of what and why
    
    Brief explanation if needed.
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    EOF
    )"
  2. Create Pull Request

    bash
    git push -u origin <branch-name>
    
    gh pr create --title "feat(estimation): [Description]" --body "$(cat <<'EOF'
    ## Summary
    - What was implemented
    - Methodological approach and key decisions
    - Estimation results summary (if applicable)
    
    ## Estimation Quality
    - Convergence: [status]
    - Diagnostics: [first-stage F, overid test, specification tests]
    - Robustness: [alternative specifications checked]
    
    ## Testing
    - Tests added/modified
    - Estimation verified with [approach]
    
    ## Reproducibility
    - Random seeds: [set/documented]
    - Pipeline: [runs end-to-end / specific steps]
    - Dependencies: [pinned in requirements.txt/renv.lock]
    
    ## Research Impact
    - Identification: [any changes to assumptions]
    - Estimation: [computational cost, convergence]
    - Robustness: [new checks added/updated]
    - Replication: [package changes]
    EOF
    )"
  3. Update Plan Status

    If the input document has YAML frontmatter with a status field, update it:

    status: active  →  status: completed
  4. Summary

    • Display what was completed
    • Link to PR
    • Summarize estimation results if applicable
    • Note any follow-up work needed (additional robustness checks, referee suggestions)

Phase 5: Handoff

Pipeline mode (when invoked from /lfg or /slfg):

  • Skip the interactive menu
  • Auto-invoke /workflows:review on the files that were changed

Standalone mode (when invoked directly by the user):

  • After the Phase 4 summary, present options:
    1. Proceed to review (Recommended) — Immediately run /workflows:review in this session
    2. Continue working — Return to Phase 2 task loop for additional implementation
    3. End session — Stop here; changes are committed

Swarm Mode (Optional)

For complex plans with multiple independent workstreams, enable swarm mode for parallel execution.

When to Use Swarm Mode

Use Swarm Mode when...Use Standard Mode when...
Plan has independent estimation specificationsSingle estimation pipeline
Multiple robustness checks can run in parallelSequential estimation steps
Monte Carlo with independent DGP variantsSimple parameter change
Large replication package with separable componentsSmall feature or bug fix

Enabling Swarm Mode

To trigger swarm execution, say:

"Make a Task list and launch an army of agent swarm subagents to build the plan"

See references/orchestration-patterns.md in the slfg skill for detailed swarm patterns and best practices.


Key Principles

Start Fast, Execute Methodically

  • Read the plan, set up environment, then execute
  • Don't wait for perfect understanding — resolve ambiguity by picking conservative defaults
  • The goal is to finish the implementation with verified estimation quality

The Plan is Your Guide

  • Plans reference existing code, methods papers, and brainstorm decisions — load those references
  • Follow the plan's phase structure and acceptance criteria
  • Don't reinvent — match existing patterns in the codebase

Test Estimation Quality Continuously

  • Verify convergence after each estimation step, not at the end
  • Check diagnostics as you go — fix issues immediately
  • Continuous quality checking prevents late-stage surprises

Quality is Built In

  • Follow existing patterns
  • Write tests for new code
  • Verify estimation convergence and diagnostics
  • Run linting before pushing
  • Use reviewer agents for complex or risky estimation changes only

Ship Complete, Reproducible Research

  • Mark all tasks completed before moving on
  • Don't leave estimation code 80% done — partial results are worse than no results
  • A finished, reproducible implementation ships; a perfect but incomplete one doesn't
  • Seeds set, dependencies pinned, pipeline runs end-to-end

Quality Checklist

Before creating PR, verify:

  • All TodoWrite tasks marked completed
  • Tests pass
  • Linting passes
  • Estimation converges with sensible parameters
  • Standard errors computed correctly
  • Diagnostic tests run and documented
  • Random seeds set and results reproducible
  • Code follows existing patterns
  • Commit messages follow conventional format
  • PR description includes estimation quality section
  • PR description includes reproducibility section
  • PR description includes research impact section
  • Plan file updated with completed checkboxes

Common Pitfalls to Avoid

  • Skipping convergence checks — verify estimation converged, don't assume it did
  • Wrong standard errors — check clustering level, robustness to heteroskedasticity, bootstrap if needed
  • Missing seeds — set random seeds BEFORE any stochastic computation
  • Ignoring plan references — the plan has code paths and method citations for a reason
  • Testing at the end — test continuously or discover convergence failures too late
  • 80% done syndrome — finish the estimation, run diagnostics, compute standard errors
  • Hardcoded paths — use relative paths, check data directory structure

Routes To

  • /workflows:review — review the implementation
  • /workflows:compound — document solutions discovered during implementation

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Workflows:Work?

Voer onderzoeksimplementatieplannen efficiënt uit, met behoud van de kwaliteit van schattingen en aandacht voor het afronden van functies.

Waarom Workflows:Work gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Workflows:Work bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Workflows:Work in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/tree/main/skills/11-James-Traina-compound-science/skills/workflows-work. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Workflows:Work gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Workflows:Work gebruiken?

Zoveel als je wilt. Je kunt Workflows:Work gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Workflows:Work gratis?

Deze skill is door brycewang-stanford op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇