Skip to content
Skills Library
DevOps & cloud · Automation

startup-manager

/startup-manager

Register, inspect, test, or remove scripts that run every time this sandbox starts, such as reinstalling project dependencies onto local disk after a sandbox rebuild. Use when dependencies or other local state must come back automatically, or when the user asks what runs at sandbox startup. Not for inspecting, upgrading, or restarting the sandbox itself (use sandbox-manager) or for clock-based schedules (use using-cron).

Author
dtyq ↗
Repository
magic ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Register, inspect, test, or remove scripts that run every time this sandbox starts, such as reinstalling project dependencies onto local disk after a sandbox rebuild. Use when dependencies or other local state must come back automatically, or when the user asks what runs at sandbox startup. Not for inspecting, upgrading, or restarting the sandbox itself (use sandbox-manager) or for clock-based schedules (use using-cron).

Original author description

Register, inspect, test, or remove scripts that run every time this sandbox starts, such as reinstalling project dependencies onto local disk after a sandbox rebuild. Use when dependencies or other local state must come back automatically, or when the user asks what runs at sandbox startup. Not for inspecting, upgrading, or restarting the sandbox itself (use sandbox-manager) or for clock-based schedules (use using-cron).

How it works

  1. 1. When to use
  2. 2. Ask the user first
  3. 3. Write idempotent scripts
  4. 4. How tasks run
  5. 5. Tools
  6. 6. Read the status
Original SKILL.md headings · 95 lines, 632 words
SKILL.md preview
---
name: startup-manager
description: Register, inspect, test, or remove scripts that run every time this sandbox starts, such as reinstalling project dependencies onto local disk after a sandbox rebuild. Use when dependencies or other local state must come back automatically, or when the user asks what runs at sandbox startup. Not for inspecting, upgrading, or restarting the sandbox itself (use sandbox-manager) or for clock-based schedules (use using-cron).
---

# Startup Manager

A startup task is a shell script stored in `.workspace/.magic/startup/<task_id>.md`. After every sandbox start, all enabled tasks run once, one after another, in the background.

## 1. When to use

| Situation | Use |
| --- | --- |
| Dependencies or other local state must come back after a sandbox rebuild | This skill |
| Run something at a time of day or on an interval | `using-cron` |
| Inspect, upgrade, or restart the sandbox itself | `sandbox-manager` |

Check the `Runtime Environment` section in the system prompt. In a cloud sandbox, a rebuild empties local disk, so startup tasks are what bring dependencies back. On a local machine, dependencies are not lost; do not suggest a startup task unless the user asks for one. If they do, it runs every time the service starts.

## 2. Ask the user first

Tell the user that the script will run automatically every time the sandbox starts, and show the script. Pass `confirmed: True` only after the user agrees. Creating a task, changing its script, and enabling it all require this confirmation; without it the tool returns `confirmation_required`.

## 3. Write idempotent scripts

After a rebuild, dependency directories are empty, not missing. Never use "the directory exists" to decide that dependencies are installed. Use the package manager's own idempotent install:

- npm: `npm install`
- pnpm: `pnpm install --frozen-lockfile`
- Python venv:
  ```bash
  [ -x .venv/bin/python ] || python3 -m venv .venv
  .venv/bin/pip install -r requirements.txt
  ```
- uv: `uv sync`
- Composer: `composer install`

Scripts must not wait for input. Set `workdir` to the project directory relative to `.workspace` instead of starting the script with `cd`.

## 4. How tasks run

- Tasks run in the background after each sandbox start. They never block the conversation and never notify anyone.
- Each run is a normal background shell task, so its output can be read with `shell_await`.
- Results only exist for the current sandbox session. You do not need to check them routinely; check them when something looks wrong, such as a missing dependency.
- A task copied from another project, for example through import or sharing, is skipped until the user confirms it for the current project.

## 5. Tools

All tools are called through Code Mode and return a readable `result.content`.

Register a task, then test it right away:

```python
run_sdk_snippet(python_code="""
from sdk.tool import tool

result = tool.call("startup_task_create", {
    "name": "my-app deps",
    "workdir": "my-app",
    "script": "npm install",
    "confirmed": True,
})
print(result.content)
if result.ok:
    run = tool.call("startup_task_run", {"task_id": result.data["task_id"]})
    print(run.content)
""")
```

If the run moved to the background, wait for it with the `shell_await` call given in `run.content` until it finishes, and confirm it succeeded.

Other operations:

```python
run_sdk_snippet(python_code="""
from sdk.tool import tool

print(tool.call("startup_task_list", {}).content)
print(tool.call("startup_task_update", {"task_id": "my-app-deps", "timeout_seconds": 1800}).content)
print(tool.call("startup_task_delete", {"task_id": "my-app-deps"}).content)
""")
```

`startup_task_update` changes only the fields you pass. Changing `script` or passing `enabled: True` also requires `confirmed: True`.

## 6. Read the status

`startup_task_list` reports how each task ran after this sandbox started:

| Status | What to do |
| --- | --- |
| Running | Wait with `shell_await` on its background task ID, then retry your command |
| Succeeded | Nothing |
| Failed | Read the output or log, fix the script or install manually, and tell the user |
| Stopped after timeout | Read the log; raise `timeout_seconds` only if the install was still progressing |
| Skipped, disabled | Enable it only if the user wants it |
| Skipped, confirmed in a different project | Ask the user again, then call `startup_task_update` with `enabled: True` and `confirmed: True` |
| Not run yet | The startup round has not reached it, or it was never run in this session |

Versions

The database has no other skills named startup-manager.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 6d37fa8d4041 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sandbox-manager
    Inspect, upgrade, or restart the sandbox this Agent is running in. Use when the user asks about this Agent's sandbox or virtual machine status, Agent image version, or explicitly asks to upgrade or restart its current environment.
  • 98windows-sandbox-setup
    Get Windows Sandbox ready for sandbox-mcp CLI or MCP workflows. Use when sbx or a sandbox tool says "Windows Sandbox isn't ready", when a sandbox is already running and blocks a new one, or before first use.
  • 100nvidia-nemoclaw-user-monitor-sandbox
    Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.
  • 100offload-to-sandbox
    Offload heavy builds, full test suites and parallel experiments from the local machine to Vercel Sandboxes with the `vercel sandbox` CLI. Use when a local machine is overloaded or shared by several agents, when a test suite should be sharded, or when many tasks should run side…
  • 100systemg
    Use when working with systemg/sysg, the YAML-driven process manager — writing or editing sysg config files (services, depends_on, deployment, hooks, cron), starting/stopping/restarting sysg-managed stacks, or inspecting service status and logs.
  • 100platform-sandbox-configure
    MUST USE this skill for ANY sandbox request — including simply getting a sandbox's details, status, license type, or pending-activation state by name or ID. TRIGGER when the user: types \"sandbox -help\"/\"sandbox help\"; mentions a sandbox ID (07E prefix); asks to list or show…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.