agentsclimarketplace

Rundeck job builder

Skill justynroberts/claude-rba-skill/skills/rundeck-job-builder

Author production-ready Rundeck / PagerDuty Runbook Automation job definitions as importable YAML. Use when the user asks to build, generate, fix, or review a Rundeck job, runbook, or automation workflow — including jobs that use Kubernetes, Ansible, SQL Runner, HTTP, conditional logic, or PagerDuty Process Automation (SaaS) runners. Triggers on terms like "Rundeck", "runbook", "PagerDuty Process Automation", "PDPA", "Process Automation job", or YAML files that look like Rundeck exports.From its SKILL.md

Install
npx -y skills add justynroberts/claude-rba-skill --skill rundeck-job-builder

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

9.8 KB, as published. Nobody here has run it

Rundeck Job Builder

You produce production-ready Rundeck job definitions as importable YAML. Every job must be realistic, multi-step, and import into Rundeck without modification.

Operating procedure

  1. Clarify the deployment mode before writing YAML:
    • Self-hosted — Rundeck server reaches nodes directly. No runnerSelector.
    • SaaS / Process Automation — needs a runnerSelector block. Ask which runner tag(s) to target — there is no default tag; do not assume one. If the user hasn't provided a tag, ask for it.
  2. Look in jobs/ (or the user's existing job catalogue) for a similar example. Match its structure and style.
  3. Draft the job following the rules below. Plugin steps first; script: only when no plugin fits.
  4. Run the pre-delivery checklist (reference/checklist.md) before delivering.
  5. Validate the YAML parses: python3 -c "import yaml, sys; yaml.safe_load(open(sys.argv[1]))" <file.yaml>

The five critical rules

These trip people up most often. Get them wrong and the job imports but breaks silently.

Rule 1 — Variable syntax: @ inside scripts, ${} everywhere else

The single biggest source of silent failures.

ContextScript step (script:)Anywhere else
Job option@option.env@${option.env}
Captured data (LogFilter)@data.version@${data.version}
Job name / project / execid@job.name@${job.name}
Exported var (for notifications)@export.name@${export.name}

"Anywhere else" = exec:, plugin configuration: fields, node filters, conditional key: fields, K8s objectYaml, HTTP remoteUrl, notifications, jobref args.

🔴 Never use @option.x@ outside a script: block — Rundeck will pass the literal text @option.x@. 🔴 Never use RD_OPTION_*, RD_DATA_*, RD_JOB_*, or any RD_* env var — these are unreliable across step types. 🔴 ${data.x} is invisible inside notification blocks. To use a captured value in a notification, uplift it with an export-var step and reference ${export.x}. See reference/data-and-variables.md.

Rule 2 — Prefer plugin steps over scripts

If a plugin exists for the action (K8s, SQL Runner, Ansible, HTTP, Sleep, Job Reference), use it. script: is the fallback for custom logic. exec: is for single trivial commands only — never put if/for/pipes in exec:.

See reference/step-types.md for every plugin's exact YAML.

Rule 3 — Set nodeStep: correctly on every step

  • nodeStep: true → runs once per node in the filter. Use for: K8s steps, SQL Runner, HTTP, script/exec, conditional logic.
  • nodeStep: false → runs once from the server/runner. Use for: sleep, Ansible (it manages its own inventory), workflow orchestration.

Rule 4 — Validated enum fields must be LITERALS

These fields are validated by Rundeck at import time. They do NOT accept ${option.x} substitution:

outputFormat, objectType, imagePullPolicy, duration (sleep)

${option.x} works fine in free-text fields: namespace, objectName, objectYaml, script, remoteUrl, body, headers, etc.

Rule 5 — Conditional steps force strategy: sequential (or parallel)

If any step is type: conditional:

  • strategy: node-first is incompatible — the job will fail validation.
  • Use the canonical format: type: conditional, key: (not field), subSteps: (not steps), symbol operators ==/!= (not equals), condition groups as list of lists.

Full conditional spec in reference/conditionals.md.

Required top-level structure

Every job is a single-item YAML list. No id: or uuid: — auto-generated on import.

- defaultTab: nodes
  description: |-
    **One-line summary.**

    ## What it does
    ## Requirements
    ## Options
    ## Notes
  executionEnabled: true
  group: Category/Subcategory
  loglevel: INFO
  name: 'Human-readable Job Name'
  nodeFilterEditable: false
  options: []
  scheduleEnabled: true
  sequence:
    keepgoing: false
    strategy: sequential        # or node-first if NO conditional steps
    commands: []
  tags: deployment,kubernetes   # lowercase, comma-separated

Full structure rules: reference/structure.md.

Multi-step design

Jobs MUST be multi-step. Break into phases with section-comment banners between them:

    # ==========================================================
    # Step 1: Pre-flight checks
    # ==========================================================
    - description: 'Verify connectivity'
      ...

Phase pattern: Pre-check → Execute → Verify → Report. Every step has a description:.

Scale the pre-check to risk — don't pad it. A real pre-flight (reachability, permissions, target exists) belongs before any state-changing/irreversible action so the job fails clean. Read-only or low-risk jobs need little or none. Never add boilerplate checks like "is curl/systemctl installed" or "is this Linux" — they rarely fail and the next step would surface the error anyway. Verify the non-obvious prerequisites, not the obvious. See reference/structure.md.

Bash and Python scripts

Bash:

- description: 'Deploy app'
  script: |-
    #!/bin/bash
    set -euo pipefail
    echo "Deploying to @option.environment@"
  scriptInterpreter: bash
  interpreterArgsQuoted: false

Python: insert a bash dependency-check step before the first Python step. See reference/structure.md § Python.

PowerShell (Windows runners): scriptInterpreter: powershell.exe plus fileExtension: .ps1 (required). See reference/step-types.md.

Error handlers, notifications, ROI

  • Error handlers — attach an errorhandler: (with keepgoingOnSuccess: set intentionally) to risky steps: external calls, file ops, privileged commands. See reference/step-types.md.
  • Notifications — only add a notifications: block when the user explicitly asks. Captured ${data.x} is invisible there; uplift via export-var → ${export.x}. See reference/structure.md and reference/data-and-variables.md.
  • ROI metrics — optional top-level plugins.ExecutionLifecycle.roi-metrics for value tracking. See reference/structure.md.

Passing data between steps

Steps run in isolated shells — nothing carries over. Use LogFilter to capture values; reference them as @data.name@ (in scripts) or ${data.name} (everywhere else).

Three filter types: key-value-data, key-value-data-multilines, json-mapper. Details: reference/data-and-variables.md.

Secrets

Never hardcode credentials. Use Rundeck Key Storage via secure options:

- name: api_token
  label: 'API Token'
  description: |-
    API auth token. Loaded automatically from Key Storage — operator does not enter manually.
  secure: true
  valueExposed: false
  storagePath: 'keys/integrations/api-token'

Access inside scripts as @option.api_token@ — masked in execution log.

Reference files (load on demand)

FileWhen to load
reference/structure.mdTop-level fields, options, tags, groups, naming, Python deps
reference/step-types.mdFull YAML for every plugin step (K8s, SQL, HTTP, Ansible, etc.)
reference/pagerduty-steps.mdPagerDuty step family (notes, incident updates, response plays, escalation, events, lookups) + incident-output-capture LogFilter
reference/cloud-steps.mdCloud VM/infra steps — AWS (EC2, RDS, ECS, Lambda, S3, CloudWatch), GCP, Azure, Oracle, VMware
reference/kubernetes-ansible-extra.mdAdditional K8s steps (Execute, Ephemeral-Container, Describe/Delete-Pod, Pods-Logs, Create-Job) + Ansible playbook variants
reference/itsm-steps.mdITSM steps — ServiceNow (incident/change) and Jira (issue CRUD)
reference/utility-steps.mdUtility/flow — flow-control, progress-badge, log-data, waits (nixy-), iterate-, filetransfer, docker, github-script
reference/integrations-misc-steps.mdObservability & misc — Sumo Logic, Datadog, RSS, search-executions, wait-for-job, WinRMCheck
reference/data-and-variables.mdVariable syntax tables, LogFilter, json-mapper
reference/conditionals.mdConditional logic format, operators, constraints
reference/deployment.mdSelf-hosted vs SaaS / runnerSelector
reference/checklist.mdPre-delivery gate — run before handing the YAML back

Output expectations

  • One job per .yaml file, named in kebab-case (e.g., deploy-to-staging.yaml).
  • The YAML you deliver must pass yaml.safe_load() cleanly.
  • Walk through reference/checklist.md before finalising.
  • Surface assumptions you made (especially about deployment mode, runner tags, and Key Storage paths) so the user can correct them.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.