[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JP4587TWW5706SJB1H2QZX":3,"skill-same:01M6JP4587TWW5706SJB1H2QZX":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6JP4587TWW5706SJB1H2QZX","notebook-to-production",null,"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\u002Freporting notebooks; notebooks that feed model TRAINING (feature engineering + training DAGs, scheduled retraining) → ml-pipeline-design.","SWEStash\u002Fswe-workflow-skills","SWEStash","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272895713?v=4","01M6JNRQ84JN5WFK9S1V5H4G46","SWE Stash","01M6JNRQCM45X8WPNHY30TSAB0",1,"MIT","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdata-scientist\u002Fskills\u002Fnotebook-to-production\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"notebook to production","notebook","Production","model","ml-pipeline","scheduled","my","environments","modules","productionize","schedule","design","analysis","refactor","pipeline","reporting","alerting","feature engineering","code","training","2026-11-10 10:12:30",false,"---\nname: notebook-to-production\ndescription: \"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\u002Freporting notebooks; notebooks that feed model TRAINING (feature engineering + training DAGs, scheduled retraining) → ml-pipeline-design.\"\nwhen_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.\"\n---\n\n# Notebook to Production\n\nTurn exploratory notebooks into code that runs unattended, produces the same\nresult twice, and fails loudly. The refactor is incremental — the notebook\nkeeps working at every step — never a from-scratch rewrite.\n\n## Workflow\n\n### 1. Triage — not every notebook earns this\n\nProductionize by **re-run frequency × business impact**. A notebook someone\nre-runs by hand every quarter is the first candidate; a one-off exploration is\nnot — **archive it reproducibly instead**: the query or a data snapshot, a\npinned environment (`pip freeze` at minimum), and a one-line header (question,\nfinding, date, author). \"Archived\" without the data recipe and environment is\ndeleted-with-extra-steps.\n\nFor a backlog of many notebooks, also: extract logic duplicated across them\ninto a shared utility package (one fix, not N), and set a lightweight\nconvention for future notebooks likely to graduate — imports at top,\nparameters in the first cell, logic in functions — so the next migration is\ncheap.\n\n### 2. Extract logic into modules\n\nMove transformations out of cells into importable, typed functions in a real\npackage (`src\u002F`), leaving the notebook as a thin driver that imports and\ncalls. Separate I\u002FO (load\u002Fsave) from transformation logic — pure\ntransformation functions are what you can test. Restartability check: does it\nrun top-to-bottom in a fresh kernel? Hidden execution-order state is the first\nbug this flushes out.\n\n### 3. Parameterize everything hardcoded\n\nDates, paths, connection strings, thresholds → function arguments driven by a\nconfig file or CLI args (or papermill parameters if the notebook itself stays\nthe execution vehicle). The run for \"last month\" and the backfill for \"March\n2024\" must be the same code with different parameters.\n\n### 4. Test the transformations\n\nThe extracted pure functions get unit tests: known-input → known-output cases,\nplus edge cases the data will eventually throw (empty frame, nulls, duplicate\nkeys, timezone boundaries). A small golden sample of real data as a fixture\ncatches most regressions. No tests, no schedule — an untested unattended job\nis a silent-corruption machine.\n\n### 5. Pin the environment\n\nReproducibility means the same code AND the same dependencies: a lock file\n(`uv lock`, `poetry.lock`, `pip-compile`) or a container image. Pin the data\ntoo where possible — snapshot inputs or record query + as-of timestamp, so a\nrerun of last month's report produces last month's numbers.\n\n### 6. Schedule and operate\n\nSize the scheduler to the team: cron or a CI schedule (GitHub Actions) first;\nan orchestrator (Airflow\u002FDagster) only when there are real DAG dependencies\nacross jobs. Unattended means operated: fail loudly (alert on failure AND on\nsuspicious output — empty result, row count off), log enough to debug a 6am\nfailure, and make the job idempotent so a retry can't double-append or\ndouble-send.\n\n## Principles\n\n- **Incremental (KISS)**: extract one section at a time; the notebook keeps\n  running throughout.\n- **YAGNI**: no orchestrator, feature store, or microservice for a weekly\n  report — cron + a tested module is production.\n- **SRP**: load, transform, and render are separate functions with separate\n  tests.\n\n## Cross-skill boundaries\n\n- The notebook trains a model (feature engineering, training, evaluation,\n  retraining schedule) → **ml-pipeline-design** — training pipelines have\n  their own stage\u002Fvalidation\u002Fgating design.\n- Recurring ELT into a warehouse feeding many consumers → **data-pipeline-design**.\n- Still figuring out what the analysis should say → **exploratory-data-analysis**.\n- CI mechanics for the scheduled run → **cicd-pipeline**; test design depth →\n  **test-suite-design**.\n","# Notebook to Production\n\nTurn exploratory notebooks into code that runs unattended, produces the same\nresult twice, and fails loudly. The refactor is incremental — the notebook\nkeeps working at every step — never a from-scratch rewrite.\n\n## Workflow\n\n### 1. Triage — not every notebook earns this\n\nProductionize by **re-run frequency × business impact**. A notebook someone\nre-runs by hand every quarter is the first candidate; a one-off exploration is\nnot — **archive it reproducibly instead**: the query or a data snapshot, a\npinned environment (`pip freeze` at minimum), and a one-line header (question,\nfinding, date, author). \"Archived\" without the data recipe and environment is\ndeleted-with-extra-steps.\n\nFor a backlog of many notebooks, also: extract logic duplicated across them\ninto a shared utility package (one fix, not N), and set a lightweight\nconvention for future notebooks likely to graduate — imports at top,\nparameters in the first cell, logic in functions — so the next migration is\ncheap.\n\n### 2. Extract logic into modules\n\nMove transformations out of cells into importable, typed functions in a real\npackage (`src\u002F`), leaving the notebook as a thin driver that imports and\ncalls. Separate I\u002FO (load\u002Fsave) from transformation logic — pure\ntransformation functions are what you can test. Restartability check: does it\nrun top-to-bottom in a fresh kernel? Hidden execution-order state is the first\nbug this flushes out.\n\n### 3. Parameterize everything hardcoded\n\nDates, paths, connection strings, thresholds → function arguments driven by a\nconfig file or CLI args (or papermill parameters if the notebook itself stays\nthe execution vehicle). The run for \"last month\" and the backfill for \"March\n2024\" must be the same code with different parameters.\n\n### 4. Test the transformations\n\nThe extracted pure functions get unit tests: known-input → known-output cases,\nplus edge cases the data will eventually throw (empty frame, nulls, duplicate\nkeys, timezone boundaries). A small golden sample of real data as a fixture\ncatches most regressions. No tests, no schedule — an untested unattended job\nis a silent-corruption machine.\n\n### 5. Pin the environment\n\nReproducibility means the same code AND the same dependencies: a lock file\n(`uv lock`, `poetry.lock`, `pip-compile`) or a container image. Pin the data\ntoo where possible — snapshot inputs or record query + as-of timestamp, so a\nrerun of last month's report produces last month's numbers.\n\n### 6. Schedule and operate\n\nSize the scheduler to the team: cron or a CI schedule (GitHub Actions) first;\nan orchestrator (Airflow\u002FDagster) only when there are real DAG dependencies\nacross jobs. Unattended means operated: fail loudly (alert on failure AND on\nsuspicious output — empty result, row count off), log enough to debug a 6am\nfailure, and make the job idempotent so a retry can't double-append or\ndouble-send.\n\n## Principles\n\n- **Incremental (KISS)**: extract one section at a time; the notebook keeps\n  running throughout.\n- **YAGNI**: no orchestrator, feature store, or microservice for a weekly\n  report — cron + a tested module is production.\n- **SRP**: load, transform, and render are separate functions with separate\n  tests.\n\n## Cross-skill boundaries\n\n- The notebook trains a model (feature engineering, training, evaluation,\n  retraining schedule) → **ml-pipeline-design** — training pipelines have\n  their own stage\u002Fvalidation\u002Fgating design.\n- Recurring ELT into a warehouse feeding many consumers → **data-pipeline-design**.\n- Still figuring out what the analysis should say → **exploratory-data-analysis**.\n- CI mechanics for the scheduled run → **cicd-pipeline**; test design depth →\n  **test-suite-design**.\n",{"name":5,"description":7,"when_to_use":44},"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.","main","800dc9ad0ca2914d6ad15b8c5159d9b57bb104c2","plugins\u002Fdata-scientist\u002Fskills\u002Fnotebook-to-production","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills","https:\u002F\u002Fgithub.com\u002FSWEStash","A stash of things we felt like building","2026-11-12 00:14:33",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add SWEStash\u002Fswe-workflow-skills --skill notebook-to-production",{"tool":58,"command":59},"bunx","bunx skills add SWEStash\u002Fswe-workflow-skills --skill notebook-to-production",{"tool":61,"command":62},"pnpm","pnpm dlx skills add SWEStash\u002Fswe-workflow-skills --skill notebook-to-production","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdata-scientist\u002Fskills\u002Fnotebook-to-production\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"evals\u002Fevals.json","REFERENCE","参考文档",3436,"https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdata-scientist\u002Fskills\u002Fnotebook-to-production\u002Fevals\u002Fevals.json",[73,100,126,149,174,197],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6JQFADV3T1MS9V1BNZS1232","writing-skills","Use when authoring, editing, or reviewing a skill in this library — a new SKILL.md, one that under-triggers, or hardening an existing one. Covers description and listing-budget rules, frontmatter, progressive disclosure, the 3-eval rule, and pressure-testing against rationalizations.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"writing","writing skills","testing","eval","write","edit","Budget","authoring","new skill","library","frontmatter","editing","triggers","use","Existing","Rules","write a skill","when","listing","progressive disclosure",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M6JQF5DGMXPMQQVZBP8DH9SY","working-agreement","Define and validate how a multi-session project is run — where plans, status and decisions live, session routines, new work, milestone close. README\u002FCONTRIBUTING → project-documentation.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Fworking-agreement\u002FSKILL.md",[],[107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,92,125],"working agreement","project","definition of done","done","milestone","documentation","work","progress","how","contributing","close","run","sync","status","live","do","README","session","routines",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":39},"01M6JQF0SMRHN82RBSWMABC4J0","verification-before-completion","Evidence gate before any claim that work is done, fixed, passing, or deployed. Route here when a message declares the work finished or asks to commit, push, merge, ship, or close it out, including a brief sign-off, and before git-workflow or release-management act on it. Writing the commit message or PR text itself → git-workflow.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[133,134,135,136,137,138,80,139,110,140,141,142,113,143,117,144,145,146,147,148],"verification","verification before completion","brief","ready","fix","claim","workflow","commit","text","route","message","merge","release","git","act","ship",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":39},"01M6JQEVGE9NJZ11DV60AE6VWC","ui-ux-design","Design user experiences from an engineer's perspective — user flows, wireframes, interaction patterns, responsive strategy, navigation, loading\u002Ferror\u002Fempty states. Triggers: design the UI, user flow, wireframe, how should this screen look, loading state, error state, empty state, responsive design, navigation, page layout, form design, mockup.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Fui-ux-design\u002FSKILL.md",[],[30,156,157,158,159,160,161,162,163,164,165,166,115,167,168,169,170,171,172,173],"ux","ui","ui ux design","error","states","loading","flows","engineer","interaction","layout","responsive design","screen","flow","patterns","mockup","responsive","form","page",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":39},"01M6JQEN4HVFTZWQYWGTDS76K9","threat-modeling","Design-time security analysis of a system or feature before it's built — trust boundaries, attack surface, STRIDE per element, abuse cases, prioritized mitigations that become security requirements. Triggers: threat model, STRIDE, trust boundary, attack surface, what could go wrong security-wise, security design review, abuse case, secure this design, security requirements. Reviewing EXISTING code\u002Fconfig for vulnerabilities → security-audit; use this skill while the design is still on the whiteboard.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Fthreat-modeling\u002FSKILL.md",[],[181,182,183,22,184,185,30,186,187,31,37,188,189,190,191,192,193,194,195,196],"modeling","threat modeling","threat","time","element","whiteboard","security analysis","review","threat model","audit","security-audit","secure","config","go","security","trust",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"publishedAt":39},"01M6JQEFT7VT3FQM16170EG9FW","test-suite-design","Design comprehensive test suites for existing code — strategy across unit\u002Fintegration\u002Fe2e, fixtures, factories, helpers. Triggers: add tests, write tests for, increase coverage, test this module, testing strategy, test plan, what tests do I need, test infrastructure, test helpers, this has no tests. Not for TDD — use tdd-workflow.","https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftest-suite-design\u002FSKILL.md",[],[30,204,205,206,207,208,82,209,210,139,37,211,212,84,213,214,122,215,216,92],"test suite","test","test suite design","coverage","unit","write tests","testing strategy","across","plan","add","infrastructure","test plan","for"]