agentleFS
lyoneellyoneel/ly-agent-skills/gen-agent/SKILL.md

gen-agent

Skill0 starsChanged 2 months agoMITView on GitHub

Generate new agent definition files with proper structure and metadata. Use when creating new specialized agents for task-specific behaviors or when scaffolding agent templates.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create well-structured agent definition files that can be loaded by the agent skill.

    line 24
  2. Very specific:

    Create file at agents/{agent-name}.md

    line 79
  3. Distinctive:

    Use clear, directive language

    line 80
  4. Distinctive:

    Avoid hedge words like "try to" or "you may want to"

    line 81
  5. Distinctive:

    Check for clarity and completeness

    line 88
  6. Distinctive:

    Ensure all sections are present

    line 89
  7. Distinctive:

    Verify documentation links are included

    line 90
  8. Distinctive:

    Always include authoritative documentation URLs

    line 138
  9. Distinctive:

    Use directive, high-agency language

    line 141
  10. Distinctive:

    Avoid casual chat or explanatory fluff unless the agent role requires it

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generate Agent Definition

Initialize todos tool:

[
  {"content": "Gather agent requirements", "status": "in_progress", "active_form": "Gathering agent requirements"},
  {"content": "Determine agent category", "status": "pending", "active_form": "Determining agent category"},
  {"content": "Structure agent definition", "status": "pending", "active_form": "Structuring agent definition"},
  {"content": "Generate agent file", "status": "pending", "active_form": "Generating agent file"},
  {"content": "Validate generated agent", "status": "pending", "active_form": "Validating generated agent"}
]

This skill generates new agent definition files following the established agent structure and best practices observed in the agents folder.

Purpose

Create well-structured agent definition files that can be loaded by the agent skill. Agents define specialized behaviors, constraints, and instructions for focused task execution.

Agent Structure Patterns

Based on existing agents, there are several common patterns:

  1. Role-based agents: Define a specific role and expertise area
  2. Task-focused agents: Optimize for specific workflows or operations
  3. Meta-agents: Agents that create or manage other agents
  4. Domain experts: Specialized knowledge in a particular field

Step-by-Step Instructions

  1. Gather agent requirements from the user:
    • Agent name (lowercase with hyphens, will be the filename)
    • Primary purpose and role
    • Target domain or task type
    • Specific constraints or requirements
    • Output format preferences
    • Relevant documentation URLs

Update todos: mark "Gather agent requirements" as completed, mark "Determine agent category" as in_progress.

  1. Determine agent category:
    • Coder: Programming language or framework specialist
    • Writer: Content creation or analysis
    • Meta: Agent design or prompt engineering
    • Expert: Domain-specific knowledge specialist

Update todos: mark "Determine agent category" as completed, mark "Structure agent definition" as in_progress.

  1. Structure the agent definition with these sections:
    • Opening statement: Clear role definition
    • Mission: What the agent does and how it operates
    • Constraints: Technical limits, required tools, documentation sources
    • Style: Communication tone and reasoning approach
    • Forbidden behaviors: What the agent must not do
    • Failure modes and recovery: How to handle errors
    • Output format: Expected response structure
  2. For coding agents, include:
    • Language version and tooling
    • Preferred libraries (native vs third-party)
    • Code quality standards
    • Documentation references
  3. For meta-agents, include:
    • Target LLM optimizations if applicable
    • Prompt engineering techniques
    • Self-critique mechanisms
    • Verification loops

Update todos: mark "Structure agent definition" as completed, mark "Generate agent file" as in_progress.

  1. Generate the agent file:
    • Create file at agents/{agent-name}.md
    • Use clear, directive language
    • Avoid hedge words like "try to" or "you may want to"
    • Include specific examples when relevant
    • Reference authoritative documentation URLs

Update todos: mark "Generate agent file" as completed, mark "Validate generated agent" as in_progress.

  1. Validate the generated agent:
    • Check for clarity and completeness
    • Ensure all sections are present
    • Verify documentation links are included
    • Confirm output format is specified

Usage Examples

Generate a new coding agent:

/gen-agent
Agent name: coder-rust
Purpose: Rust programming assistance with focus on safety and performance

Generate a specialized meta-agent:

/gen-agent
Agent name: prompt-optimizer
Purpose: Refine and improve existing system prompts for clarity and effectiveness

Agent File Location

Agent definitions are created in the agents/ directory relative to the skill location. Each agent is a single Markdown file named {agent-name}.md.

Common Agent Components

Role definition:

You are [Name] — a specialized agent whose purpose is to [primary function].

Constraints with documentation:

Constraints:
- Use only [technology/framework]
- Base all work on up-to-date documentation: [URL]
- Produce [quality standard] output

Output format specification:

Output Format:
Always structure responses as:
[specific format with examples]

Notes

  • Agent names should be descriptive and use kebab-case
  • Always include authoritative documentation URLs
  • Be specific about versions and tooling when applicable
  • Define clear failure modes and recovery strategies
  • Use directive, high-agency language
  • Avoid casual chat or explanatory fluff unless the agent role requires it
  • For coding agents, emphasize compilable, runnable code
  • For meta-agents, include self-critique and verification loops

Update todos: mark "Validate generated agent" as completed. Clear todos with todos([]).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.