tda-experiment
Scaffold a new TDA experiment module in the correct domain package
Install
mkdir -p .claude/skills/tda-experiment && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15834" && unzip -o skill.zip -d .claude/skills/tda-experiment && rm skill.zipInstalls to .claude/skills/tda-experiment
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Scaffold a new TDA experiment module in the correct domain packageAbout this skill
Skill: tda-experiment
Scaffold a new TDA experiment for this research project.
Your task
-
Ask the user for:
- Which domain:
financial_tda,poverty_tda, ortrajectory_tda - A short experiment name (snake_case, e.g.
sector_crisis_2024) - What topological method to use (Rips, Alpha, Mapper, Morse-Smale, etc.)
- What the hypothesis or research question is
- Which domain:
-
Determine the correct target directory:
financial_tda/experiments/<name>.pyfor financial experimentstrajectory_tda/scripts/<name>.pyfor trajectory scriptspoverty_tda/analysis/<name>.pyfor poverty analysis
-
Read one or two existing experiment files in that domain to understand the established patterns, imports, and structure.
-
Create the new experiment file following this template structure:
- Module docstring with: research question, method, expected output, references
- Typed configuration dataclass or constants section
load_data()function calling domaindata/modulescompute_topology()function calling domaintopology/modulesanalyse()function implementing the specific analysismain()function orchestrating the pipeline with loggingif __name__ == "__main__":block
-
Create a corresponding test stub in
tests/<domain>/test_<name>.pywith:- At least one smoke test
- Appropriate markers (
@pytest.mark.slowif needed,@pytest.mark.integrationif data-dependent)
-
Report back: the files created, the research question captured in the docstring, and what to run next.
Key conventions to follow
- All public functions need Google-style docstrings and type hints
- Use
pathlib.Pathfor all file paths - Use
loggingnotprint() - Save results to
results/<domain>/oroutputs/<domain>/ - Expose all tunable parameters (thresholds, window sizes, n_permutations) as function arguments with defaults
- Permutation nulls: default
n_permutations=1000 - Bootstrap CI: default
n_bootstrap=1000