write-content

Write and improve Ansible YAML content following Red Hat CoP automation good practices.

8|7|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/eclipse-slm/slm --skill write-content-eclipse-slm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-content
Source: https://github.com/eclipse-slm/slm/tree/main/.agents/skills/write-content
Command: npx skills add https://github.com/eclipse-slm/slm --skill write-content-eclipse-slm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing Ansible content that follows community best practices is hard: developers must remember FQCN module names, variable prefixing rules, handler conventions, idempotency requirements, and dozens of style rules. This Skill generates compliant Ansible content from a description or audits existing content against the Red Hat CoP automation good practices, producing scored reviews with actionable fixes. ## Core Features & Use Cases - Write Mode: Generate tasks, handlers, playbooks, Jinja2 templates, variable definitions, inventory structures, and argument specs from a natural-language description, applying all style rules automatically. - Improve Mode: Audit existing Ansible YAML files or directories against a 14-category checklist, receive a 1-10 compliance score, and get the top 3 highest-impact recommendations. - Best-Practice Enforcement: Applies rules like FQCN module names, true/false booleans, role-prefixed variables, loop over deprecated with_*, and modules over shell/raw. - Use Case: Ask it to write a task that installs and configures nginx, and it produces a fully compliant task with explicit state, FQCN module, tags, and handler notification, plus next-step suggestions like running ansible-lint. ## Quick Start Ask the assistant to write an Ansible playbook that configures web servers using the write-content skill, or pass a path to an existing playbook file to have it reviewed and scored.

Frequently Asked Questions about write-content

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an Ansible playbook that follows best practices?▼

Describe the playbook's target hosts, roles, and goals, and the skill generates compliant YAML with named plays, FQCN modules, explicit state, and tags. It keeps logic in roles rather than playbooks and suggests running ansible-lint and --syntax-check afterward.

How to review existing Ansible tasks against Red Hat CoP good practices?▼

Pass a file or directory path to trigger Improve Mode, which evaluates content across 14 categories including YAML style, naming, module usage, and idempotency. You receive a 1-10 score, categorized findings, and the top 3 recommended fixes.

Should I use shell or command modules in Ansible tasks?▼

Prefer purpose-built modules first, then ansible.builtin.command when shell features are not needed. Use shell only with explicit justification, and always set changed_when on command and shell tasks since they report changed on every run.

When should I not use this Ansible content writing skill?▼

Do not use it for Python module development, full role or collection scaffolding, CoP compliance audits across a whole project, or style philosophy reviews. Those cases are handled by the write-module skill, scaffold commands, cop-review command, and ansible-zen respectively.

Why must Ansible role variables be prefixed with the role name?▼

All role variables share one global namespace, so unprefixed names like packages silently overwrite identically named variables from other roles. Prefixing with the role name, such as webserver_packages, prevents collisions and makes variable origins clear.