setup-analyses

Scaffold session-local analysis code and Hydra configs from spec markdown files.

108|37|Updated Apr 25, 2025
One-click install
npx skills add https://github.com/goodfire-ai/causalab --skill setup-analyses
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-analyses
Source: https://github.com/goodfire-ai/causalab/tree/main/.claude/skills/setup-analyses
Command: npx skills add https://github.com/goodfire-ai/causalab --skill setup-analyses

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up a new research analysis in Causalab is time-consuming and error-prone because it requires creating the right session-local package structure and Hydra config so the runner can execute it later.

Core Features & Use Cases

  • Scaffolds analysis code + configs in one go: generates ${SESSION_DIR}/code/analyses/<name>/ (including main, init, README, and the spec file) and ${SESSION_DIR}/code/configs/analysis/<name>.yaml from one or more spec paths.
  • Enforces Causalab analysis-layer conventions: ensures analysis defaults live in Hydra (not inline code), that output paths route through cfg.experiment_root, and that layering rules are respected (analyses orchestrate methods and perform I/O via causalab.io.*).
  • Supports batch provisioning: when invoked by the runner, it can scaffold multiple analysis specs sequentially with a single batch-level approval checkpoint in interactive mode.

Quick Start

Use the setup-analyses skill to scaffold one analysis from an existing spec file at 'path/to/set_up_analysis.md' by running the command: /setup-analyses path/to/set_up_analysis.md

Frequently Asked Questions about setup-analyses

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a research analysis from a spec file in Causalab?

To scaffold a research analysis, provide a spec markdown file path to generate session-local code packages and Hydra configs simultaneously. The process creates analysis wrappers, init files, and YAML configurations that route outputs through the experiment root directory.

What is Hydra config wiring and why does my analysis scaffold need it?

Hydra config wiring defines experiment parameters and output paths for research workflows. Scaffolding analysis code with Hydra ensures defaults live in configuration files rather than inline code, maintaining Causalab layering rules where analyses orchestrate methods and handle I/O separately.

How do I set up multiple experiment analyses for batch research workflows?

Batch provisioning scaffolds multiple analysis specs sequentially from provided spec paths. In interactive mode, the runner processes each spec file with a single batch-level approval checkpoint, generating corresponding code directories and Hydra YAML configs for each analysis component.

Does my spec file need YAML frontmatter to scaffold analysis code?

Yes, scaffolding analysis code requires YAML frontmatter containing name and description fields in the SKILL.md file. The spec must also follow a 5-section structure to correctly generate both the session code package and the Hydra configuration file.

Why should analysis defaults live in Hydra configs instead of inline code?

Analysis defaults must live in Hydra configs to enforce Causalab layering conventions and ensure output paths route through the experiment root. This separation prevents hardcoded paths in code, allowing the runner to execute analyses reproducibly across different experiment configurations.

What are the limitations of scaffolding session-local analyses for research DAGs?

Scaffolding session-local analyses is limited to Causalab environments requiring Hydra wiring and YAML frontmatter in specs. It does not support frameworks outside the Causalab layering system, and analyses must orchestrate methods while performing I/O exclusively through causalab.io modules.