add-role

add-role is a command for coding agents from ktoulgaridis/forge. It costs 13 tokens per session (406 once invoked), scanned A, original, MIT.

A command for adding a custom agent role to an existing Forge project. An agent role is a defined job with its own responsibilities, limits, inputs, and output format.

In plain words
What is it for?
Use it to add roles such as release manager, security reviewer, compliance officer, technical writer, or data analyst, then fill in the generated template.
Why use it?
It provides the required project files and updates the project indexes and settings automatically.

Command

Part of the forge plugin — 7 commands 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/ktoulgaridis/forge/add-role
Clone the repo
git clone --depth 1 https://github.com/ktoulgaridis/forge

Or install forge, the plugin that ships this one along with the rest of its 7 commands.

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 add-role

README.md
[![agentmods](https://agentmods.dev/badge/commands/ktoulgaridis/forge/add-role.svg)](https://agentmods.dev/commands/ktoulgaridis/forge/add-role)
Your own site
<a href="https://agentmods.dev/commands/ktoulgaridis/forge/add-role"><img src="https://agentmods.dev/badge/commands/ktoulgaridis/forge/add-role.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 406 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.00013 $0.00406
Opus 5 $0.00006 $0.00203
Sonnet 5 $0.00003 $0.00081
Haiku 4.5 $0.00001 $0.00041

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

Security

Grade A, and why

add-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 5d 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.

commands/add-role.md · 40 lines

What it actually says

/forge:add-role — Add a custom role

Stamp a new role file from the template. Useful for org-specific roles like release-manager, compliance-officer, security-reviewer, tech-writer, data-analyst.

Invocation

/forge:add-role <name>

Run from inside the project's wiki dir.

What this command does

  1. Read .forge.config.yaml — fail if not a forge project
  2. Check that roles/<name>.md doesn't already exist
  3. Copy templates/wiki/roles/_custom.md.templateroles/<name>.md
  4. Substitute placeholders: {{ROLE_NAME}}, {{PROJECT_NAME}}
  5. Open the file for editing — the user fills in mission, owns, boundaries, inputs, output format, tools, handoff
  6. Update roles/README.md to add the new role to the index
  7. Update .claude/skills/prime/SKILL.md to recognize the new role name in arg parsing
  8. Update .forge.config.yaml — append to roles[]
  9. Open a wiki MR with the changes (don't push directly)

Conventions

  • Role names are kebab-case (release-manager, not releaseManager)
  • One file per role under roles/<name>.md
  • The template forces the user to think about boundaries — what this role does NOT do is as important as what it does

When NOT to use this

  • For agent variants of existing roles (e.g., "implementer-frontend" vs "implementer-backend") — those are tag/label conventions, not separate roles
  • For one-off ad-hoc tasks — those are tickets, not roles
  • For external collaborators (humans only) — roles are for agent calibration; humans don't need a role file
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. 5d ago First seen · 40 lines · 13 tokens per session scan A 9c89802f4c75

Subscribe to this mod's changes

add-role is a command published in the GitHub repository ktoulgaridis/forge (10 stars, last pushed 7d ago), licensed MIT. It adds 13 tokens to every session and 406 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-08-31.