render_codecollection_skill
Renders a tested tool-builder task as a private Custom Discovery CodeCollection, outputting files locally for GitOps workflows. Includes decoded script summaries for review.
Instructions
Render a tested tool-builder task as a private Custom Discovery CodeCollection.
Skills:
runwhen-skill://commit-to-codecollection (GitOps workflow)
runwhen-skill://build-runwhen-task (authoring + testing first)
Emits the standard codecollection layout (generation rule + Jinja templates) for
workspace-builder discovery. Templates delegate runtime to
rw-generic-codecollection/codebundles/tool-builder with base64 GEN_CMD.
Also writes .runwhen/SKILL_TEMPLATE.md with the decoded script summary
and .runwhen/raw_script.{py,sh} with the full decoded script so PR reviewers
and automated systems never need to base64-decode TaskSet templates.
This tool does not push to git or mutate the workspace — it renders files locally
(or returns them inline) for you to git add / commit / push.
Default generation rule uses platform: runwhen and resourceTypes: [workspace].
Requires a runwhen-local release with the runwhen platform indexer (RW-1355).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | 'logs-bulk', 'config', or 'logs-stacktrace'. | logs-bulk |
| tags | No | Resource tags ({name, value} dicts). | |
| alias | Yes | Human-readable SLX display name. | |
| access | No | 'read-write' or 'read-only'. | read-write |
| owners | No | Owner emails for the review file (defaults to current user). | |
| script | No | The full script source code (not base64). | |
| env_vars | No | Environment variables baked into the TaskSet config. | |
| platform | No | Generation rule platform. Use 'runwhen' for workspace-scoped tool-builder. | runwhen |
| base_name | No | Short SLX suffix in generation rule (<15 chars). Default: bundle_name. | |
| hierarchy | No | Tag names for hierarchical grouping. | |
| image_url | No | Icon URL for the SLX. | |
| statement | Yes | SLX statement describing what should be true. | |
| output_dir | No | Write rendered files to this directory (stdio mode). When omitted, files are returned in the tool response only. | |
| sli_script | No | Optional separate SLI script (defaults to main script if include_sli). | |
| task_title | No | Human-readable task title (static literal). | |
| bundle_name | Yes | Codebundle directory name (kebab-case, e.g. 'azure-function-cold-start'). | |
| include_sli | No | Also emit an SLI template (tool-builder SLI). | |
| interpreter | No | 'python' or 'bash'. | python |
| match_rules | No | Match predicates forwarded into the generation rule YAML. | |
| script_path | No | Local file path for script. **stdio mode only.** | |
| secret_vars | No | Secret name → workspace secret key mappings. | |
| runtime_vars | No | Per-run runtime variables (task-only). | |
| resource_path | No | Resource path for search indexing. | |
| script_base64 | No | UTF-8 script as standard base64. | |
| resource_types | No | Resource types for the generation rule (default: ['workspace']). | |
| slx_qualifiers | No | SLX name qualifiers (default: ['workspace']). | |
| workspace_name | Yes | Workspace used during tool-builder testing (provenance in review file). | |
| sli_interpreter | No | Interpreter for SLI script. | |
| source_slx_name | No | Original inline SLX short name (provenance in review file). | |
| timeout_seconds | No | Task timeout passed to tool-builder runbook. | |
| script_base64_path | No | Local path to base64-encoded script file. **stdio mode only.** | |
| script_gzip_base64 | No | UTF-8 script as base64(gzip(...)). | |
| generic_runtime_ref | No | Git ref for rw-generic-codecollection pinned in templates. | main |
| sli_interval_seconds | No | SLI interval when include_sli is true. | |
| generic_runtime_repo_url | No | Override rw-generic-codecollection repo URL in templates. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |