[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JP9DYMQZN2AMN57Z7F52AD":3,"skill-same:01M6JP9DYMQZN2AMN57Z7F52AD":78},{"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":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6JP9DYMQZN2AMN57Z7F52AD","containerization",null,"Write production-grade Dockerfiles, docker-compose, and Kubernetes manifests following security and reliability best practices. Triggers: Dockerfile, docker-compose, containerize, Docker image, Kubernetes, k8s manifest, container, pod, deployment yaml, multi-stage build, docker build, image size, container security.","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\u002Fdevops\u002Fskills\u002Fcontainerization\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"container","manifests","multi","triggers","k8s","stage","docker-compose","container security","compose","image","reliability","write","manifest","best practices","deployment","dockerfile","security","kubernetes","docker","2026-11-10 10:12:30",false,"---\nname: containerization\ndescription: \"Write production-grade Dockerfiles, docker-compose, and Kubernetes manifests following security and reliability best practices. Triggers: Dockerfile, docker-compose, containerize, Docker image, Kubernetes, k8s manifest, container, pod, deployment yaml, multi-stage build, docker build, image size, container security.\"\n---\n\n# Containerization\n\nWrite production-quality container configurations — Dockerfiles, compose files, and Kubernetes manifests — that are secure, efficient, and reproducible.\n\n## Workflow: Dockerfile\n\n### Step 1: Understand the Application\n\nBefore writing a Dockerfile, establish:\n\n- **Runtime**: Node.js, Python, Go, Java, etc. and specific version\n- **Build process**: Does it need compilation, asset bundling, dependency installation?\n- **Runtime dependencies**: System packages, native libraries\n- **Entry point**: What command starts the application?\n- **Configuration**: Environment variables, config files, secrets\n\n### Step 2: Write the Dockerfile\n\nFollow these principles in order of importance:\n\n**1. Use multi-stage builds** — Separate build dependencies from the runtime image. Build artifacts in one stage, copy only what's needed to a slim final stage.\n\n**2. Pin base image versions** — Never use `latest`. Use specific digests or version tags: `node:20.11-alpine3.19`, not `node:latest`.\n\n**3. Minimize layers and image size** — Combine related RUN commands with `&&`. Use Alpine or distroless base images. Remove package manager caches after install.\n\n**4. Order for cache efficiency** — Place infrequently changing instructions (system deps) before frequently changing ones (application code). Copy dependency manifests before source code.\n\n**5. Run as non-root** — Create a dedicated user and switch to it. Never run production containers as root.\n\n**6. Use .dockerignore** — Exclude node_modules, .git, .env, test files, docs from the build context.\n\nUse [templates\u002Fdockerfile.md](templates\u002Fdockerfile.md) as a starting point for Node.js, Python, Go, and docker-compose configurations.\n\n### Step 3: Validate\n\n- [ ] Image builds successfully\n- [ ] Image size is reasonable for the application type\n- [ ] Container runs as non-root user\n- [ ] No secrets baked into the image (check with `docker history`)\n- [ ] Health check is defined\n- [ ] .dockerignore excludes unnecessary files\n\n## Workflow: Docker Compose (Local Development)\n\nDesign compose files that give developers a one-command local environment:\n\n- All services defined (app, database, cache, queue)\n- Volumes for hot-reload development\n- Named volumes for data persistence across restarts\n- Environment variables with sensible defaults via `.env.example`\n- Health checks and dependency ordering (`depends_on` with `condition: service_healthy`)\n- Port mappings that avoid common conflicts\n\nSee [references\u002Fdockerfile-patterns.md](references\u002Fdockerfile-patterns.md) for compose patterns.\n\n## Workflow: Kubernetes Manifests\n\nWhen creating K8s deployments:\n\n1. **Define resource requests and limits** — Always. Without them, a single pod can starve the cluster.\n2. **Configure health probes** — Liveness (is the process alive?), readiness (can it serve traffic?), startup (for slow-starting apps).\n3. **Use ConfigMaps and Secrets** — Never hardcode configuration in manifests.\n4. **Set pod disruption budgets** — For availability during upgrades.\n5. **Use namespaces** — Isolate environments (dev, staging, prod) and teams.\n6. **Define HPA** — Horizontal pod autoscaling based on CPU\u002Fmemory or custom metrics.\n\n## When to Use Helm or Kustomize\n\nFor multi-environment deployments or when using a deployment repo pattern, plain manifests become hard to manage. Choose based on your needs:\n\n- **Plain manifests**: Single environment, few resources, no templating needed. Start here.\n- **Kustomize**: Multiple environments with small differences (replicas, resource limits, image tags). Uses patches over a base — no templating language to learn.\n- **Helm**: Complex deployments with many configurable parameters, or when you need to package charts for reuse. More powerful but more complexity.\n\nSee `deployment-repo` for organizing Helm charts and Kustomize overlays in a deployment repo, and `gitops-delivery` for using them with ArgoCD or Flux.\n\n## Principles Applied\n\n- **KISS**: Start with the simplest configuration that works. Single-stage Docker build before multi-stage. Docker Compose before Kubernetes.\n- **DRY**: Use build args and env vars to parameterize, not duplicate Dockerfiles per environment.\n- **Security by default**: Non-root, minimal image, no secrets in layers, read-only filesystem where possible.\n- **YAGNI**: Don't add Kubernetes if Docker Compose serves your scale. Don't add Helm charts if plain manifests suffice.\n","# Containerization\n\nWrite production-quality container configurations — Dockerfiles, compose files, and Kubernetes manifests — that are secure, efficient, and reproducible.\n\n## Workflow: Dockerfile\n\n### Step 1: Understand the Application\n\nBefore writing a Dockerfile, establish:\n\n- **Runtime**: Node.js, Python, Go, Java, etc. and specific version\n- **Build process**: Does it need compilation, asset bundling, dependency installation?\n- **Runtime dependencies**: System packages, native libraries\n- **Entry point**: What command starts the application?\n- **Configuration**: Environment variables, config files, secrets\n\n### Step 2: Write the Dockerfile\n\nFollow these principles in order of importance:\n\n**1. Use multi-stage builds** — Separate build dependencies from the runtime image. Build artifacts in one stage, copy only what's needed to a slim final stage.\n\n**2. Pin base image versions** — Never use `latest`. Use specific digests or version tags: `node:20.11-alpine3.19`, not `node:latest`.\n\n**3. Minimize layers and image size** — Combine related RUN commands with `&&`. Use Alpine or distroless base images. Remove package manager caches after install.\n\n**4. Order for cache efficiency** — Place infrequently changing instructions (system deps) before frequently changing ones (application code). Copy dependency manifests before source code.\n\n**5. Run as non-root** — Create a dedicated user and switch to it. Never run production containers as root.\n\n**6. Use .dockerignore** — Exclude node_modules, .git, .env, test files, docs from the build context.\n\nUse [templates\u002Fdockerfile.md](templates\u002Fdockerfile.md) as a starting point for Node.js, Python, Go, and docker-compose configurations.\n\n### Step 3: Validate\n\n- [ ] Image builds successfully\n- [ ] Image size is reasonable for the application type\n- [ ] Container runs as non-root user\n- [ ] No secrets baked into the image (check with `docker history`)\n- [ ] Health check is defined\n- [ ] .dockerignore excludes unnecessary files\n\n## Workflow: Docker Compose (Local Development)\n\nDesign compose files that give developers a one-command local environment:\n\n- All services defined (app, database, cache, queue)\n- Volumes for hot-reload development\n- Named volumes for data persistence across restarts\n- Environment variables with sensible defaults via `.env.example`\n- Health checks and dependency ordering (`depends_on` with `condition: service_healthy`)\n- Port mappings that avoid common conflicts\n\nSee [references\u002Fdockerfile-patterns.md](references\u002Fdockerfile-patterns.md) for compose patterns.\n\n## Workflow: Kubernetes Manifests\n\nWhen creating K8s deployments:\n\n1. **Define resource requests and limits** — Always. Without them, a single pod can starve the cluster.\n2. **Configure health probes** — Liveness (is the process alive?), readiness (can it serve traffic?), startup (for slow-starting apps).\n3. **Use ConfigMaps and Secrets** — Never hardcode configuration in manifests.\n4. **Set pod disruption budgets** — For availability during upgrades.\n5. **Use namespaces** — Isolate environments (dev, staging, prod) and teams.\n6. **Define HPA** — Horizontal pod autoscaling based on CPU\u002Fmemory or custom metrics.\n\n## When to Use Helm or Kustomize\n\nFor multi-environment deployments or when using a deployment repo pattern, plain manifests become hard to manage. Choose based on your needs:\n\n- **Plain manifests**: Single environment, few resources, no templating needed. Start here.\n- **Kustomize**: Multiple environments with small differences (replicas, resource limits, image tags). Uses patches over a base — no templating language to learn.\n- **Helm**: Complex deployments with many configurable parameters, or when you need to package charts for reuse. More powerful but more complexity.\n\nSee `deployment-repo` for organizing Helm charts and Kustomize overlays in a deployment repo, and `gitops-delivery` for using them with ArgoCD or Flux.\n\n## Principles Applied\n\n- **KISS**: Start with the simplest configuration that works. Single-stage Docker build before multi-stage. Docker Compose before Kubernetes.\n- **DRY**: Use build args and env vars to parameterize, not duplicate Dockerfiles per environment.\n- **Security by default**: Non-root, minimal image, no secrets in layers, read-only filesystem where possible.\n- **YAGNI**: Don't add Kubernetes if Docker Compose serves your scale. Don't add Helm charts if plain manifests suffice.\n",{"name":5,"description":7},"main","800dc9ad0ca2914d6ad15b8c5159d9b57bb104c2","plugins\u002Fdevops\u002Fskills\u002Fcontainerization","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":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add SWEStash\u002Fswe-workflow-skills --skill containerization",{"tool":56,"command":57},"bunx","bunx skills add SWEStash\u002Fswe-workflow-skills --skill containerization",{"tool":59,"command":60},"pnpm","pnpm dlx skills add SWEStash\u002Fswe-workflow-skills --skill containerization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdevops\u002Fskills\u002Fcontainerization\u002FSKILL.md",true,[64,70,74],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"evals\u002Fevals.json","REFERENCE","参考文档",2878,"https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdevops\u002Fskills\u002Fcontainerization\u002Fevals\u002Fevals.json",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fdockerfile-patterns.md",4379,"https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdevops\u002Fskills\u002Fcontainerization\u002Freferences\u002Fdockerfile-patterns.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"templates\u002Fdockerfile.md",3648,"https:\u002F\u002Fgithub.com\u002FSWEStash\u002Fswe-workflow-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdevops\u002Fskills\u002Fcontainerization\u002Ftemplates\u002Fdockerfile.md",[79,104,130,153,179,204],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":38},"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",[],[86,87,88,89,30,90,91,92,93,94,95,96,22,97,98,99,100,101,102,103],"writing","writing skills","testing","eval","edit","Budget","authoring","new skill","library","frontmatter","editing","use","Existing","Rules","write a skill","when","listing","progressive disclosure",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":38},"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",[],[111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,22,129],"working agreement","project","definition of done","done","milestone","documentation","work","progress","how","contributing","close","run","sync","status","live","do","README","session","routines",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":38},"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",[],[137,138,139,140,141,142,86,143,114,144,145,146,117,147,121,148,149,150,151,152],"verification","verification before completion","brief","ready","fix","claim","workflow","commit","text","route","message","merge","release","git","act","ship",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"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",[],[160,161,162,163,164,165,166,167,168,169,170,171,119,172,173,174,175,176,177,178],"design","ux","ui","ui ux design","error","states","loading","flows","engineer","interaction","layout","responsive design","screen","flow","patterns","mockup","responsive","form","page",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":38},"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",[],[186,187,188,189,190,191,160,192,193,194,195,196,197,198,199,200,201,202,35,203],"modeling","threat modeling","threat","model","time","element","whiteboard","security analysis","analysis","code","review","threat model","audit","security-audit","secure","config","go","trust",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":210,"publishedAt":38},"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",[],[160,211,212,213,214,215,88,216,217,143,195,218,219,30,220,221,126,222,223,22],"test suite","test","test suite design","coverage","unit","write tests","testing strategy","across","plan","add","infrastructure","test plan","for"]