writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
use-sealosDeploy and operate apps on Sealos Cloud: sign in to a Sealos account, deploy any project or self-hosted app (from the template store, an official Docker image, or project source code), provision managed databases (PostgreSQL, MySQL, MongoDB, Redis, Kafka), create S3-compatible object storage, expose public HTTPS domains, check status and logs, and troublesh…
Independent GitHub snapshot · Automated classification · Original documentation governs
Sealos Cloud is a multi-tenant Kubernetes platform. Everything a user owns
lives in one namespace (ns-xxx) per workspace, accessed with a
restricted kubeconfig (~/.sealos/kubeconfig). Within the namespace:
cloud.sealos.io/app-deploy-manager: <app> so the Sealos "App Launchpad" UI
can manage them. Public HTTPS comes free via <host>.<region-domain> and a
wildcard cert.Cluster CRs managed by the "Database" UI.sealos-api.py store-list); deployed templates are tracked as instances and appear in the
UI.ObjectStorageBucket CRs with S3-compatible
credentials in managed secrets.usw-1.sealos.io for
international, bja.sealos.run etc. for China). The Template API lives at
https://template.<region-domain>.Resolve scripts/ and references/ against this skill's directory, not the
project working directory.
scripts/sealos-api.py — auth (status, login, workspaces, switch)
and the Template API (deploy, store-list). Deploying through the
Template API (not raw kubectl apply) is what makes resources show up as a
deletable unit in the Sealos UI.kubectl with export KUBECONFIG=~/.sealos/kubeconfig — all reads,
debugging, and deletions. The kubeconfig is namespace-scoped; you cannot see
or touch other tenants.scripts/wait-app.sh — post-deploy verification (workload readiness + URL
probe + failure diagnostics).docker buildx — only for the source-build path.If SEALAI_DEPLOY_MODE is managed (a Brain-managed sandbox), stop here and
follow ../sealos-deploy/SKILL.md instead — that
mode forbids login and interactive prompts. Everything below is the local
interactive path.
python3 scripts/sealos-api.py status
authenticated: true → proceed; note namespace and region_domain.python3 scripts/sealos-api.py login in the
background, watch its stderr, and relay the sign-in URL to the user the
moment it prints (the code expires; never sit silently until the command
ends). Users can alternatively paste a kubeconfig from the Sealos web
console (top-left avatar → kubeconfig) into ~/.sealos/kubeconfig.login --region <url>. Wrong workspace? workspaces +
switch <name>.Deploys, database creation, and storage consume the account's quota/balance — if a deploy is rejected with a quota error, report it; do not silently retry with smaller numbers.
When the user wants something deployed, classify it FIRST — the wrong path wastes the whole time budget:
python3 scripts/sealos-api.py store-list --search <name>.
After ANY deploy, verify before reporting:
bash scripts/wait-app.sh -u https://<host>.<region-domain> deployment/<name> [cluster/<name>-pg ...]
On *.sealos.io regions, local deploys also claim a Brain Project in-script;
if brain_adoption.ok is false, or warnings still lists
incompleteResourceSet after verify, run sealos-api.py adopt <instance> —
never redeploy. On *.sealos.run this is skipped
(brain_adoption.reason: not-sealos-io). See
deploy.md.
export KUBECONFIG=~/.sealos/kubeconfig
kubectl get deploy,sts,pods # what's running
kubectl get clusters.apps.kubeblocks.io # databases
kubectl get ingress -o custom-columns='NAME:.metadata.name,HOST:.spec.rules[0].host' # public URLs
kubectl logs deploy/<name> --tail=100 # app logs
kubectl describe pod <pod> # scheduling/pull issues
kubectl get events --field-selector type=Warning --sort-by=.lastTimestamp | tail -20
kubectl scale deploy/<name> --replicas=2 # scale
python3 scripts/sealos-api.py store-list --search <query> # template store
| Intent | Reference |
|---|---|
| Deploy anything (store template, image, or built artifact) | deploy.md |
| Dockerfile / image build / registry push for user source | build.md |
| Provision or connect PostgreSQL/MySQL/MongoDB/Redis/Kafka | databases.md |
| Manifest rules when writing template YAML (labels, Ingress, storage, quota ladder, object storage) | platform.md |
| Status, logs, debugging, scaling, deletion, cost hygiene | operate.md |
| Per-app recipes for popular self-hosted software | recipes.md |
Brain managed sandbox (SEALAI_DEPLOY_MODE=managed) | ../sealos-deploy/SKILL.md |
Load only what the task needs — usually one reference, two at most.
wait-app.sh
exits 0 AND the public URL returns a real page (2xx/3xx, and for
SSR apps the body is not an error page). If verification fails, triage via
operate.md — do not re-deploy blindly.docker buildx build --platform linux/amd64). Apple Silicon defaults produce arm64
images that crash-loop on Sealos with exec format error.Mi values.kubectl apply only for
single resources during debugging, and remember kubectl apply rejects
Deployment+volumeClaimTemplates (use StatefulSet).kubectl get ...) before describing it.-a1b2c3d4) are there for a reason —
keep them.~/.sealos/kubeconfig, using the Docker socket, and any
command that must read that kubeconfig.After each operation report: what was deployed/changed (names + namespace), the public URL if any, verification evidence (ready state, HTTP code), and credentials location (secret names, never values). On failure: the failing resource, the decisive log/event lines, and the next action you are taking.