role_generation

A command-line tool for creating role.yaml files, which define an agent's role and settings. It can start from descriptions, templates, examples, hub bundles, or local files, then let you refine the result interactively.

In plain words
What is it for?
It helps create, import, refine, and save agent roles from a terminal using guided prompts or command-line options.
Why use it?
It avoids having to write these YAML configuration files from scratch and supports an offline form when no AI access is available.

Agent

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 agents/vladkesler/initrunner/role_generation
Clone the repo
git clone --depth 1 https://github.com/vladkesler/initrunner
Per session 0 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,769 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 $0.00000 $0.02769
Opus 5 $0.00000 $0.01385
Sonnet 5 $0.00000 $0.00554
Haiku 4.5 $0.00000 $0.00277

Measured 2d ago against content hash 1b6ca2533da7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

role_generation 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.

docs/agents/role_generation.md · 269 lines

How it starts

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

Role Generation

InitRunner provides a single initrunner new command for creating role.yaml files. It supports multiple seed modes (templates, AI generation, examples, hub bundles, or local files) and an interactive refinement loop for iterating on the YAML before saving. Run with no arguments in a terminal and it shows a guided start menu; a deterministic offline form is available for building a role with no AI/API key at all.

Quick Start

# Generate from a description with interactive refinement
initrunner new "A code review assistant that reads git diffs"

# Start from a template, skip refinement
initrunner new --template rag --no-refine

# Blank template with a specific provider
initrunner new --blank --provider anthropic

# Load from a bundled example
initrunner new --from hello-world

# Guided start menu (describe / template / example / offline / import)
initrunner new

# Build a role with no AI -- a deterministic structured form
initrunner new --offline

CLI Flags

Flag Description
DESCRIPTION Natural language description (generates via LLM)
--from SOURCE Local file path, bundled example name, or hub:ref
--template TEXT Start from a named template
--blank Start from minimal blank template
--offline Build via a deterministic structured form (no AI/LLM call)
--provider TEXT Model provider (auto-detected if omitted)
--model TEXT Model name (uses provider default if omitted)
--output PATH Output file path (default: role.yaml)
--force Overwrite existing file without prompting
--no-refine Skip the interactive refinement loop
--run PROMPT After creating, execute the agent immediately with PROMPT. Bypasses the post-creation confirmation.
--no-run Skip the post-creation Run it now? confirmation.

Seed modes are mutually exclusive: specify at most one of DESCRIPTION, --from, --template, --blank, --offline, --langchain, --pydantic-ai, or --agent-spec. --run and --no-run are also mutually exclusive.

Read the full file on GitHub · 269 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. 2d ago First seen · 269 lines · 0 tokens per session scan A 1b6ca2533da7

Subscribe to this mod's changes

role_generation is an agent published in the GitHub repository vladkesler/initrunner (41 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,769 tokens. 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-08-30.