Skip to content
Back to skills

Service

ASecurity

Generate or update a single Swarm service definition — scaling, resource limits, rolling update policy, health check.

  • 8 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 6, 2026
ai-agentsnodedockerapi

Works with

  • api

Security analysis

A100/100

Scanned September 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Service?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Service
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/khaitrang1995-service/badge)](https://www.skillsdirectory.com/skills/khaitrang1995-service)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: service
description: Generate or update a single Swarm service definition — scaling, resource limits, rolling update policy, health check.
user-invocable: true
argument-hint: "<service-name> [--scale <n>] [--update-parallelism <n>] [--constraint <expr>]"
---

# /service — Generate/Update a Swarm Service

## Input examples
```
/service api --scale 5 --update-parallelism 2
/service db --constraint "node.labels.tier==data"
/service worker --scale 3
```

## Process
1. If the service already exists in a stack file → propose an **Edit** (L2 diff) to its `deploy:` block, not a new file.
2. If it's a new standalone service outside a stack → generate the equivalent `docker service create` command **as a reference**, clearly labeled as something the user runs themselves (the agent never runs it).
3. Apply the same `deploy:` rules as `/stack` (resources, update_config, rollback_config, restart_policy).
4. L1/L2 approval → Write/Edit.

## Mandatory rules
- Scaling changes always state the before/after replica count and whether it's zero-downtime.
- `--update-parallelism` above 1 requires the service to already have a `HEALTHCHECK` (see `swarm-conventions.md` Section 2) — warn if it doesn't.
- Placement constraint changes on a stateful service must flag the risk of the scheduler moving it away from its data volume.

## Output
```
Edit to the existing docker-stack.yml service block
   — or, for a one-off service —
docker-service-create.sh   (reference command, commented, not executed by the agent)
```

## References
- @.claude/rules/swarm-conventions.md

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.