datapowers

datapowers provides a robust framework for data mining and machine learning workflows, ensuring statistical integrity and rigorous validation.

<div align="center"> <h1>datapowers πŸ“Š</h1> <p><b>Data Mining Superpowers for AI Agents.</b></p> <p> <a href="https://github.com/zpower426/datapowers/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="README_zh.md"><img src="https://img.shields.io/badge/lang-%E4%B8%AD%E6%96%87-red.svg" alt="δΈ­ζ–‡"></a> <a href="https://claude.ai"><img src="https://img.shields.io/badge/Claude%20Code-Friendly-blue" alt="Claude Code Friendly"></a> <a href="https://github.com/obra/superpowers"><img src="https://img.shields.io/badge/Inspired%20by-superpowers-orange" alt="Inspired by superpowers"></a> </p> </div>

datapowers is a professional data mining and machine learning workflow protocol for Claude Code, Gemini CLI, and autonomous agents. It bridges software engineering rigor (TDD) with data science's statistical sovereignty β€” enforcing leakage prevention, three-layer validation, and evidence-based delivery as non-negotiable pipeline gates.

πŸ” Why datapowers?

Statistical Integrity > Model Metrics. datapowers is not a prompt collection β€” it is an Audit Protocol.

  • πŸ›‘οΈ Leakage Defense β€” Systematic temporal and preprocessing leakage audits at the source, before any evaluation.
  • βš–οΈ Three-Layer Validation β€” Physical (Schema), Logical (Business Rules), and Statistical (Distribution Drift) gates block training on bad data.
  • 🚫 Point Estimate Illusions β€” Mandatory confidence intervals and significance tests on all reported results.
  • 🧠 Hypothesis-Driven β€” Forces falsifiable goal-setting and a baseline expectation before touching raw data.

βš™οΈ How It Works: Skill Loading Flow

datapowers uses a hook-based on-demand loading architecture inspired by superpowers.

Session Start
     β”‚
     β–Ό
hooks/session-start fires
     β”‚
     β”œβ”€β”€ Reads skills/using-datapowers/SKILL.md
     β”‚
     └── Injects it as session context (EXTREMELY_IMPORTANT)
               β”‚
               β–Ό
         Agent now knows:
         β€’ All 20 available skills
         β€’ Trigger keyword for each skill
         β€’ When to invoke each skill
               β”‚
               β–Ό
         Analyst asks a question
               β”‚
               β–Ό
         Agent matches trigger β†’ invokes Skill tool
               β”‚
               β”œβ”€β”€ Loads skills/<name>/SKILL.md (Iron Laws, Hard Gates, Procedure)
               β”‚
               └── Loads supplementary files as needed:
                   β€’ reference docs (e.g., assertion-anti-patterns.md)
                   β€’ pressure tests (test-pressure-1.md, ...)
                   β€’ agent prompt templates (analyst-prompt.md, ...)
                   β€’ utility scripts (pipeline-pollution-detection.sh)

Key design principles:

  • using-datapowers is always loaded β€” it is the routing table for all other skills.
  • All other skills are loaded on demand β€” no unnecessary context inflation.
  • Supplementary files are scoped β€” each skill only loads what it needs.
  • Session state persists in artifacts/analysis_manifest.json β€” the agent can resume any session without losing context.

πŸ“‹ Skills Reference

All 20 skills, organized by phase.

Phase 0 β€” Entry & State

SkillWhen to UseKey Output
using-datapowersAlways loaded at session startRouting table: all skills + trigger keywords
analysis-manifestSession start; "Where are we?"; after brainstormingartifacts/analysis_manifest.json β€” single source of truth for session state

Phase 1 β€” Design

SkillWhen to UseKey Output
brainstorming"Analyze X", "Design spec", "Hypothesis"docs/datapowers/specs/ design doc with β‰₯3 falsifiable hypotheses
writing-analysis-plansAfter brainstorming approvaldocs/datapowers/plans/ plan with 15–30 min tasks, no placeholders

Phase 2 β€” Data Understanding

SkillWhen to UseKey Output
data-profilingNew dataset; before any subagent dispatchartifacts/data_profile.md β€” high-density PII-free profile
data-explorationFirst-time dataset exploration; EDA requesteddocs/datapowers/eda/ report; leakage candidate flags
data-validationBefore any model training or feature engineeringPandera validation report; BLOCK / PROCEED verdict

Phase 3 β€” Feature Engineering & Modeling

SkillWhen to UseKey Output
leakage-guardTemporal dataset; before feature engineering reviewBLOCKED / NEEDS_HUMAN_REVIEW / APPROVED verdict
feature-engineeringBuilding or transforming featuresFitted transformers saved to artifacts/; Feature Registry updated
test-driven-data-scienceBefore any model.fit() callThree-layer assertion results; training blocked on CRITICAL failures
model-selectionChoosing between candidate modelsBaseline comparison table; Optuna HPO results (β‰₯50 trials)
model-evaluationFinal test set evaluationBootstrap CIs; SHAP summary; one-time test set gate

Phase 4 β€” Execution & Review

SkillWhen to UseKey Output
executing-plans"Start tasks", "Follow plan"Two-stage review per task: Statistical β†’ Code Quality
subagent-driven-analysisMulti-task parallel analysisParallel analyst subagents with isolated context; review gating
requesting-statistical-review"Audit results", "Significance", after task completionStatistical review verdict: APPROVED / ISSUES FOUND / BLOCKED
debugging-pipelinesPipeline error; unexpected model behavior; performance dropRoot cause investigation log; PSI drift report

Phase 5 β€” Delivery

SkillWhen to UseKey Output
verification-before-delivery"Done", "Complete", before any deliveryArtifact integrity checklist; reproducibility confirmation
report-writingFinal stakeholder reportReproducibility-header report with CIs and significance tests
finishing-an-analysis-branchAnalysis complete; ready to deliverCommit / PR / archive options; manifest-gated delivery

Meta

SkillWhen to UseKey Output
writing-data-skills"New skill", "Add skill", "Contribute skill"New SKILL.md passing Statistical Pressure Test (3 scenarios)

πŸš€ The Core Workflow

brainstorming β†’ writing-analysis-plans
      β”‚
      β–Ό
data-profiling β†’ data-exploration β†’ data-validation
      β”‚
      β–Ό
leakage-guard β†’ feature-engineering β†’ test-driven-data-science
      β”‚
      β–Ό
model-selection β†’ model-evaluation
      β”‚
      β–Ό
executing-plans (with requesting-statistical-review per task)
      β”‚
      β–Ό
verification-before-delivery β†’ report-writing β†’ finishing-an-analysis-branch

At any step: analysis-manifest tracks completed stages. debugging-pipelines handles any unexpected failures. subagent-driven-analysis can parallelize independent tasks.


πŸ› οΈ Installation

Claude Code

# Install the plugin
/plugin install https://github.com/zpower426/datapowers

# Or clone and install locally
git clone https://github.com/zpower426/datapowers
cd datapowers
/plugin install .

How it works: .claude-plugin/plugin.json registers the hooks directory. On every session start, hooks/session-start fires and injects using-datapowers skill content into the session context automatically.

Gemini CLI

gemini extensions install https://github.com/zpower426/datapowers

The GEMINI.md file and gemini-extension.json manifest handle skill path registration.

OpenCode

git clone https://github.com/zpower426/datapowers ~/.opencode/plugins/datapowers

The .opencode/plugins/datapowers.js plugin injects bootstrap context via system prompt transform and auto-registers the skills directory.

Cursor / Codex

See .cursor-plugin/plugin.json and .codex/INSTALL.md for setup instructions.


βš–οΈ Iron Laws

DomainIron Law
EDANO MODELING WITHOUT EXPLORATORY DATA ANALYSIS
ValidationNO TRAINING WITHOUT DATA QUALITY VALIDATION
LeakageNO TRANSFORMERS FIT ON FULL DATASET BEFORE TRAIN/TEST SPLIT
EvaluationTEST SET EVALUATED EXACTLY ONCE β€” AT THE END
DeliveryNO DELIVERY WITHOUT CONFIDENCE INTERVALS AND SIGNIFICANCE TESTS
ReviewSTATISTICAL AUDIT ALWAYS PRECEDES CODE QUALITY REVIEW

πŸ“ˆ Star History

Star History Chart

🀝 Contributing

Contributions welcome. Read the writing-data-skills skill first β€” every new skill must pass the Statistical Pressure Test (balanced data, 1:100 imbalance, n < 200 small sample) before merge.

<a href="https://github.com/zpower426/datapowers/graphs/contributors"> <img src="https://contrib.rocks/image?repo=zpower426/datapowers" /> </a>

❀️ Acknowledgments

datapowers is inspired by and built on the shoulders of superpowers by Jesse Vincent (@obra).

The hook-based on-demand skill loading architecture, Iron Laws pattern, and Hard Gates design are all adapted from the superpowers family β€” extended here for the specific demands of statistical rigor in data science.

πŸ“œ License

MIT License