exec

A procedure for running programs that may take more than a few dozen seconds, such as training jobs, evaluations, data processing, or servers, while recording logs and detecting failures.

In plain words
What is it for?
Use it to start background or detached jobs, record their output and exit status, monitor them, and report when they finish or stop unexpectedly.
Why use it?
It prevents long-running work from being lost or left unexplained when a session ends, and makes completion or failure easier to verify.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tomoking2004/claude-plugins/exec
Any agent
npx skills add tomoking2004/claude-plugins --skill exec
Clone the repo
git clone --depth 1 https://github.com/tomoking2004/claude-plugins

Made for: Claude Code, Codex.

Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,450 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00160 $0.02450
Opus 5 $0.00080 $0.01225
Sonnet 5 $0.00032 $0.00490
Haiku 4.5 $0.00016 $0.00245

Measured yesterday against content hash 445d58020f57, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

exec scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ops/skills/exec/SKILL.md · 62 lines

How it starts

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

対象:ユーザーが実行を求めたプログラム・スクリプトのうち,数十秒を超えて走るもの——学習・評価・データ処理・サーバ等,起動したまま会話を続けたり離席したりし得る実行.

このうち常駐するもの(サーバ・デーモン・監視プロセス)には「完了」が無い——手順4・5(完了照合・完了通知)は適用せず,起動を確認したら Monitor が異常だけを見張り続ける(ops-exit= が出たなら,それは正常終了ではなく落ちた合図である).

対象外:数十秒で終わる実行——テスト・ビルド・lint・ワンライナー・git 操作など,結果をその場で見て次の一手を決めるもの.通常のフォアグラウンド実行で足りる(/refine:code ・ /assignment:program ・ /groundwork:impl 等が行う実行確認はここに属し,本スキルを挟まない).所要時間が読めなければまず短命として実行し,数十秒で返らなければ中断して本スキルで起動し直す.

手順

  1. 寿命を決めて起動する.どちらの形でもログ・終了コードの刻印は下の「実行の正典」に従う.

    • セッション内:1時間以内に終わると見込めるもの.Bash を run_in_background: true で起動する——ハーネスが完了時に通知する.セッションを閉じるとジョブも終わる

    • 分離:1時間を超えうるもの,またはユーザーの離席・セッション終了が見込まれるもの.親シェルから切り離し,セッションが閉じてもジョブを残す——切り離せているかは,別の Bash 呼び出し(=新しいシェル)からプロセスがまだ見えることで確かめる:

      mkdir -p logs; nohup sh -c '<コマンド> > logs/<名前>.log 2>&1; echo "ops-exit=$?" >> logs/<名前>.log' > /dev/null 2>&1 & echo $! > logs/<名前>.pid
      

      区切りは ; であって && ではない——&& で繋ぐと & がその AND リスト全体をバックグラウンドに送り,echo $!mkdir より先に走って logs/ 不在で落ちる(かつ $! がジョブでなくサブシェルを指す).

      この形はハーネスの完了通知を持たない——完了は手順2の Monitor が ops-exit= で拾い,セッションが閉じた後は /ops:progress がログから復元する.迷ったら分離を選ぶ(ジョブを失わない側に倒す).

  2. Monitor を張るpersistent: true を必ず指定する——既定5分・上限1時間のタイムアウトでは長時間ジョブの後半を見失う.tail-n +1 -Fログの冒頭から読む——起動直後の即死(import エラー・パス誤り・権限)が Monitor を張る前に済んでいても取りこぼさない.したがって起動後に待って生存確認する手順は要らない(フォアグラウンドの sleep はハーネスで禁じられており,そもそも打てない).

    tail -n +1 -F logs/<名前>.log | grep -E --line-buffered "<進捗マイルストーン>|ops-exit=|Traceback|Error|Exception|Killed|OOM|Segmentation fault|Fatal"
    
    • 失敗を必ず捕らえる:「今このジョブがクラッシュしたらこの grep は何か出すか」を問う——出ないなら広げる.ops-exit= は常に含める:これがあれば,正常終了も異常終了もハングも,沈黙のまま見過ごされることがない.
    • 進捗は間引く:毎ステップ出る行を入れてはならない.Monitor はイベントが溢れると自動停止され,肝心の失敗を取り逃す.エポック完了・評価結果など,数分に1回程度に落ちるマイルストーンだけを選ぶ.
  3. 状況把握手段を案内する:対象がライブダッシュボード・TensorBoard・進捗 URL 等を自分で提供していないか探す(生成される HTML/JSON,ログ冒頭の URL).見つかればその URL を,無ければログの場所と所要時間の見積もり(過去の同種実行や進捗の速度から分かるとき)を一言で伝える.確認は求めず,伝えるだけでよい.

  4. 終了したらログ全文と成果物を照合するops-exit= の値(またはハーネスの完了通知)を鵜呑みにせず,ログを実際に読んで裏取りする.完了時に生成されるはずの成果物(チェックポイント・出力ファイル等,特定できるとき)が実在するかも確かめる——ログにエラーが無いことは成果物の存在を保証しない.

  5. 離席が見込まれたジョブは,成功・失敗を問わず完了時に1回 PushNotification を送るstatus: "proactive",200字以内):離れている間に終わったことこそ知らせるべき情報である.失敗ならどこで何が起きたかの要点を,成功なら主要な結果(accuracy 等)を一言で.ユーザーが今まさに会話中で見ているものには送らない.

  6. Monitor を止める:プロセス終了を確認したら TaskStop で閉じる.

Read the full file on GitHub · 62 lines

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. yesterday First seen · 62 lines · 160 tokens per session scan A 445d58020f57

Subscribe to this mod's changes

exec is a skill published in the GitHub repository tomoking2004/claude-plugins (3 stars, last pushed 1mo ago), licensed MIT. It adds 160 tokens to every session and 2,450 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

skill-teilen

Reicht einen Skill, ein Plugin oder eine Vorlage (CLAUDE.md, settings.json, Prompt) in die SKAILE Community Skill-Library ein. Nutzen wenn der User sagt "teile meinen Skill", "teile meine CLAUDE.md", "teile meine Vorlage", "lade meinen Skill in die Community hoch", "reiche meinen Skill ein", "skill teilen" oder "in…

sebaskauf/skaile-community-library · 97 tokens

show-and-share

Schreibt einen fertigen Show-&-Share-Post für die SKAILE Community. Nutzen wenn der User sagt "schreib mir einen Show & Share Post", "stelle meinen Skill vor", "Post für meinen Skill/meine Vorlage", "schreib einen Post zu dem was ich gebaut habe", oder direkt nachdem ein Skill mit skill-teilen eingereicht wurde.

sebaskauf/skaile-community-library · 74 tokens

readme-pro

Schreibt oder verbessert ein README für das aktuelle Projekt. Nutzen wenn der User "schreib mir ein README", "dokumentier das Projekt" oder "readme-pro" sagt.

sebaskauf/skaile-community-library · 37 tokens

skill-guide

Design, write, and review SKILL.md files using proven patterns. Use when creating, improving, or reviewing agent skills, choosing a design pattern (Tool Wrapper, Generator, Reviewer, Inversion, Pipeline), structuring progressive disclosure, writing skill descriptions, or composing patterns. Also trigger for 'skill…

AndyElessar/skills · 102 tokens

microsoft-webui

Microsoft WebUI Framework expertise — a language-agnostic server-side rendering framework where templates compile to a binary protocol and interactive Web Components hydrate as islands. Use when authoring, reviewing, or debugging WebUI components (.html + .css + .ts triplets), wiring up routes, hydrating with…

AndyElessar/skills · 212 tokens

plugin-creator

Guide AI agents through creating GitHub Copilot CLI and Claude Code plugins and plugin marketplaces — from scaffolding plugin directories and writing plugin.json manifests to building marketplace.json registries and testing installations. Use this skill whenever the user wants to create, scaffold, configure, package…

AndyElessar/skills · 181 tokens