[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASGX1NYGYKWJ3HBA7MFND6":3,"skill-same:01M7ASGX1NYGYKWJ3HBA7MFND6":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7ASGX1NYGYKWJ3HBA7MFND6","dockerfile-review",null,"Reviews Dockerfiles for build performance, image size, and security issues. Use when optimizing, validating, or improving Dockerfiles.","saski\u002Farnesto","saski","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F140356?v=4","01M7ASBDSNXTRYDYB4K1PEA1RV","01M7ASBDTAKBDAAV99S1GE7HK6",6,"Unlicense","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdockerfile-review\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: dockerfile-review\ndescription: Reviews Dockerfiles for build performance, image size, and security issues. Use when optimizing, validating, or improving Dockerfiles.\n---\n\n# Dockerfile Review\n\nSTARTER_CHARACTER = 🐳\n\nWhen starting, announce: \"🐳 Using DOCKERFILE-REVIEW skill\".\n\n## Process\n\n1. Check if `droast` (dockerfile-roast) is available by running `command -v droast`\n   - If available: run `droast --no-roast --min-severity warning \u003CDockerfile>` and use the output as a starting point\n   - If not available: skip and continue with manual review\n2. Read the Dockerfile (and .dockerignore if present)\n3. Evaluate against each dimension below\n4. Report findings grouped by severity: critical (security risks), major (significant size\u002Fperformance impact), minor (incremental improvements)\n5. For each finding: state what's wrong, why it matters, and suggest a fix direction\n6. If the Dockerfile is solid, say so — don't invent issues\n\n## Review Dimensions\n\n### 1. Layer Cache Ordering\n\nDependency files (package.json, requirements.txt, go.mod) must be copied and installed BEFORE application source code. Violations cause full dependency reinstalls on every code change.\n\nAnti-pattern: `COPY . .` followed by `RUN pip install` or `RUN npm ci`. The entire dependency layer rebuilds on any source change.\n\nImpact: builds that should take seconds take minutes. With frequent builds, this compounds to hours per week.\n\n### 2. Base Image Selection\n\nThree tiers exist: full (includes compilers, tools), slim (minimal OS, basic tooling), distroless (application only, no shell).\n\nAnti-patterns:\n- Using full images in production (node:20 is ~950MB vs node:20-slim at ~220MB)\n- Using distroless when debugging access is needed\n- Not considering slim as the default production choice\n\nAlpine warning: Alpine uses musl libc instead of glibc. For Python, Node, and other runtimes with native extensions, this means rebuilding native deps from source (slower builds) or silent performance regressions. Prefer `-slim` (Debian-based) for these workloads — similar size savings, zero compatibility issues. Alpine remains a good choice for Go binaries and static builds where libc doesn't matter.\n\n### 3. .dockerignore Coverage\n\nWithout .dockerignore, `COPY . .` sends everything to the build context: node_modules (50-500MB), .git (100MB+), coverage reports, IDE configs, .env files.\n\n`COPY . .` is fine — if the .dockerignore is correct. Most pain comes from a missing or incomplete ignore file, not from the COPY instruction itself.\n\nAnti-patterns:\n- No .dockerignore file at all\n- Missing .git\u002F (often the largest offender in mature repos)\n- Missing local dependency directories (node_modules\u002F, venv\u002F, __pycache__\u002F)\n- Missing .env files (both a size and security issue)\n\n### 4. Multi-Stage Builds\n\nBuild tools, compilers, and dev dependencies should not exist in the final image. Multi-stage builds separate construction from execution. The builder stage is the bloat zone; the final stage must be lean.\n\nAnti-patterns:\n- Single-stage builds that include build toolchains in production\n- Copying entire build context into final stage instead of only artifacts\n- Not using named stages (makes COPY --from fragile)\n\n### 5. Version Pinning\n\nTags like `latest` or unpinned package versions create non-reproducible builds.\n\nAnti-patterns:\n- `FROM ubuntu:latest` or `FROM node:lts`\n- `apt-get install -y curl` without version pinning\n- No lock files for language-level dependencies\n\nFor production images, pin base images by digest, not just tag. `node:20` today is not `node:20` in six months — tags are mutable. Example: `FROM node:20-slim@sha256:abc123...`. This guarantees reproducible builds. Use tag+digest together so the tag documents intent while the digest locks the exact image.\n\n### 6. Layer Minimization\n\nEach RUN, COPY, ADD creates a layer. Deletions in later layers don't reduce image size — the previous layer still contains the data.\n\nAnti-pattern: separate RUN instructions for install and cleanup. `RUN apt-get update` then `RUN rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*` preserves the cache in the first layer.\n\nFix direction: combine install and cleanup in a single RUN with `&&`.\n\n### 7. BuildKit Cache Mounts\n\nBuildKit's `--mount=type=cache` keeps package manager caches (pip, apt, cargo, npm) between builds without them ending up in the final layer. This dramatically speeds up rebuilds.\n\nExample:\n```dockerfile\nRUN --mount=type=cache,target=\u002Froot\u002F.cache\u002Fpip \\\n    pip install -r requirements.txt\n```\n\n```dockerfile\nRUN --mount=type=cache,target=\u002Fvar\u002Fcache\u002Fapt \\\n    --mount=type=cache,target=\u002Fvar\u002Flib\u002Fapt\u002Flists \\\n    apt-get update && apt-get install -y curl\n```\n\nAnti-patterns:\n- Downloading all dependencies from scratch on every build when a cache mount would persist them\n- Manually copying and removing caches in the same layer to avoid bloat (cache mounts solve this cleaner)\n\nRequires `DOCKER_BUILDKIT=1` or Docker Buildx (default in modern Docker). Check the project's Docker version expectations before recommending.\n\n### 8. Secret Handling\n\nCredentials, API keys, and tokens embedded in layers are permanently accessible via `docker history` or registry inspection.\n\nAnti-patterns:\n- `ENV API_KEY=...` or `ARG` with secrets passed at build time\n- COPY of .env, credentials, or key files into the image\n- RUN commands with inline secrets\n\nFix direction: use `--mount=type=secret` with BuildKit for build-time secrets. Never bake secrets into layers.\n\n### 9. Non-Root Execution\n\nRunning as root means a container escape or application vulnerability grants full system access.\n\nAnti-patterns:\n- No USER instruction (defaults to root)\n- USER instruction placed before file operations (causing permission issues)\n- Not setting file ownership with chown\n\nFix direction: create a dedicated user with useradd, chown application files, then switch with USER — placed after all file operations that need root.\n\n### 10. Process Model\n\nOne process per container is a good default, not an absolute law. If the app needs nginx + app server and is not running at orchestrator scale, using supervisord or a process manager is a valid choice that avoids premature infrastructure complexity.\n\nWhen to flag: when a Dockerfile runs multiple unrelated services that should clearly be separate (e.g., app + database). When NOT to flag: when a Dockerfile uses a process manager for tightly coupled processes in a simple deployment context.\n\n## Severity Classification\n\n- **Critical**: secret handling violations, running as root in production\n- **Major**: missing multi-stage builds, poor cache ordering, no .dockerignore, full base images in production, Alpine with native-extension runtimes\n- **Minor**: unpinned versions (tags without digest), extra layers, missing specific .dockerignore entries, missing BuildKit cache mounts\n","# Dockerfile Review\n\nSTARTER_CHARACTER = 🐳\n\nWhen starting, announce: \"🐳 Using DOCKERFILE-REVIEW skill\".\n\n## Process\n\n1. Check if `droast` (dockerfile-roast) is available by running `command -v droast`\n   - If available: run `droast --no-roast --min-severity warning \u003CDockerfile>` and use the output as a starting point\n   - If not available: skip and continue with manual review\n2. Read the Dockerfile (and .dockerignore if present)\n3. Evaluate against each dimension below\n4. Report findings grouped by severity: critical (security risks), major (significant size\u002Fperformance impact), minor (incremental improvements)\n5. For each finding: state what's wrong, why it matters, and suggest a fix direction\n6. If the Dockerfile is solid, say so — don't invent issues\n\n## Review Dimensions\n\n### 1. Layer Cache Ordering\n\nDependency files (package.json, requirements.txt, go.mod) must be copied and installed BEFORE application source code. Violations cause full dependency reinstalls on every code change.\n\nAnti-pattern: `COPY . .` followed by `RUN pip install` or `RUN npm ci`. The entire dependency layer rebuilds on any source change.\n\nImpact: builds that should take seconds take minutes. With frequent builds, this compounds to hours per week.\n\n### 2. Base Image Selection\n\nThree tiers exist: full (includes compilers, tools), slim (minimal OS, basic tooling), distroless (application only, no shell).\n\nAnti-patterns:\n- Using full images in production (node:20 is ~950MB vs node:20-slim at ~220MB)\n- Using distroless when debugging access is needed\n- Not considering slim as the default production choice\n\nAlpine warning: Alpine uses musl libc instead of glibc. For Python, Node, and other runtimes with native extensions, this means rebuilding native deps from source (slower builds) or silent performance regressions. Prefer `-slim` (Debian-based) for these workloads — similar size savings, zero compatibility issues. Alpine remains a good choice for Go binaries and static builds where libc doesn't matter.\n\n### 3. .dockerignore Coverage\n\nWithout .dockerignore, `COPY . .` sends everything to the build context: node_modules (50-500MB), .git (100MB+), coverage reports, IDE configs, .env files.\n\n`COPY . .` is fine — if the .dockerignore is correct. Most pain comes from a missing or incomplete ignore file, not from the COPY instruction itself.\n\nAnti-patterns:\n- No .dockerignore file at all\n- Missing .git\u002F (often the largest offender in mature repos)\n- Missing local dependency directories (node_modules\u002F, venv\u002F, __pycache__\u002F)\n- Missing .env files (both a size and security issue)\n\n### 4. Multi-Stage Builds\n\nBuild tools, compilers, and dev dependencies should not exist in the final image. Multi-stage builds separate construction from execution. The builder stage is the bloat zone; the final stage must be lean.\n\nAnti-patterns:\n- Single-stage builds that include build toolchains in production\n- Copying entire build context into final stage instead of only artifacts\n- Not using named stages (makes COPY --from fragile)\n\n### 5. Version Pinning\n\nTags like `latest` or unpinned package versions create non-reproducible builds.\n\nAnti-patterns:\n- `FROM ubuntu:latest` or `FROM node:lts`\n- `apt-get install -y curl` without version pinning\n- No lock files for language-level dependencies\n\nFor production images, pin base images by digest, not just tag. `node:20` today is not `node:20` in six months — tags are mutable. Example: `FROM node:20-slim@sha256:abc123...`. This guarantees reproducible builds. Use tag+digest together so the tag documents intent while the digest locks the exact image.\n\n### 6. Layer Minimization\n\nEach RUN, COPY, ADD creates a layer. Deletions in later layers don't reduce image size — the previous layer still contains the data.\n\nAnti-pattern: separate RUN instructions for install and cleanup. `RUN apt-get update` then `RUN rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*` preserves the cache in the first layer.\n\nFix direction: combine install and cleanup in a single RUN with `&&`.\n\n### 7. BuildKit Cache Mounts\n\nBuildKit's `--mount=type=cache` keeps package manager caches (pip, apt, cargo, npm) between builds without them ending up in the final layer. This dramatically speeds up rebuilds.\n\nExample:\n```dockerfile\nRUN --mount=type=cache,target=\u002Froot\u002F.cache\u002Fpip \\\n    pip install -r requirements.txt\n```\n\n```dockerfile\nRUN --mount=type=cache,target=\u002Fvar\u002Fcache\u002Fapt \\\n    --mount=type=cache,target=\u002Fvar\u002Flib\u002Fapt\u002Flists \\\n    apt-get update && apt-get install -y curl\n```\n\nAnti-patterns:\n- Downloading all dependencies from scratch on every build when a cache mount would persist them\n- Manually copying and removing caches in the same layer to avoid bloat (cache mounts solve this cleaner)\n\nRequires `DOCKER_BUILDKIT=1` or Docker Buildx (default in modern Docker). Check the project's Docker version expectations before recommending.\n\n### 8. Secret Handling\n\nCredentials, API keys, and tokens embedded in layers are permanently accessible via `docker history` or registry inspection.\n\nAnti-patterns:\n- `ENV API_KEY=...` or `ARG` with secrets passed at build time\n- COPY of .env, credentials, or key files into the image\n- RUN commands with inline secrets\n\nFix direction: use `--mount=type=secret` with BuildKit for build-time secrets. Never bake secrets into layers.\n\n### 9. Non-Root Execution\n\nRunning as root means a container escape or application vulnerability grants full system access.\n\nAnti-patterns:\n- No USER instruction (defaults to root)\n- USER instruction placed before file operations (causing permission issues)\n- Not setting file ownership with chown\n\nFix direction: create a dedicated user with useradd, chown application files, then switch with USER — placed after all file operations that need root.\n\n### 10. Process Model\n\nOne process per container is a good default, not an absolute law. If the app needs nginx + app server and is not running at orchestrator scale, using supervisord or a process manager is a valid choice that avoids premature infrastructure complexity.\n\nWhen to flag: when a Dockerfile runs multiple unrelated services that should clearly be separate (e.g., app + database). When NOT to flag: when a Dockerfile uses a process manager for tightly coupled processes in a simple deployment context.\n\n## Severity Classification\n\n- **Critical**: secret handling violations, running as root in production\n- **Major**: missing multi-stage builds, poor cache ordering, no .dockerignore, full base images in production, Alpine with native-extension runtimes\n- **Minor**: unpinned versions (tags without digest), extra layers, missing specific .dockerignore entries, missing BuildKit cache mounts\n",{"name":5,"description":7},"main","3c24fc2c035029b08c7326774bee3fef8fb95566",".agents\u002Fskills\u002Fdockerfile-review",0,"https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto","https:\u002F\u002Fgithub.com\u002Fsaski","http:\u002F\u002Fsaski.com","2026-11-12 20:09:16",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add saski\u002Farnesto --skill dockerfile-review",{"tool":37,"command":38},"bunx","bunx skills add saski\u002Farnesto --skill dockerfile-review",{"tool":40,"command":41},"pnpm","pnpm dlx skills add saski\u002Farnesto --skill dockerfile-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdockerfile-review\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7AT7F5FSHNAMFMF01N0QA1X","visualize","Use \u002Fvisualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fvisualize\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7AT79MHSAR3JDDMP7DGERM9","update-cursor-settings","Modify Cursor\u002FVSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cursor-settings\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7AT73WF3Y22E0FKYAMCCJES","update-cli-config","View and modify Cursor CLI configuration settings in ~\u002F.cursor\u002Fcli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fupdate-cli-config\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7AT6F3FBP85AJJ5BJNR8B5W","statusline","Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fstatusline\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7AT6D24QFS5XRAFN8S5XJ7W","split-to-prs","Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fsplit-to-prs\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7AT69FYFN84XZKW452JV5DF","shell","Runs the rest of a \u002Fshell request as a literal shell command. Use only when the user explicitly invokes \u002Fshell and wants the following text executed directly in the terminal.","https:\u002F\u002Fgithub.com\u002Fsaski\u002Farnesto\u002Fblob\u002Fmain\u002F.cursor\u002Fskills-cursor\u002Fshell\u002FSKILL.md",[],[]]