prime-workflows

prime-workflows is a command for Claude Code from coleam00/Archon. It costs 8 tokens per session (832 once invoked), scanned A, original, MIT.

A project-orientation command for Archon's workflow engine, which runs automated sequences of commands or prompts. It explains workflow definitions, loops, dependency-based graphs, conditions, variables, and execution details.

In plain words
What is it for?
Use it before working on workflow execution, YAML configuration, dependency graphs, routing, conditions, variable substitution, or workflow monitoring.
Why use it?
It gives an agent the context needed to change workflow behavior without missing how different execution modes and dependencies work.

Command for Claude Code

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/coleam00/archon/prime-workflows
Clone the repo
git clone --depth 1 https://github.com/coleam00/Archon

Made for: Claude Code.

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 prime-workflows

README.md
[![agentmods](https://agentmods.dev/badge/commands/coleam00/archon/prime-workflows.svg)](https://agentmods.dev/commands/coleam00/archon/prime-workflows)
Your own site
<a href="https://agentmods.dev/commands/coleam00/archon/prime-workflows"><img src="https://agentmods.dev/badge/commands/coleam00/archon/prime-workflows.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 832 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.00008 $0.00832
Opus 5 $0.00004 $0.00416
Sonnet 5 $0.00002 $0.00166
Haiku 4.5 $0.00001 $0.00083

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

Security

Grade A, and why

prime-workflows 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/prime-workflows.md · 97 lines

How it starts

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

Prime Workflows: Workflow Engine Orientation

Objective

Orient on the workflow engine (packages/workflows/) before working on workflow execution, YAML parsing, DAG logic, routing, or observability.

Process

1. Understand the Workflow Package Structure

!ls packages/workflows/src/

2. Understand Workflow Type Definitions

Read packages/workflows/src/types.ts in full — the complete type system for workflow definitions: WorkflowDefinition, WorkflowStep, WorkflowNode (DAG), LoopConfig, NodeType (command / prompt / bash), TriggerRule, OutputFormat, tool restriction fields.

3. Understand the Executor

Read packages/workflows/src/executor.ts first 80 lines — executeWorkflow() entry point, the three mutually exclusive execution modes (steps, loop, nodes/DAG), artifact directory setup, variable substitution via $ARTIFACTS_DIR / $WORKFLOW_ID.

Read packages/workflows/src/dag-executor.ts first 80 lines — topological sort, concurrent node dispatch for independent nodes in the same layer, when: condition evaluation, trigger_rule join semantics, $nodeId.output substitution.

4. Understand the Loader

Read packages/workflows/src/loader.ts first 60 lines — discoverWorkflows() / discoverWorkflowsWithConfig(), resilient loading (one bad YAML doesn't abort), model validation at load time, bundled defaults merging with repo-specific workflows.

5. Understand the Router

Read packages/workflows/src/router.ts first 60 lines — how incoming messages are matched to workflows, case-insensitive matching, archon-assist fallback, Codex tool bypass detection.

6. Understand Observability

Read packages/workflows/src/event-emitter.tsWorkflowEventEmitter, emitted event types (step_started, step_completed, node events, loop iterations, artifacts), how the server bridges these to SSE via WorkflowEventBridge.

7. Understand Dependency Injection

Read packages/workflows/src/deps.tsWorkflowDeps type: IWorkflowPlatform, IWorkflowAgentProvider, IWorkflowStore injected at runtime. No direct DB or AI imports inside this package.

Read the full file on GitHub · 97 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 · 97 lines · 8 tokens per session scan A 794ce2b7b6e5

Subscribe to this mod's changes

prime-workflows is a command published in the GitHub repository coleam00/Archon (23,366 stars, last pushed yesterday), licensed MIT. It adds 8 tokens to every session and 832 once invoked, about $0.0000 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-30.