new-analysis

Scaffold a new analysis module with tests inside an existing TDA domain package.

1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/ZK-Theory/TDL --skill new-analysis-zk-theory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-analysis
Source: https://github.com/ZK-Theory/TDL/tree/main/.github/skills/new-analysis
Command: npx skills add https://github.com/ZK-Theory/TDL --skill new-analysis-zk-theory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new analysis to a research codebase requires matching existing conventions for structure, typing, testing, and output handling, which is error-prone when done manually. ## Core Features & Use Cases - Guided Scaffolding: Collects the domain, analysis type, module name, inputs, and outputs before writing any code. - Convention-Aware Generation: Reads existing analysis modules in the target domain to mirror established patterns such as pure functions, type hints, and Google docstrings. - Test Creation: Generates a matching test module with unit tests on synthetic data and marked integration tests. - Use Case: A researcher wants to add a robustness check to the financial_tda domain; the Skill creates financial_tda/analysis/<module>.py plus tests/financial_tda/test_<module>.py following project conventions. ## Quick Start Ask the assistant to create a new regime analysis module named regime_shift in the financial_tda domain that consumes persistence diagrams and outputs statistics and plots.

Frequently Asked Questions about new-analysis

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

FAQPage Schema
How do I add a new analysis module to a Python research package?

Specify the target domain, analysis type, module name in snake_case, and the inputs and outputs. The Skill reads existing modules for conventions, then creates the analysis file and a matching test module with unit and integration tests.

What domains does this analysis scaffolding support?

It supports the financial_tda, poverty_tda, and trajectory_tda domain packages. New modules are placed in the domain's analysis/ directory with tests under tests/<domain>/.

What coding conventions does the generated analysis module follow?

Generated code uses pure functions with full type hints and Google-style docstrings, isolates side effects in main() or save_* functions, accepts output_dir as a Path parameter, and reports statistics with p-values and effect sizes.

Does the generated module include tests?

Yes, it creates tests/<domain>/test_<module_name>.py containing unit tests for pure computation functions using synthetic data, plus integration tests marked for cases requiring real data.

When should I not use this scaffolding approach?

Avoid it when adding code outside the three TDA domain packages or when the change is a small edit to an existing module rather than a new analysis. It is designed for new modules following established project conventions.