agents

A command for creating or improving a Markdown file that defines a user-created OpenCoWork agent. The file contains settings and instructions describing the agent's role.

In plain words
What is it for?
Use it to create or update one specialized agent, such as a security reviewer, with its purpose, responsibilities, limits, and behavior.
Why use it?
It turns a requested role into a correctly named agent definition in the expected folder, while asking questions when the request is unclear.

Command

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/aidotnet/opencowork/agents
Clone the repo
git clone --depth 1 https://github.com/AIDotNet/OpenCowork
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 700 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.00700
Opus 5 $0.00000 $0.00350
Sonnet 5 $0.00000 $0.00140
Haiku 4.5 $0.00000 $0.00070

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

Security

Grade A, and why

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

resources/commands/agents.md · 89 lines

What it actually says

Create or improve one user-defined agent definition for OpenCoWork under the current user's agent directory.

Target location

  • The file must live under the current user's home directory at ~/.open-cowork/agents.
  • Resolve that to the real home path on the current machine before writing. On Windows, that typically means a path like C:\Users\<user>\.open-cowork\agents\<name>.md.
  • Create or update exactly one .md file.
  • The filename must be kebab-case and should match the agent name field, for example security-auditor.md.

Primary goal

Create an agent definition that matches the existing OpenCoWork sub-agent style: Markdown with YAML frontmatter followed by a clear system prompt body.

Use English by default for the generated agent file.

Execution requirements

  • First gather enough information before writing the file.
  • Treat any user text that follows the command as the requested agent purpose, responsibilities, constraints, or special behavior.
  • If the requested role is underspecified or ambiguous, ask targeted follow-up questions before creating or updating the file.
  • Infer a kebab-case agent name from the requested purpose unless the user provides one explicitly.
  • Check whether ~/.open-cowork/agents/<name>.md already exists.
  • If it exists, improve the existing file carefully instead of blindly replacing it.
  • You do not need to compare against other agent files unless it is helpful, but the final format must remain compatible with the current OpenCoWork agent loader.

Required file structure

Always generate a Markdown file with YAML frontmatter and a prompt body.

Use this structure:

---
name: your-agent-name
description: Short, specific description of what the agent does.
icon: lucide-icon-name
maxIterations: 0
---

You are ...

The frontmatter must explicitly include all of these fields:

  • name
  • description
  • icon
  • maxIterations

Default field rules

  • name: kebab-case
  • description: concise and specific
  • icon: choose the most suitable Lucide icon name
  • maxIterations: 0 unless there is a clear reason to set a limit

Sub-agents automatically inherit the complete tool set available to the parent agent for the current run except the parent-only Task delegation tool. Sub-agents are leaf workers and cannot spawn nested sub-agents. Do not add allowedTools or disallowedTools to restrict a sub-agent; legacy fields are accepted for compatibility but are not enforced.

Body requirements

Write the prompt body in the style of the existing sub-agents used by OpenCoWork. The body should usually include:

  • A clear role definition
  • When the agent should be used
  • A practical workflow or checklist
  • Domain-specific evaluation points or guardrails
  • The expected output format
  • Important constraints and quality standards

Quality rules

  • Keep the agent practical and specialized.
  • Avoid vague, generic prompts.
  • Match the current repository's sub-agent tone and structure.
  • Do not create multiple files in one run unless the user explicitly asks.
  • If updating an existing file, preserve good existing content and improve weak or missing parts.

Final response requirements

After writing the file, briefly state:

  • The created or updated file path
  • The chosen agent name
  • A short summary of the agent's intended purpose
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 · 89 lines · 0 tokens per session scan A cf7020660cb3

Subscribe to this mod's changes

agents is a command published in the GitHub repository AIDotNet/OpenCowork (632 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 700 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.