---
name: "docker-slim-minify-containers"
description: "Analyze and minify bloated container images by up to 30x using dynamic runtime profiling."
metadata:
  author: "SlimToolkit"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "minify docker image slim"
  - "generate seccomp profile slim"
  - "shrink ubuntu container"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# SlimToolkit Container Image Minification & Security

Minifies container images with SlimToolkit (formerly DockerSlim): dynamically observing syscalls and file accesses during container execution, stripping unused binaries/libraries, and auto-generating Seccomp/AppArmor profiles.

## When to Invoke
Invoke this skill whenever you need to:
- minify docker image slim
- generate seccomp profile slim
- shrink ubuntu container

## Execution SOP & Rules
1. Run minification command: slim build --target <bloated_image:tag> --tag <minified_image:tag>.
2. Pass HTTP probe flags (--http-probe) to simulate production web requests during container profiling.
3. Inspect generated seccomp profile JSON artifact to review allowed system calls.
4. Test minified image thoroughly in staging environments to verify zero missing shared object (.so) files.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
