create-role

create-role is a command for Claude Code from basher83/lunar-claude. It costs 11 tokens per session (663 once invoked), scanned A, original, MIT.

A command that creates the standard files and folders for a new Ansible role, including defaults, tasks, handlers, metadata, and documentation.

In plain words
What is it for?
Use it when starting an Ansible role for configuring or managing a system service.
Why use it?
It avoids manually setting up the role layout and helps keep role variables and files organized consistently.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

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

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.

agentmods
npx agentmods add commands/basher83/lunar-claude/create-role
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 create-role

README.md
[![agentmods](https://agentmods.dev/badge/commands/basher83/lunar-claude/create-role.svg)](https://agentmods.dev/commands/basher83/lunar-claude/create-role)
Your own site
<a href="https://agentmods.dev/commands/basher83/lunar-claude/create-role"><img src="https://agentmods.dev/badge/commands/basher83/lunar-claude/create-role.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00011 $0.00663
Opus 5 $0.00005 $0.00331
Sonnet 5 $0.00002 $0.00133
Haiku 4.5 $0.00001 $0.00066

Measured 2d ago against content hash e0f42e541762, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

create-role scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/infrastructure/ansible-workflows/commands/create-role.md · 102 lines

What it actually says

Create an Ansible role named $ARGUMENTS following production patterns.

Load the ansible-role-design and ansible-fundamentals skills first.

If no role name provided, ask for one.

Role location: ansible/roles/$ARGUMENTS/

Create this structure:

ansible/roles/$ARGUMENTS/
├── defaults/main.yml
├── tasks/main.yml
├── handlers/main.yml
├── meta/main.yml
└── README.md

Variable prefix: Convert role name to snake_case (e.g., docker-hostdocker_host_*)

defaults/main.yml: Role-prefixed variables with defaults tasks/main.yml: Main task router with validation handlers/main.yml: Service restart handlers (if applicable) meta/main.yml: Galaxy metadata with platform support README.md: Usage documentation

After scaffolding, initialize the pipeline:

  1. Create the .claude/ directory if it doesn't exist:

    mkdir -p "$CLAUDE_PROJECT_DIR/.claude"
    
  2. Ensure .gitignore contains ansible-workflows patterns (append if missing):

# Ansible Workflows plugin state (auto-added)
.claude/ansible-workflows.local.md
.claude/ansible-workflows.*.bundle.md
  1. Write state file $CLAUDE_PROJECT_DIR/.claude/ansible-workflows.local.md:
---
active: true
pipeline_phase: generating
target_path: ansible/roles/$ARGUMENTS/
current_agent: ansible-generator
started_at: "[ISO timestamp]"
validation_attempts: 0
last_validation_passed: true
---

# Ansible Workflows Pipeline

Target: ansible/roles/$ARGUMENTS/
Type: role
  1. Write scaffolding bundle $CLAUDE_PROJECT_DIR/.claude/ansible-workflows.scaffolding.bundle.md:
---
source_agent: create-role
target_agent: ansible-generator
timestamp: "[ISO timestamp]"
target_path: ansible/roles/$ARGUMENTS/
target_type: role
---

# Scaffolding Bundle

## Target Path
ansible/roles/$ARGUMENTS/

## User Requirements
[Capture any user-specified requirements or context]

## Files Created
- ansible/roles/$ARGUMENTS/defaults/main.yml
- ansible/roles/$ARGUMENTS/tasks/main.yml
- ansible/roles/$ARGUMENTS/handlers/main.yml
- ansible/roles/$ARGUMENTS/meta/main.yml
- ansible/roles/$ARGUMENTS/README.md

## Variable Prefix
[snake_case version of role name]

## Next Steps
Implement the role tasks based on user requirements.
  1. Hand off to ansible-generator agent with the role path

Report: role path, files created, variable prefix, pipeline initialized.

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. 2d ago First seen · 102 lines · 11 tokens per session scan A e0f42e541762

Subscribe to this mod's changes

create-role is a command published in the GitHub repository basher83/lunar-claude (22 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 663 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.