build-runwhen-task

build-runwhen-task is a skill for Claude Code, Codex from runwhen-contrib/runwhen-platform-mcp. It costs 115 tokens per session (3,707 once invoked), scanned A, original, Apache-2.0.

A workflow for creating a RunWhen automation task, called an SLX, from start to finish. It covers writing a health check or troubleshooting script, testing it, fixing its output, and committing it.

In plain words
What is it for?
Use it to build monitoring checks, troubleshooting runbooks, incident-response automations, or service health metrics.
Why use it?
It provides the checks and iteration needed to turn an infrastructure script into a task that can run reliably, while first checking whether an existing task already solves the problem.

Skill for Claude CodeCodex

Part of the runwhen-platform plugin — 15 skills, 3 agents, 1 MCP server shipped together

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/runwhen-contrib/runwhen-platform-mcp/build-runwhen-task
Any agent
npx skills add runwhen-contrib/runwhen-platform-mcp --skill build-runwhen-task
Clone the repo
git clone --depth 1 https://github.com/runwhen-contrib/runwhen-platform-mcp

Made for: Claude Code, Codex.

Or install runwhen-platform, the plugin that ships this one along with the rest of its 15 skills, 3 agents, 1 MCP server.

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 build-runwhen-task

README.md
[![agentmods](https://agentmods.dev/badge/skills/runwhen-contrib/runwhen-platform-mcp/build-runwhen-task.svg)](https://agentmods.dev/skills/runwhen-contrib/runwhen-platform-mcp/build-runwhen-task)
Your own site
<a href="https://agentmods.dev/skills/runwhen-contrib/runwhen-platform-mcp/build-runwhen-task"><img src="https://agentmods.dev/badge/skills/runwhen-contrib/runwhen-platform-mcp/build-runwhen-task.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,707 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.00115 $0.03707
Opus 5 $0.00057 $0.01853
Sonnet 5 $0.00023 $0.00741
Haiku 4.5 $0.00012 $0.00371

Measured 4d ago against content hash d381097a5794, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-runwhen-task 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 4d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (references/bash-sli-template.sh, references/bash-task-template.sh, references/python-sli-template.py, …), 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.

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.

skills/build-runwhen-task/SKILL.md · 319 lines

How it starts

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

Build RunWhen Task

End-to-end workflow for creating a RunWhen SLX from scratch.

Before you start — check the registry

Always search the CodeBundle Registry first using the find-and-deploy-codebundle skill. There may already be a production-ready codebundle for the task. Only proceed here if the registry has no suitable match.

When to use

  • Creating a new health check or monitoring task that doesn't exist in the registry
  • Building a troubleshooting runbook for infrastructure
  • Automating incident response with scheduled checks
  • Adding an SLI (health metric) to an existing task

Workflow

  1. Load contextget_workspace_context (ALWAYS first — loads RUNWHEN.md rules)
  2. Discover secretsget_workspace_secrets(workspace_name="my-workspace")
  3. Write script — Use the reference templates below as starting points
  4. Validatevalidate_script checks contract compliance
  5. Testrun_script_and_wait(workspace_name="my-workspace", ...) with env_vars, secret_vars
  6. Iterate — Fix based on output, re-test until issues/severity/next-steps are correct
  7. Commitcommit_slx(workspace_name="my-workspace", ...) with metadata (see reference examples)
    • Or GitOps: render_codecollection_skill via the commit-to-codecollection skill when storing in a private codecollection repo instead of the workspace
  8. Wait — Allow 1-3 minutes for reconciliation before querying the SLX

Location auto-resolves. You do NOT need to call get_workspace_locations or pass a location parameter. The server automatically picks the best runner (workspace locations preferred over public). Only specify location explicitly when the workspace has multiple workspace-type runners and you need to target a specific one. See the discover-locations skill for details.

Reference templates

Read these files for complete, contract-compliant script templates:

Template Path Use for
Bash task references/bash-task-template.sh Bash health checks that report issues
Python task references/python-task-template.py Python health checks that report issues
Bash SLI references/bash-sli-template.sh Bash health metric (returns 0-1)
Python SLI references/python-sli-template.py Python health metric (returns 0-1)
Commit examples references/commit-examples.md commit_slx call patterns for common scenarios

Read the full file on GitHub · 319 lines

Files

What ships with it

5 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 First seen · 319 lines · 115 tokens per session scan A d381097a5794

Subscribe to this mod's changes

build-runwhen-task is a skill published in the GitHub repository runwhen-contrib/runwhen-platform-mcp (1 stars, last pushed 21d ago), licensed Apache-2.0. It adds 115 tokens to every session and 3,707 once invoked, about $0.0006 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

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

specflow-use

To connect Rosetta with Grid Dynamics SpecFlow MCP; only when SpecFlow is mentioned and the MCP is installed.

griddynamics/rosetta · 27 tokens

planning-and-task-breakdown

Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.

shashankswe2020-ux/whoop-mcp · 56 tokens

qa-knowledge

To run QA engineering — requirements/gap analysis, scenario & spec design, test implementation, failure triage — over the QA knowledge base.

griddynamics/rosetta · 32 tokens

ue-mcp-epic-routing

Use when deciding between ue-mcp's native category actions and Epic's wrapped ToolsetRegistry tools (the epic actions, incl. the Blueprint graph DSL) for a task in Unreal. Pulls in when authoring Blueprint graph bodies, or any time both a native action and an epic action could do the job and you need to pick.

db-lyon/ue-mcp · 81 tokens

frontmcp-setup

Use when starting, scaffolding, or organizing a FrontMCP project. Covers creating a new project (CLI scaffold or manual) for Node, Vercel, and other targets; standalone versus Nx-monorepo layout, naming conventions, generators, and dependency rules; composing multiple @App classes, ESM packages, and remote MCP servers…

agentfront/frontmcp · 176 tokens