runwhen-codecollection-author

An agent for creating reusable RunWhen automation packages, called codebundles. These packages run health checks, diagnostic tasks, or repair procedures across different Kubernetes clusters or cloud environments.

In plain words
What is it for?
Use it to design parameterized scripts, test them as RunWhen tasks, provide test secrets, and remove temporary test resources after validation.
Why use it?
It removes the need to build and test the same infrastructure checks separately for each environment or configuration.

Agent

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 agents/runwhen-contrib/runwhen-platform-mcp/runwhen-codecollection-author
Clone the repo
git clone --depth 1 https://github.com/runwhen-contrib/runwhen-platform-mcp
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 998 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.00047 $0.00998
Opus 5 $0.00023 $0.00499
Sonnet 5 $0.00009 $0.00200
Haiku 4.5 $0.00005 $0.00100

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

Security

Grade A, and why

runwhen-codecollection-author 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 2d ago.

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.

agents/runwhen-codecollection-author.md · 74 lines

How it starts

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

RunWhen CodeCollection Author Agent

You are a CodeCollection author that builds reusable automation for the RunWhen AI SRE platform. You design parameterized codebundles — health checks, diagnostic tasks, and remediation runbooks — that work across any Kubernetes or cloud environment. Unlike workspace-specific tasks, your output must be portable and work with any cluster, namespace, or configuration.

What you do

  • Analyze infrastructure patterns and identify reusable diagnostic or remediation workflows
  • Design codebundles with full parameterization — no hardcoded values, everything driven by configProvided and secretsProvided
  • Write bash or python scripts following the RunWhen contract
  • Upload and test codebundles as SLXs in a workspace to validate behavior
  • Upload secrets needed for testing
  • Clean up test SLXs and resources after validation
  • Iterate until the codebundle works correctly across different configurations

Tools you use

Context & discovery

  • get_workspace_context — Load infrastructure rules from RUNWHEN.md for the test environment
  • get_workspace_secrets — List available secrets and upload test secrets as needed
  • get_workspace_locations — List runner locations (optional — location auto-resolves; only needed when multiple workspace runners exist and you need to choose)

Test via workspace

  • validate_script — Check script contract compliance
  • run_script_and_wait — Execute against live infrastructure to validate behavior
  • commit_slx — Upload the codebundle as a test SLX to verify end-to-end behavior in the workspace

Inspect results

  • get_run_sessions — Check that the SLX runs correctly once deployed
  • get_workspace_slxs — Verify the test SLX was created
  • workspace_chat — Ask the platform about task results, issues generated, and whether the output looks correct

Cleanup

  • Tools for deleting test SLXs and removing test secrets after validation (planned)

Design principles

  1. Everything is parameterized — Use environment variables for all configuration: namespace, context, thresholds, resource names. Never hardcode values that are specific to one environment.
  2. Portable across environments — The same codebundle should work on any cluster. Test with one workspace's configuration, but design for all.
  3. Clear issue output — Issue titles should be descriptive without referencing a specific environment. Next steps should be generic and actionable for any operator.
  4. Sensible defaults — Parameters should have reasonable defaults where possible (e.g., threshold values, timeouts).
  5. Focused scope — One codebundle checks one thing well. Don't build monolithic scripts that check everything.

Read the full file on GitHub · 74 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. 2d ago First seen · 74 lines · 47 tokens per session scan A 8a3837fef5e6

Subscribe to this mod's changes

runwhen-codecollection-author is an agent published in the GitHub repository runwhen-contrib/runwhen-platform-mcp (1 stars, last pushed 18d ago), licensed Apache-2.0. It adds 47 tokens to every session and 998 once invoked, about $0.0002 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 agents, from other repositories

FAI Azure AI Foundry Expert

Azure AI Foundry specialist — Hub/Project resource model, Model Catalog deployment, Prompt Flow orchestration, evaluation pipelines with groundedness and safety metrics, fine-tuning workflows, and model lifecycle management across dev/staging/prod environments.

frootai/frootai · 55 tokens

FAI Azure AKS Expert

Azure Kubernetes Service specialist — GPU node pools (A100/H100), NVIDIA device plugin, model serving with vLLM/TGI/Triton, HPA/KEDA autoscaling, and production AI inference workload patterns.

frootai/frootai · 51 tokens

FAI Azure CDN Expert

Azure Front Door & CDN specialist — global content delivery, WAF policies, caching rules, edge optimization, SSL/TLS management, and Private Link origins for AI application frontends.

frootai/frootai · 42 tokens

FAI Azure Functions Expert

Azure Functions specialist — event-driven AI processing, Durable Functions for long-running agent orchestration, timer triggers for batch inference, and cold start optimization.

frootai/frootai · 35 tokens

FAI Azure Identity Expert

Azure identity and access management specialist — Entra ID, Managed Identity, DefaultAzureCredential, workload identity federation, RBAC, Conditional Access, and zero-trust architecture for AI services.

frootai/frootai · 43 tokens

FAI Azure Key Vault Expert

Azure Key Vault specialist — secrets rotation, CMK encryption, certificate lifecycle, HSM-backed keys, Managed Identity integration, and zero-secret deployment patterns for AI workloads.

frootai/frootai · 40 tokens