agentleFS
intilityintility/for-developers-plugin/skills/deploy-app/SKILL.md

deploy-app

Skill3 starsChanged 6 months agoMITView on GitHub

Generates Kubernetes manifests (Namespace, Deployment, Service) for a containerized app and deploys them to the cluster with oc apply. Use when the user wants to "deploy my app", "ship my app", "run my app on the cluster", or after prepare-app has confirmed they have a containerized image. Defaults to a one-app-per-namespace layout so the same cluster can host many apps cleanly.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. bex-co/bex★ 569same name
    2. eyaprak/skills★ 32same name
    3. taskfuel/skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 3 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If it errors, run the cluster-login skill first.

    line 34
  2. Very specific:

    If an indev command says "Unauthorized" instead, run indev login and resume.

    line 40
  3. Very specific:

    If you came from prepare-app, you already have:

    line 44
  4. Very specific:

    Use the templates in references/manifest-templates.md.

    line 67
  5. Very specific:

    If the directory doesn't exist, create it.

    line 75
  6. Very specific:

    If prepare-app flagged the registry as private, the cluster needs pull credentials.

    line 89
  7. Very specific:

    Ask the user for registry, username, and password/token (one AskUserQuestion with free-text options).

    line 103
  8. Distinctive:

    If it succeeds, you're done with deploy.

    line 137
  9. Very specific:

    All pods should be Running with 1/1 ready.

    line 143
  10. Distinctive:

    Don't dump troubleshooting trees on the user.

    line 147
  11. Very specific:

    If yes, invoke expose-app.

    line 174
  12. Very specific:

    Don't add Ingress or Route resources here — that's the expose-app skill.

    line 187
  13. Very specific:

    Don't add HorizontalPodAutoscaler, PodDisruptionBudget, NetworkPolicy, ConfigMap, or Secret unless the user asks.

    line 188
  14. Very specific:

    Don't add resource requests/limits automatically — the cluster has reasonable defaults and beginners trip over too-low limits.

    line 189
  15. Distinctive:

    Don't generate Helm or Kustomize.

    line 190

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy App

Goal

Generate three manifest files (namespace.yaml, deployment.yaml, service.yaml) and apply them. End state: pods are Running and there's a Service for the next skill (expose-app) to attach to.

Step 0 — Confirm cluster access

oc whoami

If it errors, run the cluster-login skill first. Don't proceed without auth.

If oc returns "Unauthorized" mid-flow

The oc token has expired. Don't retry the failing command. Stop where you are, route to the cluster-login skill, then resume from the failed step.

If an indev command says "Unauthorized" instead, run indev login and resume.

Step 1 — Collect what you need

If you came from prepare-app, you already have:

  • image
  • container port

Now ask for:

Q1: "What do you want to call this app?"
  Options:
    - Other (free text — e.g. 'myapp', 'api', 'frontend')
  This becomes both the app name and the namespace.

Q2: "How many copies (replicas) should run?"
  Options:
    - "1" — fine for testing or a small app (Recommended)
    - "2" — basic redundancy
    - "3" — for higher availability

Defaults: replicas = 1, namespace = app name. Don't ask anything else here.

Step 2 — Generate manifests

Use the templates in references/manifest-templates.md. Write three files into a local k8s/<app-name>/ directory in the user's working directory:

k8s/<app-name>/namespace.yaml
k8s/<app-name>/deployment.yaml
k8s/<app-name>/service.yaml

If the directory doesn't exist, create it. Don't overwrite existing files without asking — if deployment.yaml already exists, ask whether to overwrite or to use update-image instead.

Substitutions

PlaceholderValue
<app-name>from Step 1
<namespace>same as <app-name>
<image>from prepare-app
<container-port>from prepare-app
<replicas>from Step 1

Private image registry

If prepare-app flagged the registry as private, the cluster needs pull credentials. The platform handles this once per cluster, not per app, via indev (requires indev v1.4+). No imagePullSecrets in the manifests, no per-namespace secrets.

1. Is there already a pull secret that covers this registry?

indev pullsecret list
  • One exists and includes the registry → confirm it's assigned to this cluster (indev pullsecret get <name> shows details). If so, nothing to do — continue with the deploy.
  • One exists but for a different registry → add this one to it: indev pullsecret registry add (check --help for the format), then continue.
  • None → create one (next step).

2. Create it

Ask the user for registry, username, and password/token (one AskUserQuestion with free-text options).

ghcr.io tip: username = their GitHub username, token = a classic personal access token with the read:packages scope (fine-grained tokens don't work with ghcr), created at https://github.com/settings/tokens. Don't let them paste their GitHub password — it won't work.

indev pullsecret create --name <name> --registry <registry>:<username>:<token>

The registry's short name (e.g. ghcr) is a fine secret name.

3. Assign it to the cluster

indev cluster pullsecret set <full-cluster-name> <pull-secret-name>

That's it — the whole cluster can now pull from that registry. Every future private app on this cluster just works, no questions asked.

Step 3 — Apply

Apply in order — namespace first so the others have somewhere to land.

oc apply -f k8s/<app-name>/namespace.yaml
oc apply -f k8s/<app-name>/deployment.yaml
oc apply -f k8s/<app-name>/service.yaml

Step 4 — Watch the rollout

oc rollout status deployment/<app-name> -n <app-name> --timeout=180s

If it succeeds, you're done with deploy. Confirm with:

oc get pods -n <app-name>

All pods should be Running with 1/1 ready.

Step 5 — If pods aren't Running

Don't dump troubleshooting trees on the user. Look at the pod yourself, then summarize in one sentence what's wrong.

oc get pods -n <app-name>
oc describe pod <pod-name> -n <app-name>
oc logs <pod-name> -n <app-name>

Common things and the one-line summary to give the user:

What you seeTell the user
ImagePullBackOff / ErrImagePull"The cluster can't pull your image. Is the tag correct, and is the registry public? If it's private: does the cluster's pull secret cover it (indev pullsecret list), and is the token in it still valid? (PATs expire — recreate the pull secret and reassign it if so.)"
CrashLoopBackOff with logs showing app errorsShare the relevant log line. "Your app is crashing on startup — here's what it said: …"
CreateContainerConfigError"Something in the manifest is invalid — usually a missing secret or bad env var."
Pending forever"Cluster is out of room. Check oc get nodes and consider resizing in the portal."

Offer to fix the manifest if the issue is something you can edit (wrong port, wrong image tag, etc.). For registry / cluster sizing issues, point at the right place.

Step 6 — Hand off

Once the deployment is healthy, tell the user briefly:

Your app is running, but it doesn't have a URL yet. Want me to give it one?

If yes, invoke expose-app.

Adding more apps later

Same skill. New name → new namespace, new manifests in k8s/<new-app-name>/. No cluster work needed. This is the "many apps on one cluster" model.

References

  • references/manifest-templates.md — YAML templates for Namespace, Deployment, Service
  • references/usage-examples.md — typical conversations (first deploy, private registry, image pull failures, crashing pods)

What not to do

  • Don't add Ingress or Route resources here — that's the expose-app skill.
  • Don't add HorizontalPodAutoscaler, PodDisruptionBudget, NetworkPolicy, ConfigMap, or Secret unless the user asks. Start minimal.
  • Don't add resource requests/limits automatically — the cluster has reasonable defaults and beginners trip over too-low limits. Add only when the user asks.
  • Don't generate Helm or Kustomize. Plain YAML.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.