agentleFS
bolivian-perubolivian-peru/os-moda/skills/app-deployer/SKILL.md

app-deployer

Skill118 starsChanged 6 months agoApache-2.0View on GitHub

Deploy and manage user applications as managed systemd services

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Always specify memory_max for production apps to prevent OOM issues

    line 76
  2. Very specific:

    Use port parameter for discovery — system_discover will find the app

    line 77
  3. Very specific:

    Use named user when the app needs filesystem access beyond its own binary

    line 78
  4. Very specific:

    Check app_logs after deploy to catch startup errors immediately

    line 79
  5. Very specific:

    Use app_restart (not stop + deploy) to preserve the same configuration

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

App Deployer

Deploy and manage user applications (Node.js apps, Python scripts, Go binaries, Docker-less containers, etc.) as first-class managed processes on the OS.

Deploy Workflow

  1. Understand — Ask what to deploy. Determine the command, working directory, environment variables, and resource requirements.
  2. Deploy — Use app_deploy with appropriate parameters. Default isolation uses DynamicUser=yes (ephemeral UID, no root).
  3. Verify — Use app_list to confirm the app is running. Check app_logs for startup output.
  4. Store — Use memory_store to remember what was deployed and why.

Example

User: "Deploy my Node.js API at /home/user/api"

1. app_deploy({
     name: "user-api",
     command: "/usr/bin/node",
     args: ["server.js"],
     working_dir: "/home/user/api",
     env: { NODE_ENV: "production", PORT: "3000" },
     port: 3000,
     memory_max: "256M",
     user: "user"
   })
2. app_list() → confirm running, check PID
3. app_logs({ name: "user-api", lines: 20 }) → verify startup
4. memory_store({ summary: "Deployed user-api Node.js app", ... })

Managing Apps

  • Status: app_list shows all apps with live systemd state, PID, memory, CPU usage
  • Logs: app_logs pulls from journald — supports --since, --priority, line limits
  • Restart: app_restart — if the unit is active, calls systemctl restart. If inactive, re-deploys from registry
  • Stop: app_stop — stops the unit, marks as stopped in registry (preserved for restart)
  • Remove: app_remove — stops and permanently deletes from registry

Resource Limits

Apps run under systemd cgroups. Available limits:

ParameterExampleEffect
memory_max"256M", "1G"Hard memory cap via MemoryMax=
cpu_quota"50%", "200%"CPU time limit (200% = 2 cores)

Isolation

  • Default (DynamicUser=yes): App runs as an ephemeral system user. No root, no access to other users' files. Best for self-contained binaries and services.
  • Named user (user: "username"): App runs as the specified user. Use when the app needs to read/write files owned by that user (e.g., /home/user/data).

Boot Persistence

Apps are registered in /var/lib/osmoda/apps/registry.json. The osmoda-app-restore service re-creates all running apps as transient systemd units on boot. Apps marked as stopped are not restored.

Best Practices

  • Always specify memory_max for production apps to prevent OOM issues
  • Use port parameter for discovery — system_discover will find the app
  • Use named user when the app needs filesystem access beyond its own binary
  • Check app_logs after deploy to catch startup errors immediately
  • Use app_restart (not stop + deploy) to preserve the same configuration

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.