Skip to content
Development
Skill

/stack

Generate a Docker Swarm stack file — services, deploy policy (replicas, placement, rolling update/rollback), overlay network.

From plugin
agentic-awesome-kits
1032 skills

Claude Code

$ npx -y skills add KhaiTrang1995/agentic-awesome-kits --skill stack --agent claude-code

SKILL.md

stack.SKILL.md
name: stack
description: Generate a Docker Swarm stack file — services, deploy policy (replicas, placement, rolling update/rollback), overlay network.
user-invocable: true
argument-hint: "<stack description> [--replicas <n>] [--with-db] [--with-proxy]"

/stack — Generate a Swarm Stack File

Input examples

/stack .NET API + Angular + Postgres --replicas 3
/stack worker service --replicas 2 --with-db
/stack fullstack --with-proxy    (adds a Traefik front, see traefik-proxy-stack.yml)

Process

1. Detect the services and their dependency order. 2. For each service: base image (reuse `docker-kit/docker-conventions.md` for the Dockerfile side), `deploy:` stanza per `swarm-conventions.md`, healthcheck. 3. Sensitive values → reference an `external: true` secret, never an inline env var — see `/secret`. 4. Attach all services to a stack-scoped overlay network. 5. L1 approval → Write.

Mandatory rules

  • **`deploy.replicas` explicit** for every service — never rely on the Swarm default of 1
  • **`resources.limits` + `.reservations`** both set
  • **`update_config` + `rollback_config`** both set — a rollout with no rollback plan is incomplete
  • **Secrets via `docker secret`** — never plain env vars for passwords/keys/tokens
  • **Stateful services** (db, anything with local volume) get `placement.constraints`
  • **No inline Ingress** — routing by hostname needs a proxy front (`--with-proxy`), Swarm has no Ingress resource

Output

docker-stack.yml
.env.example              (placeholders only — real secrets are never written to a file the agent generates)

References

  • @.claude/rules/swarm-conventions.md
  • @../../docker-kit/.claude/rules/docker-conventions.md
Read more
@khaitrang1995
Ships withagentic-awesome-kits

Reusable AI Skill Kits for coding agents (Claude Code and any other subagent/slash-command-compatible tool).

Stars on GitHub

Momentum

stars in total
10
Star history of KhaiTrang1995/agentic-awesome-kits on GitHub, a chart by star-history.com

Other skills on agentic-awesome-kits.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about stack.

Which coding agents can use stack?
stack installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.