emit

emit is a command for coding agents from ktoulgaridis/forge. It costs 43 tokens per session (2,096 once invoked), scanned A, original, MIT.

A command that creates a standalone Claude Code or OpenCode plugin from an organisation's configuration file. The generated package is owned by that organisation and is checked so the generator's identity is not included.

In plain words
What is it for?
Use it to package an organisation's agents, skills, hooks, commands, and configuration for Claude Code or OpenCode.
Why use it?
It removes the manual work of turning an internal workflow description into a distributable agent package while preventing unwanted generator references in the result.

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/emit
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 emit

README.md
[![agentmods](https://agentmods.dev/badge/commands/ktoulgaridis/forge/emit.svg)](https://agentmods.dev/commands/ktoulgaridis/forge/emit)
Your own site
<a href="https://agentmods.dev/commands/ktoulgaridis/forge/emit"><img src="https://agentmods.dev/badge/commands/ktoulgaridis/forge/emit.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 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,096 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.00043 $0.02096
Opus 5 $0.00022 $0.01048
Sonnet 5 $0.00009 $0.00419
Haiku 4.5 $0.00004 $0.00210

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

Security

Grade A, and why

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

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/emit.md · 169 lines

How it starts

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

/forge:emit — Emit an org-owned agent harness

The generative entry point of forge v2. /forge:new opens a project; /forge:emit mints the org's package: a standalone Claude Code plugin that aligns the harness to how this org works, owned entirely by the org.

The cardinal rule. The emitted package is org-owned. forge's identity — the name "forge", the maintainer, the upstream repo URL — must never appear in the output. The org installs and distributes its package as its own; forge is the mill, not a runtime dependency. Step 5 below fails the emit if any generator identity leaks through.

Invocation

/forge:emit [--config <path>] [--out <dir>] [--target {claude-code,opencode}]
  • --config — the org-tier config. Defaults to ./.forge.org.yaml (see .forge.org.example.yaml for the shape).
  • --out — where to write the package. Defaults to ../<plugin.name>.
  • --target — the host to package for. Defaults to claude-code (a Claude Code plugin: skills/ + agents/ + hooks/ + .claude-plugin/). opencode emits an opencode configuration (opencode.json + agent/ + command/ + skill/) from the same config and requires the opencode: block. The skill bodies are shared byte-for-byte across targets except at the {{#TARGET_*}} conditionals and the host-noun scalars.

What this command does

Run it

The whole pipeline below is implemented by the shared renderer — the same engine /forge:new uses (lib/render.py), driven for the org tier by lib/emit.py:

uv run --with pyyaml python lib/emit.py \
  --config .forge.org.yaml --out ../<plugin.name>

lib/emit.py performs steps 1–5; step 6 is claude plugin validate. Read on for what each step guarantees (and what to do when one fails).

1. Load + validate the org config

lib/emit.py reads .forge.org.yaml and requires: org.name/org.slug, the full plugin: identity block (name, version, description, author.name, author.url, homepage, license), org_wiki: (incl. prime_reads), tracker:, and agents:. If any identity field is missing or still carries an example value (acme, Acme, janedoe, example), it stops — never emit with placeholder identity.

Read the full file on GitHub · 169 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 · 169 lines · 43 tokens per session scan A c88115cb1729

Subscribe to this mod's changes

emit is a command published in the GitHub repository ktoulgaridis/forge (10 stars, last pushed 6d ago), licensed MIT. It adds 43 tokens to every session and 2,096 once invoked, about $0.0002 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.