Background jobs

From x-cmd/x-cmd · View interactive version

Background jobs is an AI agent skill from the GitHub repository x-cmd/x-cmd. Claw background job management using x agent run and x agent job. Use when the agent needs to offload tasks. As Manager in an interactive terminal, offload aggressively — almost everything beyond a single quick command should run in the background.

How to use this skill

Skill file

Claw Background Jobs Skill

When to Use

Use x agent run for ANY non-trivial task — the terminal must never block:

When NOT to Use

Commands

Job ID Convention

Use manager-<brief> for traceability, e.g., manager-loganalysis.

After Offloading — Quick Wrap-up then STOP

x agent run returns immediately — the job runs asynchronously in the background. Do NOT linger. Do the wrap-up right away, then STOP.

Required wrap-up:

  1. Record the job in HEARTBEAT.md (see heartbeat-delegation skill for format)
  2. Write a brief memory entry: user request + job ID + your ack message
  3. Reply to the user: "Started <job-id>. I'll follow up via heartbeat when it's done."

Do NOT:

The heartbeat agent monitors all background jobs and reports results. Trust the system. Exit immediately so the user can ask the next question.

Critical Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.