swe-workflow-skills 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: exploratory-data-analysis
3
+ description: "Explore and profile an unfamiliar dataset before modeling or analysis — structural profiling, missingness structure, distributions and outliers, feature–target relationships, leakage awareness, and explicit hypothesis generation. Pipeline-level data trust (broken dashboards, tests, contracts, freshness) → data-quality; formal inference on the hypotheses → statistical-analysis."
4
+ when_to_use: "Triggers: explore this dataset, EDA, profile the data, what's in this data, first look at the data, understand this CSV, distributions, outliers, missing values, correlation, data leakage."
5
+ model: sonnet
6
+ allowed-tools: Read, Grep, Glob, Write, Edit, Bash
7
+ ---
8
+
9
+ # Exploratory Data Analysis
10
+
11
+ Understand a dataset before trusting it with a model or a decision. The output
12
+ of EDA is not a pile of statistics — it is a documented understanding: what the
13
+ data is, what's wrong or surprising in it, and a set of explicit hypotheses to
14
+ test next. Every step below feeds that document.
15
+
16
+ ## Workflow
17
+
18
+ ### 1. Frame the goal and the grain
19
+
20
+ Before profiling anything, write down what decision or model this data will
21
+ feed, and establish the **grain**: what does one row represent (an order? a
22
+ customer? a customer-month?)? Duplicate keys and mixed grains invalidate every
23
+ later statistic. If the eventual use is prediction, note *when* the prediction
24
+ would be made — that timestamp drives the leakage checks in step 5.
25
+
26
+ ### 2. Profile structurally
27
+
28
+ Column types, ranges, cardinality, and summary statistics for every column —
29
+ cheaply, before any deep dive. Triage wide tables by metadata first (null rate,
30
+ cardinality, type) and prioritize columns by relevance to the goal; don't
31
+ profile 400 columns equally.
32
+
33
+ If the data doesn't fit in memory: push aggregations down to the warehouse
34
+ (SQL), or use an out-of-core/lazy engine (DuckDB, Polars). When you sample,
35
+ **sample representatively** — random or stratified, never `head()` (files are
36
+ usually ordered by time or id) — and state the caveat that rare events and
37
+ extreme outliers can be missed under sampling; verify those against the full
38
+ data with targeted queries.
39
+
40
+ ### 3. Map the missingness structure
41
+
42
+ Null counts are the start, not the answer. Distinguish:
43
+
44
+ - **Random gaps** — sporadic nulls, roughly uniform across segments.
45
+ - **Structural missingness** — a column populated only for some segment, after
46
+ some date, or by some source system. Cross-tab null rates against segments
47
+ and time to find these.
48
+ - **Informative missingness** — where the *fact* that a value is missing
49
+ predicts the outcome (e.g., income missing for churned users). Flag it; it
50
+ may be a feature, or it may be leakage.
51
+
52
+ Also check for disguised missing values: sentinel codes (0, -1, 999,
53
+ "unknown", empty string) that aren't NULL.
54
+
55
+ ### 4. Distributions and outliers
56
+
57
+ For key numeric columns: quantiles, histograms, and an outlier pass (IQR or
58
+ similar). For categoricals: frequency tables and rare-level counts. Decide for
59
+ each outlier cluster whether it is a data error, a unit mismatch, or a genuine
60
+ tail — **never drop outliers before classifying them**; genuine tails are often
61
+ the interesting part. Check skew before assuming any statistic (mean, std) is
62
+ representative.
63
+
64
+ ### 5. Target definition, balance, and leakage
65
+
66
+ If the data will feed a model:
67
+
68
+ - **Define the target explicitly** (e.g., "churn = no order in 90 days after
69
+ cutoff") and check its **class balance** — a 2% positive rate changes the
70
+ whole modeling and evaluation approach downstream.
71
+ - **Hunt for leakage**: any column recorded at-or-after the outcome
72
+ (cancellation reason, final status, updated_at aggregates), and proxies that
73
+ encode the outcome indirectly. Test: "would this value exist at prediction
74
+ time?" If unsure, trace how the column is produced. A too-good correlation
75
+ with the target is a leakage smell, not a win.
76
+
77
+ ### 6. Relationships, not just profiles
78
+
79
+ Univariate profiles alone don't generate hypotheses. Examine bivariate
80
+ structure: correlations among candidate features, and each candidate feature
81
+ against the target (grouped rates, means by decile, simple cross-tabs). Note
82
+ confounders — a feature↔target association may be explained by segment or
83
+ time. This is where most real hypotheses come from.
84
+
85
+ ### 7. Write the hypotheses and hand off
86
+
87
+ Close with a short findings document: data issues found, columns excluded and
88
+ why (especially leakage suspects), and **explicit hypotheses phrased as
89
+ testable statements** ("weekend signups churn more", "the price effect is
90
+ driven by segment X") plus open questions for the data owners. Formal testing
91
+ of those hypotheses is `statistical-analysis` territory; feature/training
92
+ pipeline work is `ml-pipeline-design`.
93
+
94
+ ## Principles
95
+
96
+ - **KISS**: value counts and group-by rates beat clever visualizations for
97
+ finding problems fast.
98
+ - **YAGNI**: profile to the goal — an exhaustive 400-column report nobody reads
99
+ is not EDA.
100
+ - **Honest accounting**: record what you did NOT check (columns skipped,
101
+ sample-size limits) in the findings doc.
102
+
103
+ ## Cross-skill boundaries
104
+
105
+ - Bad data in a *pipeline or dashboard* (freshness, contracts, dbt tests,
106
+ lineage) → **data-quality** — that's an operational trust problem, not
107
+ exploration of an unfamiliar dataset.
108
+ - Formal hypothesis testing, experiment design, significance → **statistical-analysis**.
109
+ - Turning the analysis into scheduled production code → **notebook-to-production**.
110
+ - Schema design for storing the data → **data-modeling**.
@@ -0,0 +1,43 @@
1
+ {
2
+ "skill_name": "exploratory-data-analysis",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "I just got a CSV export of our customer orders — about 200k rows, 30 columns — and I've never seen this data before. We eventually want a churn model out of it. Where do I start?",
7
+ "expected_output": "Should run a structured EDA workflow: profile columns first, examine missingness patterns and distributions, look at the target definition and class balance, flag potential leakage columns, and turn findings into explicit hypotheses — not jump to modeling.",
8
+ "assertions": [
9
+ "Profiles the dataset first (column types, ranges, cardinality, summary statistics) before giving any modeling advice",
10
+ "Examines missingness patterns and distinguishes random gaps from structural ones (e.g., a column only populated for some segment)",
11
+ "Checks distributions and flags outliers or skew with concrete methods (quantiles, histograms, IQR or similar)",
12
+ "Warns about target leakage — columns that would not be available at prediction time must be identified and excluded",
13
+ "Examines how the churn target would be defined and its class balance before any modeling",
14
+ "Looks at relationships between candidate features and the target, not just univariate profiles",
15
+ "Produces explicit hypotheses or follow-up questions from the findings rather than only reporting statistics"
16
+ ]
17
+ },
18
+ {
19
+ "id": 2,
20
+ "prompt": "I need to understand a warehouse extract with 400 columns and 3 million rows by Friday, and pandas kills my laptop when I load it. What's the plan?",
21
+ "expected_output": "Should scale the EDA workflow instead of abandoning it: triage columns cheaply first, work on a representative sample or push aggregations to the warehouse, and prioritize by the analysis goal rather than exhaustively profiling everything.",
22
+ "assertions": [
23
+ "Recommends sampling or chunked/out-of-core processing instead of loading everything into memory",
24
+ "Notes the sample must be representative (random or stratified) and flags the caveat that rare events and outliers can be missed under sampling",
25
+ "Triages the 400 columns cheaply (types, null rates, cardinality) before deep-diving any of them",
26
+ "Prioritizes columns by relevance to the stated goal rather than profiling all 400 equally",
27
+ "Suggests pushing heavy aggregations down to the warehouse via SQL, or using a lazy/out-of-core engine (e.g., Polars, DuckDB, Dask)",
28
+ "Still covers the core EDA checklist (types, missingness, distributions, key relationships) on the reduced view"
29
+ ]
30
+ },
31
+ {
32
+ "id": 3,
33
+ "prompt": "Our finance dashboard has shown wrong revenue numbers all week — the nightly job loads orders into the warehouse and something is off upstream. Can you help me analyze the data and find the problem?",
34
+ "expected_output": "Should recognize this as a pipeline-level data-trust problem, not exploration of an unfamiliar dataset — hand off to the data-quality skill (dbt tests, freshness, schema drift, contracts, lineage) rather than starting a dataset-profiling workflow.",
35
+ "assertions": [
36
+ "Recognizes this as a data-quality / pipeline-trust problem rather than exploratory analysis of a new dataset",
37
+ "Hands off to or invokes the data-quality skill instead of running a generic EDA workflow",
38
+ "Points at concrete data-quality directions (dbt tests, source freshness, schema drift, upstream contract, lineage/blast radius) as the right path",
39
+ "Does not respond with a dataset-profiling/distributions workflow as the primary answer"
40
+ ]
41
+ }
42
+ ]
43
+ }
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: git-workflow
3
- description: "Write commit messages, PR descriptions, and manage branching strategy following conventional commits. Triggers: write a commit message, commit this, PR description, pull request, branching strategy, git workflow, squash commits, rebase, conventional commits, how should I commit this, review staged changes."
3
+ description: "Write commit messages, PR descriptions, and manage branching strategy following conventional commits."
4
+ when_to_use: "Triggers: write a commit message, commit this, PR description, pull request, branching strategy, git workflow, squash commits, rebase, conventional commits, how should I commit this, review staged changes."
4
5
  model: haiku
5
6
  allowed-tools: Read, Grep, Glob, Write, Edit
6
7
  ---
@@ -13,11 +14,13 @@ Help write clear commit messages, structured PR descriptions, and manage branchi
13
14
 
14
15
  ### Step 1: Analyze the Changes
15
16
 
16
- Read the staged changes to understand what was done:
17
+ Currently staged (live at skill load; empty when nothing is staged, this isn't a
18
+ git repo, or injection is disabled):
17
19
 
18
- ```bash
19
- git diff --staged
20
- ```
20
+ !`git diff --staged --stat 2>/dev/null || true`
21
+
22
+ If the summary above is empty or not enough to understand the change, run
23
+ `git diff --staged` yourself for the full diff.
21
24
 
22
25
  Identify:
23
26
  - **What changed?** (files modified, functions added/removed, logic altered)
@@ -68,14 +71,17 @@ Before committing, check:
68
71
 
69
72
  ### Step 1: Analyze the Branch
70
73
 
71
- Read the changes in the branch:
74
+ Branch state vs the default branch (live at skill load; tries `main` then
75
+ `master`):
72
76
 
73
- ```bash
74
- git log main..HEAD --oneline
75
- git diff main...HEAD --stat
76
- ```
77
+ !`git log main..HEAD --oneline 2>/dev/null || git log master..HEAD --oneline 2>/dev/null || true`
78
+
79
+ !`git diff main...HEAD --stat 2>/dev/null || git diff master...HEAD --stat 2>/dev/null || true`
77
80
 
78
- Understand the full scope of changes across all commits.
81
+ If the output above is empty or the repo uses a different default branch, run the
82
+ equivalents against the actual base branch. Understand the full scope of changes
83
+ across all commits — run the full `git diff <base>...HEAD` when the stat summary
84
+ isn't enough.
79
85
 
80
86
  ### Step 2: Write the PR Description
81
87
 
@@ -106,9 +112,10 @@ Help set up or improve branching conventions. Ask about team size and release ca
106
112
 
107
113
  **For small teams (1-5 devs) or continuous deployment:**
108
114
  - `main` — always deployable
109
- - `feat/description` — feature branches, short-lived (1-3 days)
110
- - `fix/description`bug fix branches
111
- - Merge to main via PR, deploy from main
115
+ - Branch naming: `feat/<description>`, `fix/<description>` — short-lived (1-3 days)
116
+ - Merge to main via PR **squash-merge by default** (one clean commit per logical
117
+ change on main); one approval is the right review bar at this size
118
+ - Deploy from main
112
119
 
113
120
  **For medium teams (5-15 devs) or scheduled releases:**
114
121
  - `main` — production
@@ -1,13 +1,19 @@
1
1
  ---
2
2
  name: ml-pipeline-design
3
- description: "Design reproducible ML training and data pipelines — ingestion, validation, feature engineering, training, evaluation, continuous training orchestration. Triggers: training pipeline, ML data pipeline, feature engineering, ETL for ML, continuous training, data validation, feature store, preprocessing, notebook to pipeline, orchestrate training, Kubeflow, pipeline DAG, point-in-time features. Analytics/BI ELT and dbt warehouse pipelines data-pipeline-design."
3
+ description: "Design reproducible ML training and data pipelines — ingestion, validation, feature engineering, training, evaluation, continuous training orchestration. Analytics/BI ELT and dbt warehouse pipelines data-pipeline-design; refactoring general analysis/reporting notebooks (no model training) to production codenotebook-to-production."
4
+ when_to_use: "Triggers: training pipeline, ML data pipeline, feature engineering, ETL for ML, continuous training, data validation, feature store, preprocessing, notebook to training pipeline, orchestrate training, Kubeflow, pipeline DAG, point-in-time features."
4
5
  model: opus
5
6
  allowed-tools: Read, Grep, Glob, Write, Edit, Bash
6
7
  ---
7
8
 
8
9
  # ML Pipeline Design
9
10
 
10
- Design reproducible, automated ML pipelines that transform notebooks into production-grade workflows. A pipeline is the difference between "I ran this notebook and got good results" and "this system produces, validates, and deploys models automatically."
11
+ Design reproducible, automated ML pipelines that transform training notebooks into production-grade workflows. A pipeline is the difference between "I ran this notebook and got good results" and "this system produces, validates, and deploys models automatically."
12
+
13
+ Scope check first: if the notebook does NOT train a model — it's analysis,
14
+ KPIs, or reporting — this is not a training pipeline; use the
15
+ `notebook-to-production` skill (modules, tests, parameterization, scheduling)
16
+ instead.
11
17
 
12
18
  ## Why Pipelines Matter
13
19
 
@@ -29,6 +29,16 @@
29
29
  "Recommends the pipeline should FAIL on bad data, not train on it",
30
30
  "Provides concrete implementation (Great Expectations or Pandera)"
31
31
  ]
32
+ },
33
+ {
34
+ "id": 3,
35
+ "prompt": "I have a Jupyter notebook that pulls last month's sales from the warehouse, computes exec KPIs, and emails a report. I want it to run on a schedule instead of me running it by hand — how do I turn this notebook into production code?",
36
+ "expected_output": "Should recognize there is no model training involved — this is a general analysis/reporting notebook — and hand off to the notebook-to-production skill (modules, tests, parameterization, scheduling) rather than designing an ML training pipeline.",
37
+ "assertions": [
38
+ "Recognizes no model training is involved, so this is not an ML training pipeline",
39
+ "Hands off to or invokes the notebook-to-production skill for the refactor",
40
+ "Does not propose ML-specific machinery (feature stores, training DAGs, model evaluation gates) for a reporting notebook"
41
+ ]
32
42
  }
33
43
  ]
34
44
  }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: notebook-to-production
3
+ description: "Refactor analysis notebooks into production-grade code — triage what deserves productionizing, extract modules with tests, parameterize hardcoded values, pin environments for reproducibility, and schedule unattended runs with alerting. Owns general analysis/reporting notebooks; notebooks that feed model TRAINING (feature engineering + training DAGs, scheduled retraining) → ml-pipeline-design."
4
+ when_to_use: "Triggers: productionize this notebook, notebook to script, notebook to module, refactor my notebook, parameterize notebook, papermill, schedule this analysis, reproducible analysis, notebook is a mess."
5
+ model: opus
6
+ allowed-tools: Read, Grep, Glob, Write, Edit, Bash
7
+ ---
8
+
9
+ # Notebook to Production
10
+
11
+ Turn exploratory notebooks into code that runs unattended, produces the same
12
+ result twice, and fails loudly. The refactor is incremental — the notebook
13
+ keeps working at every step — never a from-scratch rewrite.
14
+
15
+ ## Workflow
16
+
17
+ ### 1. Triage — not every notebook earns this
18
+
19
+ Productionize by **re-run frequency × business impact**. A notebook someone
20
+ re-runs by hand every quarter is the first candidate; a one-off exploration is
21
+ not — **archive it reproducibly instead**: the query or a data snapshot, a
22
+ pinned environment (`pip freeze` at minimum), and a one-line header (question,
23
+ finding, date, author). "Archived" without the data recipe and environment is
24
+ deleted-with-extra-steps.
25
+
26
+ For a backlog of many notebooks, also: extract logic duplicated across them
27
+ into a shared utility package (one fix, not N), and set a lightweight
28
+ convention for future notebooks likely to graduate — imports at top,
29
+ parameters in the first cell, logic in functions — so the next migration is
30
+ cheap.
31
+
32
+ ### 2. Extract logic into modules
33
+
34
+ Move transformations out of cells into importable, typed functions in a real
35
+ package (`src/`), leaving the notebook as a thin driver that imports and
36
+ calls. Separate I/O (load/save) from transformation logic — pure
37
+ transformation functions are what you can test. Restartability check: does it
38
+ run top-to-bottom in a fresh kernel? Hidden execution-order state is the first
39
+ bug this flushes out.
40
+
41
+ ### 3. Parameterize everything hardcoded
42
+
43
+ Dates, paths, connection strings, thresholds → function arguments driven by a
44
+ config file or CLI args (or papermill parameters if the notebook itself stays
45
+ the execution vehicle). The run for "last month" and the backfill for "March
46
+ 2024" must be the same code with different parameters.
47
+
48
+ ### 4. Test the transformations
49
+
50
+ The extracted pure functions get unit tests: known-input → known-output cases,
51
+ plus edge cases the data will eventually throw (empty frame, nulls, duplicate
52
+ keys, timezone boundaries). A small golden sample of real data as a fixture
53
+ catches most regressions. No tests, no schedule — an untested unattended job
54
+ is a silent-corruption machine.
55
+
56
+ ### 5. Pin the environment
57
+
58
+ Reproducibility means the same code AND the same dependencies: a lock file
59
+ (`uv lock`, `poetry.lock`, `pip-compile`) or a container image. Pin the data
60
+ too where possible — snapshot inputs or record query + as-of timestamp, so a
61
+ rerun of last month's report produces last month's numbers.
62
+
63
+ ### 6. Schedule and operate
64
+
65
+ Size the scheduler to the team: cron or a CI schedule (GitHub Actions) first;
66
+ an orchestrator (Airflow/Dagster) only when there are real DAG dependencies
67
+ across jobs. Unattended means operated: fail loudly (alert on failure AND on
68
+ suspicious output — empty result, row count off), log enough to debug a 6am
69
+ failure, and make the job idempotent so a retry can't double-append or
70
+ double-send.
71
+
72
+ ## Principles
73
+
74
+ - **Incremental (KISS)**: extract one section at a time; the notebook keeps
75
+ running throughout.
76
+ - **YAGNI**: no orchestrator, feature store, or microservice for a weekly
77
+ report — cron + a tested module is production.
78
+ - **SRP**: load, transform, and render are separate functions with separate
79
+ tests.
80
+
81
+ ## Cross-skill boundaries
82
+
83
+ - The notebook trains a model (feature engineering, training, evaluation,
84
+ retraining schedule) → **ml-pipeline-design** — training pipelines have
85
+ their own stage/validation/gating design.
86
+ - Recurring ELT into a warehouse feeding many consumers → **data-pipeline-design**.
87
+ - Still figuring out what the analysis should say → **exploratory-data-analysis**.
88
+ - CI mechanics for the scheduled run → **cicd-pipeline**; test design depth →
89
+ **test-suite-design**.
@@ -0,0 +1,42 @@
1
+ {
2
+ "skill_name": "notebook-to-production",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "My analysis notebook pulls monthly sales data, cleans it, computes KPI aggregates, and generates charts for a report. Management wants this delivered automatically every Monday morning. It's 800 lines of cells with hardcoded dates and file paths. How do I productionize it?",
7
+ "expected_output": "Should refactor incrementally: extract the logic into importable modules, parameterize the hardcoded dates/paths, add tests for the transformations, pin the environment for reproducibility, schedule the Monday run with failure alerting — not rewrite from scratch.",
8
+ "assertions": [
9
+ "Extracts notebook logic into importable modules/functions rather than leaving everything in cells",
10
+ "Parameterizes the hardcoded dates and paths (config file, CLI args, or papermill-style notebook parameters)",
11
+ "Adds tests for the extracted transformation logic",
12
+ "Pins the environment for reproducibility (lock file, pinned requirements, or a container)",
13
+ "Sets up scheduling for the Monday run sized to the team (cron or CI schedule before reaching for a heavy orchestrator)",
14
+ "Addresses failure handling and alerting for the unattended run",
15
+ "Proposes an incremental refactor path rather than a from-scratch rewrite"
16
+ ]
17
+ },
18
+ {
19
+ "id": 2,
20
+ "prompt": "Our team has 30+ research notebooks accumulated over two years. Some are one-off explorations, some get re-run every quarter by hand. We can't productionize everything — what should we do?",
21
+ "expected_output": "Should triage rather than migrate everything: productionize the recurring high-impact notebooks first, archive one-offs with enough context to be reproducible, extract shared utilities for duplicated logic, and set a lightweight standard for future notebooks.",
22
+ "assertions": [
23
+ "Triages the notebooks instead of proposing to productionize all 30+ — one-off explorations stay notebooks",
24
+ "Prioritizes by re-run frequency and business impact (the quarterly hand-run ones first)",
25
+ "Recommends archiving one-offs with enough context to reproduce them later (data snapshot or query, pinned environment)",
26
+ "Proposes extracting shared utilities for logic duplicated across notebooks",
27
+ "Suggests a lightweight convention for future notebooks that are likely to need productionizing",
28
+ "Does not propose a big-bang migration of everything"
29
+ ]
30
+ },
31
+ {
32
+ "id": 3,
33
+ "prompt": "I have a notebook that does feature engineering on our user events and trains a ranking model. I want to turn it into a pipeline that retrains automatically every week.",
34
+ "expected_output": "Should recognize this notebook feeds model TRAINING — feature engineering, training, evaluation, scheduled retraining — and hand off to the ml-pipeline-design skill for the training-pipeline DAG, rather than doing a general notebook-to-module refactor.",
35
+ "assertions": [
36
+ "Recognizes the notebook feeds model training and hands off to or invokes the ml-pipeline-design skill",
37
+ "Names training-pipeline concerns (pipeline DAG stages, data validation, evaluation gate, retraining schedule) as ml-pipeline-design territory",
38
+ "Does not respond with only a generic notebook-to-module refactor as the primary answer"
39
+ ]
40
+ }
41
+ ]
42
+ }
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: project-documentation
3
- description: "Write and maintain project docs — README, contributing guides, API docs, changelogs, inline docs. Triggers: write a README, document this project, create documentation, contributing guide, changelog, API docs, how do I document, this needs docs, onboarding docs, JSDoc, docstrings."
3
+ description: "Write and maintain project docs — README, contributing guides, API docs, changelogs, inline docs."
4
+ when_to_use: "Triggers: write a README, document this project, create documentation, contributing guide, changelog, API docs, how do I document, this needs docs, onboarding docs, JSDoc, docstrings."
4
5
  model: haiku
5
6
  allowed-tools: Read, Grep, Glob, Write, Edit
6
7
  ---
@@ -87,9 +88,11 @@ Follow Keep a Changelog conventions:
87
88
 
88
89
  See [templates/changelog.md](templates/changelog.md) for the format.
89
90
 
90
- Accumulate entries under `[Unreleased]` as changes land; promoting them to a version
91
- heading happens at release time version choice, tagging, and automated changelog
92
- generation are `release-management`'s domain.
91
+ Accumulate entries under `[Unreleased]` as changes land. Writing the entries is this
92
+ skill's work even when they must be reconstructed from git history — read the log
93
+ since the last tag, drop trivial commits (merges, typo fixes), and translate the rest
94
+ into user-perspective entries under the sections above. Hand off only the release
95
+ mechanics (version choice, tagging, publish automation) to `release-management`.
93
96
 
94
97
  ## Workflow: Inline Documentation
95
98
 
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: project-review
3
- description: "Review a built project's execution health before a milestone — scope alignment, roadmap / execution-plan adherence, implementation maturity (what's production-ready vs stub/deferred), and the evidence it actually works (tests, coverage, validation results, changelog). Triggers: project review, execution review, are we on track, implementation vs roadmap, scope drift, readiness review, what's actually built, validation results review, pre-launch review. Use strategic-review for vision/positioning/market; technical-debt-review for a pure code-health audit."
3
+ description: "Review a built project's execution health before a milestone — scope alignment, roadmap / execution-plan adherence, implementation maturity (what's production-ready vs stub/deferred), and the evidence it actually works (tests, coverage, validation results, changelog). Use strategic-review for vision/positioning/market; technical-debt-review for a pure code-health audit."
4
+ when_to_use: "Triggers: project review, execution review, are we on track, implementation vs roadmap, scope drift, readiness review, what's actually built, validation results review, pre-launch review."
4
5
  model: opus
6
+ context: fork
7
+ agent: general-purpose
5
8
  allowed-tools: Read, Grep, Glob, WebFetch, Write, Edit
6
9
  ---
7
10
 
@@ -90,9 +93,16 @@ Produce ranked, severity-tagged findings, each tied to its evidence:
90
93
  - **An execution scorecard** — maturity, roadmap-adherence, evidence-strength,
91
94
  each rated with a one-line justification, so the reader gets the picture at a glance.
92
95
 
96
+ **Write the full report to a file** — default a gitignored location (e.g.
97
+ `.local/project-review-<date>.md`) unless told otherwise — and state its path in
98
+ your final summary. This skill runs in a forked context: only the summary returns
99
+ to the main conversation, so anything not written to disk is lost. If a judgment
100
+ call needs user input (ambiguous scope boundary, missing baseline docs, which
101
+ milestone to measure against), do **not** guess silently — record it in an
102
+ **Open questions** section of the report and mention it in the summary.
103
+
93
104
  For the rendered deliverable (interactive HTML report, dashboards, sortable
94
- findings table), hand off to `artifact-design`. Default to writing it to a
95
- gitignored location (e.g. `.local/`) unless told otherwise.
105
+ findings table), hand off to `artifact-design`.
96
106
 
97
107
  ## Principles Applied
98
108
 
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: security-audit
3
- description: "Comprehensive security analysis — OWASP Top 10, auth/authz flows, injection vulnerabilities, data exposure, secrets detection, dependency CVEs, hardening recommendations. Triggers: security audit, vulnerability, is this secure, security review, pentest prep, OWASP, harden this, check for vulnerabilities, injection, XSS, CSRF, auth security. Reviews EXISTING code/config — design-time analysis of a system not yet built → threat-modeling."
3
+ description: "Comprehensive security analysis — OWASP Top 10, auth/authz flows, injection vulnerabilities, data exposure, secrets detection, dependency CVEs, hardening recommendations. Reviews EXISTING code/config — design-time analysis of a system not yet built → threat-modeling."
4
+ when_to_use: "Triggers: security audit, vulnerability, is this secure, security review, pentest prep, OWASP, harden this, check for vulnerabilities, injection, XSS, CSRF, auth security."
4
5
  model: opus
6
+ context: fork
7
+ agent: general-purpose
5
8
  allowed-tools: Read, Grep, Glob, Write, Edit, WebFetch, WebSearch
6
9
  ---
7
10
 
@@ -31,7 +34,7 @@ Before reviewing code line by line, map what's exposed:
31
34
  - **External integrations**: Third-party APIs, OAuth providers, payment processors
32
35
  - **Infrastructure**: Cloud services, databases, caches, queues
33
36
 
34
- Present the attack surface map to the user. Gaps in understanding here mean gaps in the audit.
37
+ Record the attack surface map as the first section of the report — gaps in understanding here mean gaps in the audit, so anything you could not map (unreachable config, undocumented integrations) goes under Open questions rather than being assumed safe.
35
38
 
36
39
  ### Step 2: Assess by OWASP Top 10
37
40
 
@@ -113,6 +116,14 @@ Suggest using the `dependency-management` skill for remediation planning.
113
116
 
114
117
  Output the audit report using the template at [templates/security-report.md](templates/security-report.md). Organize findings by severity, with Critical and High items first.
115
118
 
119
+ **Write the full report to a file** (default a gitignored location, e.g.
120
+ `.local/security-audit-<date>.md`) and state its path in your final summary — this
121
+ skill runs in a forked context: only the summary returns, everything unwritten is
122
+ lost. The summary must lead with the Critical/High count. Judgment calls that need
123
+ user input (unclear trust boundary, whether a data store is in scope, unverifiable
124
+ control) go in an **Open questions** section of the report — never silently assumed
125
+ safe.
126
+
116
127
  ## What This Skill Does NOT Cover
117
128
 
118
129
  - Runtime penetration testing (requires running the application)
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: skill-router
3
- description: "Orchestrator and entry point for the swe-workflow skills library — consult FIRST when starting any non-trivial software task; most skills load name-only and only activate when invoked here. Triggers: starting a feature, planning, an architecture or design decision, implementing, debugging, reviewing, refactoring, testing, security, deployment, an incident, shipping, or unsure which skill fits. Routes intent to the right skill(s) and invokes them by name; shows the Golden Path chains."
3
+ description: "Orchestrator and entry point for the swe-workflow skills library — consult FIRST when starting any non-trivial software task; most skills load name-only and only activate when invoked here. Routes intent to the right skill(s) and invokes them by name; shows the Golden Path chains."
4
+ when_to_use: "Triggers: starting a feature, planning, an architecture or design decision, implementing, debugging, reviewing, refactoring, testing, security, deployment, an incident, shipping, or unsure which skill fits."
4
5
  model: haiku
5
6
  allowed-tools: Read, Grep, Glob, Skill
6
7
  ---
@@ -167,6 +168,11 @@ installed skill by name, regardless of role.
167
168
  - **data-pipeline-design** — batch/streaming ELT, dbt layering, Airflow/Dagster, idempotency, backfill
168
169
  - **data-quality** — dbt tests, expectations, data contracts, freshness, lineage / blast radius
169
170
 
171
+ ### Data Science
172
+ - **exploratory-data-analysis** — profile an unfamiliar dataset: missingness structure, distributions, leakage, hypotheses
173
+ - **statistical-analysis** — hypothesis tests, experiment design/power, confidence intervals, multiple-comparison discipline
174
+ - **notebook-to-production** — refactor analysis notebooks to tested, parameterized, scheduled production code
175
+
170
176
  ## Golden Path workflow chains
171
177
 
172
178
  When work spans phases, chain skills rather than improvising:
@@ -201,6 +207,10 @@ App-store releases (signing, review, staged rollout) → `mobile-release`.
201
207
  `data-pipeline-design` (ELT, layering, orchestration) → `data-modeling`
202
208
  (marts schema) → `data-quality` (tests, contracts, freshness) →
203
209
  `observability-design` (pipeline SLOs, alerting).
210
+ Notebook to production: `exploratory-data-analysis` (understand the data) →
211
+ `statistical-analysis` (test the hypotheses) → `notebook-to-production`
212
+ (modules, tests, scheduling); if the notebook trains a model →
213
+ `ml-pipeline-design` instead.
204
214
 
205
215
  **Pre-public / pre-milestone review**
206
216
  `strategic-review` (vision, positioning, market) → `project-review` (scope,
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: statistical-analysis
3
+ description: "Design and analyze experiments and statistical tests — test selection with stated assumptions, sample size and power, effect sizes and confidence intervals over bare p-values, and pitfall discipline (multiple comparisons, p-hacking, peeking/optional stopping). Owns experiment statistics generally; live A/B evaluation of AI/LLM apps (quality metrics, judges, feedback) → ai-evaluation."
4
+ when_to_use: "Triggers: hypothesis test, t-test, chi-square, p-value, statistical significance, confidence interval, sample size, power analysis, design an experiment, A/B test, multiple comparisons, is this difference real."
5
+ model: opus
6
+ allowed-tools: Read, Grep, Glob, Write, Edit, Bash
7
+ ---
8
+
9
+ # Statistical Analysis
10
+
11
+ Get the statistics of a question right — the test, its assumptions, the
12
+ uncertainty, and the traps — so a decision rests on evidence rather than on a
13
+ lone p-value. The deliverable is a decision-ready answer: effect size,
14
+ uncertainty, assumptions, caveats.
15
+
16
+ ## Workflow
17
+
18
+ ### 1. Frame the question as a hypothesis
19
+
20
+ State the null and alternative in plain words before touching data ("the new
21
+ flow's conversion equals the old flow's"). Identify the unit of analysis
22
+ (user? session? order?) — mismatching it with the randomization unit silently
23
+ breaks independence.
24
+
25
+ ### 2. Design before data (when the experiment hasn't run yet)
26
+
27
+ - Choose the primary metric and **pre-register it** — one primary, the rest
28
+ explicitly secondary/exploratory.
29
+ - Compute **sample size from power**: minimum detectable effect worth acting
30
+ on, α (typically 0.05), power (typically 0.8). Run until n is reached —
31
+ don't stop early on a good-looking result.
32
+ - Randomize at the unit you'll analyze; check the split is balanced on key
33
+ covariates.
34
+
35
+ ### 3. Choose the test and state its assumptions
36
+
37
+ Match the test to the data (two proportions → two-proportion z-test / χ²;
38
+ means → t-test or its nonparametric fallback; counts → Poisson/χ²; paired data
39
+ → paired tests). **Always state the assumptions and check the ones you can**:
40
+ independence of observations (the usual casualty — repeated measures per user,
41
+ network effects, shared fixtures), adequate counts for normal approximations
42
+ (rule of thumb: ≥10 successes and failures per arm), variance assumptions for
43
+ t-tests. If an assumption fails, switch tests rather than pretending.
44
+
45
+ ### 4. Report effect size and interval, not a verdict
46
+
47
+ Work the actual numbers. Report the effect (absolute and relative difference)
48
+ with a **confidence interval**, and the p-value as supporting detail — never a
49
+ bare "significant/not significant". The CI is what the decision needs: a CI of
50
+ [+0.1%, +1.7%] and a CI of [+0.8%, +1.0%] are both "significant" and mean very
51
+ different things.
52
+
53
+ ### 5. Run the pitfall gate
54
+
55
+ Before reporting anything, check:
56
+
57
+ - **Peeking / optional stopping**: was n fixed in advance? Repeatedly testing
58
+ as data arrives inflates false positives badly. If peeking happened, say so
59
+ and treat the result as suggestive (or use sequential methods designed for it).
60
+ - **Multiple comparisons**: k tests at α=0.05 ≈ k/20 false positives expected.
61
+ Correct (Holm/Bonferroni for strict control, Benjamini-Hochberg FDR when many
62
+ metrics), and label post-hoc findings as exploratory — they are hypotheses
63
+ for the *next* experiment, not wins from this one.
64
+ - **Subgroup fishing**: subgroup effects found after the fact need the same
65
+ exploratory label and a confirmatory follow-up.
66
+ - **Survivorship / selection**: does the analyzed sample still represent the
67
+ population the decision is about?
68
+
69
+ ### 6. Translate to the decision
70
+
71
+ Distinguish statistical from practical significance: a real +0.05% lift may
72
+ not pay for the complexity; a non-significant result with a wide CI is "we
73
+ don't know yet", not "no effect". Give the ship/don't-ship framing with the
74
+ caveats attached, and say what additional data would resolve remaining
75
+ uncertainty.
76
+
77
+ ## Principles
78
+
79
+ - **KISS**: a well-checked z-test beats a fancy model with unexamined
80
+ assumptions.
81
+ - **Pre-register or label**: every metric is either declared up front or
82
+ reported as exploratory — no third category.
83
+ - **Uncertainty is the product**: any answer without an interval is opinion
84
+ with extra steps.
85
+
86
+ ## Cross-skill boundaries
87
+
88
+ - Live A/B testing of an AI/LLM app — defining answer quality, LLM-as-judge,
89
+ human feedback loops, eval gates → **ai-evaluation** (this skill still owns
90
+ the underlying experiment statistics if asked).
91
+ - Generating the hypotheses to test → **exploratory-data-analysis**.
92
+ - Tracking and comparing model-training runs → **ml-experiment-tracking**.
93
+ - Defining what business metric to move → **metrics-and-okrs**.