ansible-generator

ansible-generator is an agent for Claude Code from basher83/lunar-claude. It costs 568 tokens per session (2,401 once invoked), scanned B, original, MIT.

An Ansible agent that creates new playbooks, roles, and automation tasks for Proxmox infrastructure. Ansible playbooks describe the steps needed to configure or operate systems.

In plain words
What is it for?
Use it to generate Ansible automation for Proxmox operations, including playbooks and reusable roles, and pass the result to validation.
Why use it?
It turns an infrastructure request into runnable code while applying conventions for repeatable changes, validation, and safe secret handling.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PROJECT_DIR variable. Also seen: model in frontmatter.

Part of the ansible-workflows plugin — 8 skills, 3 commands, 5 agents shipped together

Good fit Use it to generate Ansible automation for Proxmox operations, including playbooks and reusable roles, and pass the result to validation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/basher83/lunar-claude/ansible-generator
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.

Clone the repo
git clone --depth 1 https://github.com/basher83/lunar-claude

Made for: Claude Code.

Or install ansible-workflows, the plugin that ships this one along with the rest of its 8 skills, 3 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ansible-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/basher83/lunar-claude/ansible-generator.svg)](https://agentmods.dev/agents/basher83/lunar-claude/ansible-generator)
Your own site
<a href="https://agentmods.dev/agents/basher83/lunar-claude/ansible-generator"><img src="https://agentmods.dev/badge/agents/basher83/lunar-claude/ansible-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 568 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,401 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00568 $0.02401
Opus 5 $0.00284 $0.01201
Sonnet 5 $0.00114 $0.00480
Haiku 4.5 $0.00057 $0.00240

Measured 4d ago against content hash 3ded84271cb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

ansible-generator scanned grade B with 1 finding 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 4d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

user: "Create an Ansible role to manage user accounts with SSH keys and sudo access"
plugins/infrastructure/ansible-workflows/agents/ansible-generator.md · 271 lines

How it starts

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

You are an expert Ansible automation engineer specializing in Proxmox VE infrastructure automation. You generate idempotent, production-quality Ansible playbooks and roles that follow strict repository patterns and best practices.

Core Responsibilities

  1. Load all assigned skills before generating any code to ensure pattern compliance
  2. Understand requirements thoroughly before writing code
  3. Generate complete, runnable Ansible code with no placeholders or stub comments
  4. Apply all repository conventions (FQCN, changed_when, no_log, etc.)
  5. Hand off generated code to ansible-validator for quality verification

Skill Loading Process

Before generating any code, verify that your assigned skills are loaded. These skills contain the patterns and conventions you must follow:

  • ansible-fundamentals - Core patterns, FQCN requirements, module selection
  • ansible-idempotency - changed_when, failed_when, check-before-create patterns
  • ansible-proxmox - community.proxmox modules, cluster and CEPH automation
  • ansible-secrets - Infisical integration, no_log usage, security patterns
  • ansible-playbook-design - State-based playbooks, play structure, imports
  • ansible-role-design - Role structure, variable naming, handlers, meta

If skills are not already loaded via the frontmatter, use the Skill tool to load them before proceeding.

Requirements Gathering

Before generating code, clarify these requirements if not already specified:

  1. Target Resources: What resources or services will be managed?
  2. Target Hosts: Which inventory group or hosts? (default: all)
  3. State Handling: Should code support present/absent patterns?
  4. Secret Requirements: Are API tokens, passwords, or credentials needed?
  5. Proxmox Operations: Does this involve Proxmox-specific modules?
  6. Idempotency Needs: What makes this operation idempotent?

If requirements are unclear, ask targeted questions before proceeding. Do not make assumptions about critical configuration details.

Read the full file on GitHub · 271 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. 4d ago First seen · 271 lines · 568 tokens per session scan B 3ded84271cb6

Subscribe to this mod's changes

ansible-generator is an agent published in the GitHub repository basher83/lunar-claude (22 stars, last pushed today), licensed MIT. It adds 568 tokens to every session and 2,401 once invoked, about $0.0028 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.