long-job

long-job is a skill for Claude Code from chipi/agentic-ai-homelab. It costs 87 tokens per session (861 once invoked), scanned B, original, MIT.

A detached command runner for work that may exceed a tool-call timeout. It writes a log with the exit code, records the process, and prevents two jobs with the same lock from writing the same files at once.

In plain words
What is it for?
Use it for large builds, full end-to-end tests, translation runs, migrations, and data pipelines that need monitoring and safe single-job access.
Why use it?
It keeps long builds, tests, migrations, and data jobs running after the initial command returns while reducing concurrent-write conflicts.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: reads .claude/ paths; mentions AGENTS.md.

Good fit Use it for large builds, full end-to-end tests, translation runs, migrations, and data pipelines that need monitoring and safe single-job access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/long-job
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chipi/agentic-ai-homelab --skill long-job
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for long-job

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/long-job/github.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/long-job)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/long-job"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/long-job/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for long-job

Your own site · 80×15
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/long-job"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/long-job.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 861 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.00861
Opus 5.5 $0.00035 $0.00344
Sonnet 5.5 $0.00017 $0.00172
Haiku 4.5 $0.00009 $0.00086

Measured 4d ago against content hash 79c261d4e4a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

long-job scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/long-job.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

description: Run any command that may take more than ~10 minutes (a full e2e or translation run, a large build, a data pipeline, a migration) detached from the tool call, with a log ending in EXIT=, a PID file, and a loc
workstation/claude/skills/long-job/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

long-job

Two failures this prevents (orrery, 2026-10-17):

  • A background Bash run was killed at the 30-minute default timeout mid-run (5,100 of 6,953 fields). Nothing was corrupted, but the work had to be resumed.
  • Two runs wrote the same files at once; each saved the document it had read earlier, so edits could be overwritten.

How

J=~/.claude/skills/long-job/scripts/long-job.sh
$J start <name> [--lock <key>] [--cwd <dir>] -- <command …>
  • The job runs in its own process group (setsid on Linux; on macOS, which has no setsid, perl's setpgrp), detached from the tool call: the tool returns at once and no tool timeout applies. Its log ends with EXIT=<code>. start fails (exit 2, with the log's last lines) if the job is gone a second later without an EXIT= line, instead of reporting "started".
  • --lock <key>: jobs that write the same thing share a key (e.g. orrery-i18n). A second job with a held lock is refused (exit 2). A lock whose owner died is free, so a crash never blocks the next run.
  • The output prints the Monitor command (GNU tail --pid ends with the job; a polling form on macOS) and a one-shot wait command. Arm the Monitor right away — watch it live (AGENTS.md rule 0.11), don't sleep.

Then:

$J status <name>   # running | finished EXIT=<n> | dead (killed or crashed)
$J tail <name> 40
$J stop <name>     # TERMs only this job's process group (pgid = pid), KILL after 10 s
$J list

State: ${LONG_JOB_DIR:-~/.local/state/long-job}/<name>.{log,pid,cmd}, locks in locks/.

Rules

  • Name the lock after what the job writes, not after the job, when two different jobs could touch the same files (orrery-i18n for every translation run). Different files → different locks → they may run in parallel.
  • Resumable jobs: write per unit (per file), so a stopped job leaves only whole units and can be resumed by building a manifest of what's left.
  • Cleanup: jobs started from a project directory are tool processes under it, so the SessionEnd reaper (~/.claude/hooks/session-reap.sh) stops them when the session ends. Stop your own jobs with stop when done; never pkill.
  • A Monitor expires after 30 minutes: re-arm it with the same command if the job is still running.

Read the full file on GitHub · 64 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +3 lines 79c261d4e4a9
  2. 17d ago First seen · 61 lines · 87 tokens per session scan B a4416e13323a

Subscribe to this mod's changes

long-job is a skill published in the GitHub repository chipi/agentic-ai-homelab (3 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 861 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-18.

Related

Other skills, from other repositories

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by your inbox assignment.

paperclipai/paperclip · 30 tokens

founder-coach

Use when a founder is the bottleneck, can't delegate, is burning out or is moving from IC to CEO. Covers delegation, energy and calendar audits, blind spots and succession.

alirezarezvani/claude-skills · 41 tokens

todos

Use when the user asks for a shared plan, a task needs at least three substantive execution steps, or a loose TODO is pending. Without an explicit plan request, not for one-shot answers or checks, or one- to two-step work that is not already in the list.

JetBrains/thinkrail · 58 tokens

meetings

Context for the Meetings app's data — where a meeting's notes, diagram, transcript-derived tasks and calendar cache live, what the lifecycle states mean, how the app's agents are driven. Load when asked about a meeting's notes or action items, or when touching the meetings app data dir.

kirodotdev/KiroCrew · 62 tokens

subscription-setup

A setup workflow for creating recurring medical-learning subscriptions after a doctor’s profile has been registered.

TencentCloud/Octop · 80 tokens

agent-initialization

Initialize or extend an Agent from a user requirement - write AGENTS.md, set identity metadata, and create, install or import Skills and hook packages (scripts the harness runs on every prompt, before tool calls, or after a task). For an Agent with an in-app workbench, pair with penguin-plugin; for a standalone…

Prism-Shadow/penguin-harness · 79 tokens