4.2 KiB
4.2 KiB
| description | argument-hint | allowed-tools | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Configure deployment for your agent system. Supports /schedule (cloud), Desktop scheduled tasks, cron/launchd, systemd, and Docker. | Optional: deployment target (schedule, desktop, local, vps, docker) |
|
You are running /agent-factory:deploy — a guided deployment configuration for autonomous agent systems.
If $ARGUMENTS specifies a target, skip to that target's section. Otherwise, ask the user to choose.
Step 1: Scan existing system
Read the user's agent system:
- Glob for
.claude/agents/*.md— list all agents with names and models - Glob for
.claude/skills/*/SKILL.mdand.claude/skills/*.md— list all skills - Read
.claude/settings.jsonif it exists — check hook configuration - Check for existing automation:
automation/,HEARTBEAT.md,docker-compose.yml - Read
CLAUDE.mdfor project context
Summarize what was found before proceeding.
Step 2: Choose deployment target
Ask using AskUserQuestion: "Where should your agents run? Choose a deployment target:
- Cloud (/schedule) — Runs on Anthropic's cloud. Needs GitHub repo. No local file access. 1-hour minimum interval. Best for: PR reviews, CI triage, repo maintenance.
- Desktop scheduled tasks — Runs on your machine via Claude Code Desktop app. Local file access. 1-minute minimum interval. Best for: local automation, file processing.
- Local (cron/launchd) — Traditional scheduler. Runs headless via
claude -p. Full local access. Best for: personal daily pipelines, development. - VPS (systemd) — Linux server with systemd service/timer. Always-on. Best for: team pipelines, production workloads.
- Docker — Containerized agent. Portable, isolated. Best for: reproducible deployments, security isolation."
If $ARGUMENTS matches a target name, skip this question.
Step 3: Configure chosen target
Cloud (/schedule)
- Check GitHub connection: suggest
/web-setupif not connected - Explain: "Cloud tasks clone your repo on each run. Local files are not accessible. MCP connectors provide external service access."
- Generate a task prompt from the user's pipeline skills
- Guide the user through
/scheduleto create the task - Note minimum 1-hour interval
Desktop scheduled tasks
- Explain: "Desktop tasks run on your machine with full local file access."
- Guide through the Desktop app's Schedule page
- Configure permission mode for unattended operation
Local (cron/launchd)
- Read
${CLAUDE_PLUGIN_ROOT}/scripts/templates/automation.sh - Copy and customize to
automation/run-pipeline.sh - Replace SKILL_NAME with the user's pipeline name
- Ask: "What schedule? (e.g., daily at 07:00, every 2 hours)"
- For macOS: read
${CLAUDE_PLUGIN_ROOT}/scripts/templates/launchd.plist, customize, save toautomation/ - For Linux: generate cron entry
- Provide exact activation commands
VPS (systemd)
- Read
${CLAUDE_PLUGIN_ROOT}/scripts/templates/systemd-service.unit - Ask: "What Linux user runs the agent?" and "Absolute path to project?"
- Customize and save service + timer units to
automation/ - Copy automation.sh template to
automation/run-pipeline.sh - Provide setup instructions including
systemctl enable/start
Docker
- Read
${CLAUDE_PLUGIN_ROOT}/scripts/templates/docker/templates (created in Session 6) - If templates don't exist yet: generate basic Dockerfile + docker-compose.yml inline
- Customize with project-specific values
- Save to project root
- Provide
docker compose up -dinstructions
Step 4: Verify deployment
For each target, provide a verification command:
- Cloud:
/schedule list→ task visible - Desktop: Check Schedule page in Desktop app
- Local:
crontab -l | grep claudeorlaunchctl list | grep claude - VPS:
systemctl status claude-agent - Docker:
docker compose ps
Use the deployment-advisor agent when the user needs guidance choosing between targets.
Step 5: Next steps
Tell the user:
- "Run
/agent-factory:statusto check your deployment" - "Run
/agent-factory:evaluateto assess your system's capability coverage"