[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CWJZMR4PP9024NR8NSZEQJ":3,"skill-same:01M6CWJZMR4PP9024NR8NSZEQJ":73},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6CWJZMR4PP9024NR8NSZEQJ","pipeline-stage",null,"Scaffold a new transform stage in the data pipeline — create the transformation script, schema contract, idempotency logic, and tests. Use when adding a new dbt model or pandas transform, when a new business metric needs a dedicated stage, or when asked to \"add a {name} stage to the pipeline\".","zakelfassi\u002Fskills-driven-development","zakelfassi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1274085?v=4","01M6CWHB4BNG8NYGSW0YS08B7E","Zak El Fassi","01M6CWHB8QCK700M6B2S6Y1QPD",18,"MIT","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fdata-pipeline\u002Fskills\u002Fpipeline-stage\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"pipeline stage","pipeline","data","summary","registration","schema","use","business","session","model","codex","file","pandas","data pipeline","dbt","create","scaffold","test","customer","2026-11-10 10:12:30",false,"---\nname: pipeline-stage\ndescription: Scaffold a new transform stage in the data pipeline — create the transformation script, schema contract, idempotency logic, and tests. Use when adding a new dbt model or pandas transform, when a new business metric needs a dedicated stage, or when asked to \"add a {name} stage to the pipeline\".\nmetadata:\n  forged-by: codex-agent\n  forged-from: session-2026-02-28\n  forged-reason: \"Added customer_ltv, order_summary, and refund_rate stages in one sprint; each needed the same skeleton: transform file, contract, idempotency test, registration\"\n  usage-count: \"19\"\n  last-used: \"2026-06-02\"\n---\n\n# Pipeline Stage\n\nCreate a new transform stage with idempotency guarantees, a schema contract, and tests.\n\n## Inputs\n- Stage name (snake_case, e.g., `customer_ltv`)\n- Input tables\u002Fmodels (list of upstream stage names or raw tables)\n- Output table name (usually matches stage name)\n- Grain (the primary key or unique key, e.g., `customer_id`, `(order_id, date)`)\n- Layer (`staging`, `intermediate`, `marts`)\n\n## Steps\n\n1. **Create the transform file**\n\n   For dbt:\n   ```\n   models\u002F{layer}\u002F{stage_name}.sql\n   ```\n   ```sql\n   {{ config(\n       materialized='table',\n       unique_key='{grain}'\n   ) }}\n\n   select\n       {grain},\n       -- TODO: add business logic\n       current_timestamp as updated_at\n   from {{ ref('{input_table}') }}\n   ```\n\n   For pandas ETL:\n   ```\n   pipelines\u002Ftransforms\u002F{stage_name}\u002Ftransform.py\n   ```\n   ```python\n   def run(df: pd.DataFrame) -> pd.DataFrame:\n       \"\"\"Transform {input_table} → {stage_name}.\"\"\"\n       # TODO: add business logic\n       return df\n   ```\n\n2. **Define the schema contract**\n   Create `models\u002F{layer}\u002Fschema\u002F{stage_name}.yaml` (dbt) or `pipelines\u002Ftransforms\u002F{stage_name}\u002Fschema.py`:\n   ```yaml\n   - name: {stage_name}\n     columns:\n       - name: {grain}\n         tests:\n           - unique\n           - not_null\n   ```\n   Every non-nullable column must have `not_null` test; every unique key must have `unique` test.\n\n3. **Add idempotency logic**\n   - For `materialized='table'`: dbt handles full replacement — no extra work.\n   - For incremental models: use `is_incremental()` filter on `updated_at` or an event timestamp.\n   - For pandas: the output must be deterministic given the same input; add a dedup step on `{grain}`.\n\n4. **Write tests**\n   ```\n   tests\u002Ftransforms\u002Ftest_{stage_name}.py\n   ```\n   Required tests:\n   - Input fixture → expected output shape (column names, row count)\n   - Idempotency: running twice produces identical output\n   - Null check: no nulls in required columns after transform\n\n5. **Register in the pipeline DAG**\n   Add the stage after its upstream dependencies:\n   ```python\n   # dags\u002Fpipeline.py\n   {stage_name}_task = DbtRunOperator(\n       task_id=\"{stage_name}\",\n       models=\"{stage_name}\",\n   )\n   {upstream_task} >> {stage_name}_task\n   ```\n\n6. **Run locally**\n   ```bash\n   dbt run --select {stage_name}\n   dbt test --select {stage_name}\n   # or for pandas:\n   python -m pytest tests\u002Ftransforms\u002Ftest_{stage_name}.py -v\n   ```\n\n## Conventions\n- Layer hierarchy: `raw` → `staging` → `intermediate` → `marts`\n- Never skip a layer (e.g., don't read from `raw` in a `marts` model)\n- All stages have at least one `unique` + `not_null` test on the grain column\n- Incremental models use `updated_at` as the watermark; add it to every model\n\n## Edge Cases\n- **Fan-out (multiple downstream consumers):** Create the stage at the `intermediate` layer; let downstream `marts` models reference it.\n- **Slowly changing dimension (SCD):** Use dbt's `snapshot` materialization or add `valid_from`\u002F`valid_to` columns manually.\n- **Cross-database join:** Materialize both inputs to the same database first, then join; cross-database SQL is not portable.\n- **Very wide table (>200 columns):** Split into a core model plus an extension model; document the split in the schema YAML.\n","# Pipeline Stage\n\nCreate a new transform stage with idempotency guarantees, a schema contract, and tests.\n\n## Inputs\n- Stage name (snake_case, e.g., `customer_ltv`)\n- Input tables\u002Fmodels (list of upstream stage names or raw tables)\n- Output table name (usually matches stage name)\n- Grain (the primary key or unique key, e.g., `customer_id`, `(order_id, date)`)\n- Layer (`staging`, `intermediate`, `marts`)\n\n## Steps\n\n1. **Create the transform file**\n\n   For dbt:\n   ```\n   models\u002F{layer}\u002F{stage_name}.sql\n   ```\n   ```sql\n   {{ config(\n       materialized='table',\n       unique_key='{grain}'\n   ) }}\n\n   select\n       {grain},\n       -- TODO: add business logic\n       current_timestamp as updated_at\n   from {{ ref('{input_table}') }}\n   ```\n\n   For pandas ETL:\n   ```\n   pipelines\u002Ftransforms\u002F{stage_name}\u002Ftransform.py\n   ```\n   ```python\n   def run(df: pd.DataFrame) -> pd.DataFrame:\n       \"\"\"Transform {input_table} → {stage_name}.\"\"\"\n       # TODO: add business logic\n       return df\n   ```\n\n2. **Define the schema contract**\n   Create `models\u002F{layer}\u002Fschema\u002F{stage_name}.yaml` (dbt) or `pipelines\u002Ftransforms\u002F{stage_name}\u002Fschema.py`:\n   ```yaml\n   - name: {stage_name}\n     columns:\n       - name: {grain}\n         tests:\n           - unique\n           - not_null\n   ```\n   Every non-nullable column must have `not_null` test; every unique key must have `unique` test.\n\n3. **Add idempotency logic**\n   - For `materialized='table'`: dbt handles full replacement — no extra work.\n   - For incremental models: use `is_incremental()` filter on `updated_at` or an event timestamp.\n   - For pandas: the output must be deterministic given the same input; add a dedup step on `{grain}`.\n\n4. **Write tests**\n   ```\n   tests\u002Ftransforms\u002Ftest_{stage_name}.py\n   ```\n   Required tests:\n   - Input fixture → expected output shape (column names, row count)\n   - Idempotency: running twice produces identical output\n   - Null check: no nulls in required columns after transform\n\n5. **Register in the pipeline DAG**\n   Add the stage after its upstream dependencies:\n   ```python\n   # dags\u002Fpipeline.py\n   {stage_name}_task = DbtRunOperator(\n       task_id=\"{stage_name}\",\n       models=\"{stage_name}\",\n   )\n   {upstream_task} >> {stage_name}_task\n   ```\n\n6. **Run locally**\n   ```bash\n   dbt run --select {stage_name}\n   dbt test --select {stage_name}\n   # or for pandas:\n   python -m pytest tests\u002Ftransforms\u002Ftest_{stage_name}.py -v\n   ```\n\n## Conventions\n- Layer hierarchy: `raw` → `staging` → `intermediate` → `marts`\n- Never skip a layer (e.g., don't read from `raw` in a `marts` model)\n- All stages have at least one `unique` + `not_null` test on the grain column\n- Incremental models use `updated_at` as the watermark; add it to every model\n\n## Edge Cases\n- **Fan-out (multiple downstream consumers):** Create the stage at the `intermediate` layer; let downstream `marts` models reference it.\n- **Slowly changing dimension (SCD):** Use dbt's `snapshot` materialization or add `valid_from`\u002F`valid_to` columns manually.\n- **Cross-database join:** Materialize both inputs to the same database first, then join; cross-database SQL is not portable.\n- **Very wide table (>200 columns):** Split into a core model plus an extension model; document the split in the schema YAML.\n",{"name":5,"metadata":43,"description":7},{"forged-by":44,"last-used":45,"forged-from":46,"usage-count":47,"forged-reason":48},"codex-agent","2026-06-02","session-2026-02-28","19","Added customer_ltv, order_summary, and refund_rate stages in one sprint; each needed the same skeleton: transform file, contract, idempotency test, registration","main","e959db0147cafe70b738efbd5a128985763fd0df","examples\u002Fdata-pipeline\u002Fskills\u002Fpipeline-stage",1,"https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development","https:\u002F\u002Fskdd.dev","https:\u002F\u002Fgithub.com\u002Fzakelfassi","https:\u002F\u002Fzakelfassi.com","I build systems and write about what they do to us. Founder @TalkAndComment.","2026-11-06 14:19:15",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add zakelfassi\u002Fskills-driven-development --skill pipeline-stage",{"tool":65,"command":66},"bunx","bunx skills add zakelfassi\u002Fskills-driven-development --skill pipeline-stage",{"tool":68,"command":69},"pnpm","pnpm dlx skills add zakelfassi\u002Fskills-driven-development --skill pipeline-stage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fdata-pipeline\u002Fskills\u002Fpipeline-stage\u002FSKILL.md",true,[],[74,89,94,113,128,149],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":38},"01M6CWKMXZDBQ8TK30ZV1X2KM7","skillforge","Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge\u002Fcreate\u002Fscaffold a new skill.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fskillforge\u002FSKILL.md",[],[76,81,82,83,84,85,25,86,87,34,35,88],"workflow","agentskills","pattern","new skill","reusable","forge","update","sessions",{"skillNo":90,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":38},"01M6CWKJF5Y1PQBZ4QWA9DDES1","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fplugins\u002Fskdd-claude\u002Fskills\u002Fskillforge\u002FSKILL.md",[],[76,81,86,88,82,83,84,85,25,87,34,35],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":38},"01M6CWKFTNP9RBAD9SBEKRVMR2","deploy-preview","Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to \"deploy this for review\", or before opening a PR.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fdeploy-preview\u002FSKILL.md",[],[101,102,103,104,105,106,107,108,25,27,109,110,111,29,112],"deploy preview","deploy","preview","visual","branches","time","ready","opening a pr","environment","branch","pr","review",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M6CWKCSCQ6PV8TVKV2MDRAHH","component-scaffold","Create a new React component with co-located test, story, and styles. Use when creating new UI components, when asked to scaffold\u002Fgenerate a component, or when building new pages.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fcomponent-scaffold\u002FSKILL.md",[],[120,121,35,25,122,123,124,27,125,30,126,34,127,106,36],"component scaffold","component","components","structure","Story","ui","generate","react",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":38},"01M6CWKA7S16TW2KZZ7ADK9YSA","bug-triage","Triage a bug report into an actionable GitHub issue with severity, reproduction steps, and assignment. Use when a bug is reported, when error logs need investigation, or when asked to file\u002Ftriage an issue.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fbug-triage\u002FSKILL.md",[],[135,136,137,138,30,139,140,141,142,143,144,145,146,25,147,27,148],"triage","bug","bug triage","logs","report","toolkit","bug report","github","severity","project","issue","github issue","ops","investigation",{"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":38},"01M6CWK6Y4VB6HFNKP84WA3C6G","api-endpoint","Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fapi-endpoint\u002FSKILL.md",[],[156,157,158,159,83,106,123,160,161,162,25,27,163,164,165,35,29],"endpoint","api","api endpoint","route","build","endpoints","backend","controller","REST","validation"]