Skill: ymr
Use ymr to render YAML templates by applying substitutions encoded as YAML comment directives.
Free to install — no account needed
Copy the command below and paste into your agent.
Instant access • No coding needed • No account needed
What you get in 5 minutes
- Full skill code ready to install
- Works with 4 AI agents
- Lifetime updates included
Run this helper
Answer a few questions and let this helper do the work.
▸Advanced: use with your AI agent
Description
# Skill: ymr Use `ymr` to render YAML templates by applying substitutions encoded as YAML comment directives. This file is written for automated agents (code assistants) so they can use `ymr` predictably and safely. ## What ymr Does - Input: YAML template(s) with directives in comments plus a parameter source. - Output: rendered YAML content written to stdout (`-o -`) or to files (`-o <dir>`). Templates can be single-document or multi-document YAML (documents separated by `---`). Directives: - `# from-param: <go-template>`: replace the node value with the rendered result. - `# from-param-merge: <go-template>`: merge lists/maps into the existing node. Template language: Go `text/template` with helpers `lower`, `upper`, `replace`. ## Invocation Modes ### Spec Mode (recommended when you have multiple templates/targets) Provide `--spec` (`-s`) pointing at a directory containing `spec.yaml` or a `spec.yaml` file itself. Examples: ```bash # spec.yaml in current directory ymr run -s . -o rendered # spec.yaml file path ymr run -s ./spec.yaml -o - # spec.yaml in an example directory ymr run -s example/k8s -t dev -o - ``` ### Spec-less Mode (default) If you omit `--spec`, `ymr` runs in spec-less mode. Requirements: - `--template` (`-T`) is required - at least one `--param` (`-p`) is required - at least one of `--param` (`-p`), `--param-file`, or `--param-yaml` is required Examples: ```bash # Print rendered content to stdout ymr run -T ./example/k8s/deployment.yaml -p name=myapp -o - # Load a YAML params mapping from a file ymr run -T ./example/k8s/deployment.yaml -t dev --param-file ./params.yaml -o - # Inline YAML/JSON mapping ymr run -T ./example/k8s/deployment.yaml -t dev --param-yaml 'labels: { env: dev }' -o - # Write to files; pass a target label for stable filenames ymr run -T ./example/k8s/deployment.yaml -t dev -p name=myapp -o rendered ``` ## Inputs / Outputs for Agent Workflows **Preferred for agents**: Use stdout first (`-o -`), inspect/validate, then (only if needed) write to files. When writing to files: - In spec mode, filenames are `${targetId}-${templateBaseName}${ext}`. - In spec-less mode, pass at least one `--target` or you will get an empty target id in filenames (e.g. `-deployment.yaml`). ## Parameter Rules - Spec mode parameters come from `spec.yaml` (`parameters[].values`) merged by `targetId`. - `--param key=value` overrides parameters for the current run. - `--param-file <path|url>` merges in a YAML/JSON mapping (can be repeated). - `--param-yaml <yaml>` merges in an inline YAML/JSON mapping (can be repeated). - Type inference for CLI params: ints and bools are parsed; otherwise values are strings. ## Validation Rules - Validations are CEL expressions. - Only validations that explicitly list the current `targetId` apply. - `--validation <path>` overrides validations defined in `spec.yaml`. ## Source Rules (Local / HTTP / GitHub) - Templates and spec can be loaded from local paths or HTTP(S) URLs. - GitHub sources can require auth: use `--token` or `GITHUB_TOKEN`. Agent safety: - Never print or persist tokens in logs, rendered output, or commit messages. ## Troubleshooting Checklist - YAML parse errors: verify the template is valid YAML before directives. - Missing keys: `ymr` falls back to the original YAML value when template evaluation fails. - Validation failures: the error message comes from the rule's `message` when set. - For more signal: re-run with `--debug`. ## Minimal Prompt Template (for tool-using agents) When invoking `ymr` from an agent, supply: - mode: spec or spec-less - source paths (spec directory/file or template path) - targets to render - params to override - output destination (`-o -` vs `-o <dir>`) Example agent intent: "Render `example/k8s` for targets `dev` and `prd` to stdout; override `name=myapp`; ensure validations pass."
Security Status
Unvetted
Not yet security scanned
Related AI Tools
More Career Boost tools you might like
ru-text — Russian Text Quality
FreeApplies professional Russian typography, grammar, and style rules to improve text quality across content types
/forge:工作流总入口
Free'Forge 工作流总入口。检查项目状态,推荐下一步该用哪个 skill。任何时候不知道下一步该干什么,就用 /forge。触发方式:用户说"forge"、"下一步"、"接下来做什么"、"继续"(在没有明确上下文时)。'
TypeScript React & Next.js Production Patterns
FreeProduction-grade TypeScript reference for React & Next.js covering type safety, component patterns, API validation, state management, and debugging
Charles Proxy Session Extractor
FreeExtracts HTTP/HTTPS request and response data from Charles Proxy session files (.chlsj format), including URLs, methods, status codes, headers, request bodies, and response bodies. Use when analyzing captured network traffic from Charles Proxy debug
Java Backend Interview Simulator
FreeSimulates realistic Java backend technical interviews with customizable interviewer styles and candidate levels for Chinese tech companies
AI News & Trends Intelligence
FreeFetches latest AI/ML news, trending open-source projects, and social media discussions from 75+ curated sources for comprehensive AI briefings