Help us improve
Share bugs, ideas, or general feedback.
From sealos
Converts Docker Compose files or installation docs into production-grade Sealos (Kubernetes) templates. Automatically analyzes, converts, validates, and outputs without asking for missing fields.
npx claudepluginhub labring/sealos-skills --plugin sealosHow this skill is triggered — by the user, by Claude, or both
Slash command
/sealos:docker-to-sealosThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert Docker Compose files or installation docs into production-grade Sealos templates.
references/conversion-mappings.mdreferences/database-templates.mdreferences/example-guide.mdreferences/frappe-bench.mdreferences/must-rules-map.yamlreferences/rules-registry.yamlreferences/sealos-specs.mdscripts/check_consistency.pyscripts/check_consistency_context.pyscripts/check_consistency_engine.pyscripts/check_consistency_helpers_storage.pyscripts/check_consistency_helpers_violations.pyscripts/check_consistency_helpers_workload.pyscripts/check_consistency_line_locator.pyscripts/check_consistency_models.pyscripts/check_consistency_parser.pyscripts/check_consistency_registry.pyscripts/check_consistency_rule_helpers.pyscripts/check_consistency_rule_registry.pyscripts/check_consistency_rules.pyDeploys any GitHub project to Sealos Cloud with one command. Automates readiness checks, Dockerfile generation, image building, template creation, and deployment.
Provides production-ready Docker Compose templates with security hardening, resource limits, health checks, logging, monitoring, and high-availability for scalable deployments.
Creates, edits, validates, and troubleshoots Zeabur template YAML files. Converts docker-compose to Zeabur template format. Builds and publishes Docker images for template use.
Share bugs, ideas, or general feedback.
Convert Docker Compose files or installation docs into production-grade Sealos templates. Execute end-to-end automatically (analysis, conversion, validation, output) without asking users for missing fields.
Use the following precedence to prevent rule drift:
SKILL.md MUST rules (this file)references/sealos-specs.md and references/database-templates.mdreferences/conversion-mappings.md and references/example-guide.mdIf lower-priority references conflict with higher-priority MUST rules, update the lower-priority files. Do not keep conflicting examples.
Extract from Docker Compose/docs:
Infer and normalize:
Generate resources in this order:
Apply field-level mappings from references/conversion-mappings.md, including:
scripts/path_converter.py)*_DATABASE_URL, *_DB_URL), when Kubeblocks endpoint is host:port, inject host/port/username/password via approved secretKeyRef envs and compose the final URL with $(VAR) expansion/etc/nginx/ssl, /etc/ssl, /certs) unless official Kubernetes docs explicitly require HTTPS backend-to-service trafficscripts/compose_to_template.py --kompose-mode always as deterministic conversion entrypoint (require kompose for reproducible workload shaping)Cluster resources. Do not convert PostgreSQL/MySQL/MongoDB/Redis/Kafka Compose database services into raw Kubernetes Deployment or StatefulSet workloads.references/database-templates.md.postgres), the init Job must wait for PostgreSQL readiness before execution and create the target database idempotently.Always produce:
template/<app-name>/index.yamltemplate/<app-name>/logo.<ext> when official icon is resolvable, prioritizing square/circular icon-first artwork and avoiding rectangular wordmark/text logosNever create:
template/<app-name>/README.mdtemplate/<app-name>/README_zh.mdREADME authoring is out of scope for this skill. If the Template CR requires README URLs, populate URL fields in index.yaml only and leave file creation to a dedicated README skill.
Run validator and self-tests before delivering template output. If validation fails, fix template/rules/examples first.
metadata.name must be hardcoded lowercase; do not use ${{ defaults.app_name }}.metadata.name.title, url, gitRepo, author, description, icon, templateType, locale, i18n, categories).spec.readme must point to https://raw.githubusercontent.com/labring-actions/templates/kb-0.9/template/<app-name>/README.md.spec.i18n.zh.readme must point to https://raw.githubusercontent.com/labring-actions/templates/kb-0.9/template/<app-name>/README_zh.md.index.yaml only; this skill must not create or update the referenced README files.icon URL must point to template repo raw path for this app on kb-0.9 branch.template/<app-name>/logo.<ext> must use square/circular icon-first artwork (for example app icon/favicon/avatar), and must not use rectangular wordmark/text logos.i18n.zh.description must be written in Simplified Chinese.i18n.zh.title when it is identical to title.categories must only use predefined values (tool, ai, game, database, low-code, monitor, dev-ops, blog, storage, frontend, backend).spec.data.url.spec.displayType must be normal.spec.type must be link.spec.template in App resource.cloud.sealos.io/app-deploy-manager label value must equal resource metadata.name.metadata.labels.app label value must equal resource metadata.name for managed app workloads.metadata.name for managed app workloads; sidecar/helper containers may use distinct descriptive names.Service resources must define metadata.labels.app and metadata.labels.cloud.sealos.io/app-deploy-manager, and both labels must match spec.selector.app.ConfigMap resources must define metadata.labels.app and metadata.labels.cloud.sealos.io/app-deploy-manager, and both labels must match metadata.name; bootstrap-only ConfigMaps used only by init containers to copy initial config into persistent storage must not define either label.Service resources must use the same component name across metadata.name, metadata.labels.app, metadata.labels.cloud.sealos.io/app-deploy-manager, and spec.selector.app.Ingress resources (pathType: Prefix, path: /) must use the same component name across metadata.name, metadata.labels.cloud.sealos.io/app-deploy-manager, and backend service.name; non-root or non-Prefix Ingress rules may route to a different backend service.spec.ports[*].name must be explicitly set (required for multi-port services).kubernetes.io/ingress.class, nginx.ingress.kubernetes.io/proxy-body-size, nginx.ingress.kubernetes.io/server-snippet, nginx.ingress.kubernetes.io/ssl-redirect, nginx.ingress.kubernetes.io/backend-protocol, nginx.ingress.kubernetes.io/client-body-buffer-size, nginx.ingress.kubernetes.io/proxy-buffer-size, nginx.ingress.kubernetes.io/proxy-send-timeout, nginx.ingress.kubernetes.io/proxy-read-timeout, nginx.ingress.kubernetes.io/configuration-snippet) with expected defaults.cloud.sealos.io/cronjob, cronjob-launchpad-name, and cronjob-type; cloud.sealos.io/cronjob must equal metadata.name, cronjob-launchpad-name must be "", and cronjob-type must be image.livenessProbe, readinessProbe, and (for slow bootstrap apps) startupProbe, aligned with official endpoints/commands.:latest.crane: prefer an explicit version tag (for example v2.2.0), and fallback to digest pin only when a deterministic version tag is unavailable.:v2, :2.1, :stable); use an explicit version tag or digest.${VAR}, ${VAR:-default}); resolve to explicit tag or digest before emitting template artifacts.originImageName must match container image.template.spec.imagePullSecrets; private-registry workloads may reference only the app-scoped pull Secret ${{ defaults.app_name }}.sealos-deploy using local gh CLI credentials for private GHCR images; do not expose raw registry credential inputs in generated templates.imagePullPolicy: IfNotPresent.emptyDir.volumeClaimTemplates) where storage is needed.volumeClaimTemplates must set metadata.labels.cloud.sealos.io/deploy-on-sealos: ${{ defaults.app_name }} and every volumeClaimTemplates[].metadata.labels.cloud.sealos.io/deploy-on-sealos: ${{ defaults.app_name }} so Template can track and clean PVCs.<= 1Gi unless source spec explicitly requires less.scripts/path_converter.py).env[].value.endpoint, host, port, username, password) from approved Kubeblocks database secrets via env[].valueFrom.secretKeyRef; exception: Redis host/port may use Sealos Redis Service FQDN and 6379 when the Redis secret only exposes credentials, and MongoDB connection URLs may use the Sealos MongoDB Service FQDN plus 27017 when the MongoDB secret exposes credentials only.Secret references except approved Kubeblocks database secrets and object storage secrets.template.spec.imagePullSecrets; public images must not add pull secrets.Secret resources.config/default.json, PHP config files), create a ConfigMap containing the config file with the public URL set to https://${{ defaults.app_host }}.${{ SEALOS_CLOUD_DOMAIN }}, and mount it to the application's config directory. The ConfigMap must follow standard naming and label conventions.postgres), include ${{ defaults.app_name }}-pg-init Job and implement startup-safe/idempotent creation logic (readiness wait + existence check before create).Cluster resources, not application Deployment or StatefulSet workloads. StatefulSet is allowed for stateful application components only, never for PostgreSQL/MySQL/MongoDB/Redis/Kafka database services.postgresql-16.4.0.apps.kubeblocks.io/v1alpha1.${{ defaults.app_name }}-pg.app.kubernetes.io/instance and app.kubernetes.io/managed-by labels.Cluster must include kb.io/database, sealos-db-provider-cr, and clusterdefinition.kubeblocks.io/name labels; sealos-db-provider-cr must equal metadata.name so dbprovider can list and classify the database. Related Pods, Services, and OpsRequests should carry app.kubernetes.io/instance=<database name> for detail views.kb.io/database: postgresql-16.4.0, clusterdefinition.kubeblocks.io/name: postgresql, clusterversion.kubeblocks.io/name: postgresql-16.4.0, clusterVersionRef: postgresql-16.4.0, disableExporter: true, enabledLogs: [running], switchPolicy.type: Noop, serviceAccountName).componentDef: mongodb, serviceVersion: 8.0.4, labels kb.io/database and app.kubernetes.io/instance).kb.io/database: ac-mysql-8.0.30-1, clusterDefinitionRef: apecloud-mysql, clusterVersionRef: ac-mysql-8.0.30-1, tolerations: []).componentDef: redis-7, componentDef: redis-sentinel-7, serviceVersion: 7.2.7, main data PVC 1Gi, topology replication).limits(cpu=500m,memory=512Mi) and requests(cpu=50m,memory=51Mi) unless source docs explicitly require otherwise.limits.cpu only 100m/200m/500m/1/2/3/4/8, limits.memory only 128Mi/256Mi/512Mi/1024Mi/2048Mi/4096Mi/8192Mi/16384Mi, and requests must be derived from limits by dropping the last numeric digit (500m→50m, 512Mi→51Mi, 1→100m, 1024Mi→102Mi, 4096Mi→409Mi). Do not invent non-ladder values, and never use 2G/4G/8G/16G because Sealos Template API quota preview can parse bare G memory as 0.${{ defaults.app_name }}-mongo-mongodb-account-root (or ${{ defaults.app_name }}-mongodb-mongodb-account-root when the MongoDB cluster name uses -mongodb)${{ defaults.app_name }}-redis-redis-account-default (legacy ${{ defaults.app_name }}-redis-account-default may be accepted for backward compatibility)${{ defaults.app_name }}-broker-account-adminUnless source docs explicitly require otherwise, use the lightweight app ladder entry:
cpu=200m, memory=256Micpu=20m, memory=25MirevisionHistoryLimit: 1automountServiceAccountToken: false by default; set it to true only when the application has explicit Kubernetes API/service account token requirements, evidenced by Kubernetes integration settings, serviceAccountName, or a sealos.io/service-account-token-reason workload annotation.For higher resource needs, move only to another allowed limits ladder entry and recompute requests from that limits value.
For browser, VNC, WebRTC desktop, Xvfb, Selkies, noVNC, Kasm, or remote-desktop-style containers:
Example:
512Mi but reaches 503Mi; shipping 512Mi as the stable minimum is unsafe.1024Mi, set request to 102Mi, rerun smoke and stability checks.For Chrome + Xvfb + Selkies with 4K max display, use at least:
cpu=200m, memory=1024Micpu=20m, memory=102Midefaults for generated values (app_name, app_host, random passwords/keys).inputs only for truly user-provided operational values (email/SMTP/external API keys, etc.).inputs.description must be in English.Run all checks before final response:
python scripts/path_converter.py --self-testpython scripts/test_check_consistency.pypython scripts/test_compose_to_template.pypython scripts/test_check_must_coverage.pypython scripts/check_consistency.py --skill SKILL.md --references references --rules-file references/rules-registry.yamlpython scripts/check_consistency.py --skill SKILL.md --references references --rules-file references/rules-registry.yaml --artifacts template/<app-name>/index.yamlpython scripts/check_must_coverage.py --skill SKILL.md --mapping references/must-rules-map.yaml --rules-file references/rules-registry.yamlpython scripts/quality_gate.py (requires template/*/index.yaml by default; set DOCKER_TO_SEALOS_ALLOW_EMPTY_ARTIFACTS=1 only for dev/debug without artifacts)check_consistency.py is registry-driven. Keep references/rules-registry.yaml in sync with implemented rules.
Registry rule entries support severity and optional scope.include_paths metadata.
When conversion is complete, provide:
template/<app-name>/index.yaml)Do not create or output README content in this skill. README generation is delegated to another skill.
Load only needed references for current task:
references/sealos-specs.md
references/conversion-mappings.md
references/database-templates.md
references/frappe-bench.md
references/example-guide.md
references/rules-registry.yaml
references/must-rules-map.yaml
rule or manual) for drift controlscripts/path_converter.py
scripts/compose_to_template.py
--kompose-mode auto|always|never (always is default) to reuse kompose convert workload shapestemplate/<app-name>/index.yamlscripts/test_compose_to_template.py
scripts/check_consistency.py
scripts/test_check_consistency.py
scripts/check_must_coverage.py
scripts/test_check_must_coverage.py
spec.data.url format; never use spec.template.spec.displayType: normal and spec.type: link; do not infer alternative enum values.template/<app-name>/README.md or template/<app-name>/README_zh.md; only keep README URL references inside index.yaml when required by the template schema.bench, load references/frappe-bench.md before generating app workloads.