generate-agents

generate-agents is a command for Claude Code from julianromli/droid-factory-template. It costs 10 tokens per session (2,063 once invoked), scanned A, original, MIT.

A command that examines a codebase and creates a hierarchy of AGENTS.md files, which give coding agents local instructions for different folders.

In plain words
What is it for?
Mapping a repository’s structure, identifying projects or packages that need their own guidance, and generating repository-specific agent instructions.
Why use it?
It helps agents find the most relevant guidance while keeping shared instructions short and avoiding unnecessary reading.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; mentions AGENTS.md.

Good fit Mapping a repository’s structure, identifying projects or packages that need their own guidance, and generating repository-specific agent instructions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/julianromli/droid-factory-template/generate-agents
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.

Clone the repo
git clone --depth 1 https://github.com/julianromli/droid-factory-template

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/julianromli/droid-factory-template/generate-agents/github.svg)](https://agentmods.dev/commands/julianromli/droid-factory-template/generate-agents)
Your own site
<a href="https://agentmods.dev/commands/julianromli/droid-factory-template/generate-agents"><img src="https://agentmods.dev/badge/commands/julianromli/droid-factory-template/generate-agents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-agents

Your own site · 80×15
<a href="https://agentmods.dev/commands/julianromli/droid-factory-template/generate-agents"><img src="https://agentmods.dev/badge/commands/julianromli/droid-factory-template/generate-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 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,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00010 $0.02063
Opus 5.5 $0.00004 $0.00825
Sonnet 5.5 $0.00002 $0.00413
Haiku 4.5 $0.00001 $0.00206

Measured 2mo ago against content hash d6254fb4870b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-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 2mo 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/generate-agents.md · 248 lines

How it starts

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

Task: Analyze this codebase and generate a hierarchical AGENTS.md structure

Context & Principles

You are going to help me create a hierarchical AGENTS.md system for this codebase. This is critical for AI coding agents to work efficiently with minimal token usage.

Core Principles:

  1. Root AGENTS.md is LIGHTWEIGHT - Only universal guidance, links to sub-files
  2. Nearest-wins hierarchy - Agents read the closest AGENTS.md to the file being edited
  3. JIT (Just-In-Time) indexing - Provide paths/globs/commands, NOT full content
  4. Token efficiency - Small, actionable guidance over encyclopedic documentation
  5. Sub-folder AGENTS.md files have MORE detail - Specific patterns, examples, commands

Your Process

Phase 1: Repository Analysis

First, analyze the codebase structure and provide me with:

  1. Repository type: Monorepo, multi-package, or simple single project?

  2. Primary technology stack: Languages, frameworks, key tools

  3. Major directories/packages that should have their own AGENTS.md:

    • Apps (e.g., apps/web, apps/api, apps/mobile)
    • Services (e.g., services/auth, services/transcribe)
    • Packages/libs (e.g., packages/ui, packages/shared)
    • Workers/jobs (e.g., workers/queue, workers/cron)
  4. Build system: pnpm/npm/yarn workspaces? Turborepo? Lerna? Or simple?

  5. Testing setup: Jest, Vitest, Playwright, pytest? Where are tests?

  6. Key patterns to document:

    • Code organization patterns
    • Important conventions (naming, styling, commits)
    • Critical files that serve as good examples
    • Anti-patterns to avoid

Present this as a structured map before generating any AGENTS.md files.


Phase 2: Generate Root AGENTS.md

Create a lightweight root AGENTS.md (~100-200 lines max) that includes:

Required Sections:

1. Project Snapshot (3-5 lines)

  • Repo type (monorepo/simple)
  • Primary tech stack
  • Note that sub-packages have their own AGENTS.md files

Read the full file on GitHub · 248 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. 2mo ago First seen · 248 lines · 10 tokens per session scan A d6254fb4870b

Subscribe to this mod's changes

generate-agents is a command published in the GitHub repository julianromli/droid-factory-template (53 stars, last pushed 10mo ago), licensed MIT. It adds 10 tokens to every session and 2,063 once invoked, about $0.0000 per session on Opus 5.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.