sdk-generation-skills
AGENTS.md17 starsChanged 10 months agoApache-2.0View on GitHub
This file provides guidance for AI coding agents working on the Speakeasy Agent Skills repository. It covers how to create, maintain, and improve skills for the Speakeasy CLI. Use kebab-case for directory names (e.g., manage-openapi-overlays). Every skill must have a SKILL.md file with YAML frontmatter. See templates/SKILL.template.md for a complete example. Required structure: Required sections: Recommended sections: Skills are loaded on-demand. Only the name and description are loaded at startup; full SKILL.md loads when activated. Skills for the Speakeasy CLI…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- configure-sdk-optionsSkill
- customize-sdk-hooksSkill
- diagnose-generation-failureSkill
- extract-openapi-from-codeSkill
- generate-mcp-serverSkill
- generate-terraform-providerSkill
- improve-sdk-namingSkill
- manage-openapi-overlaysSkill
- orchestrate-multi-repo-sdksSkill
- orchestrate-multi-target-sdksSkill
- setup-sdk-testingSkill
- speakeasy-contextSkill
- start-new-sdk-projectSkill
- writing-openapi-specsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 31
Use kebab-case for directory names (e.g., manage-openapi-overlays).
- Very specific: line 35
Every skill must have a SKILL.md file with YAML frontmatter.
- Very specific: line 67
SKILL.md: Always uppercase, exact filename
- Very specific: line 68
Frontmatter
name: Must match directory name exactly - Distinctive: line 88
Link to related skills: when appropriate
- Distinctive: line 92
All diagnostic and fix skills should use this escalation path:
- Distinctive: line 102
Document what the AI should not do:
- Distinctive: line 118
Maintain backward compatibility: - Don't change skill behavior unexpectedly
- Distinctive: line 119
Update related skills: if behavior changes affect them
- Distinctive: line 131
Test trigger phrases work as expected
- Distinctive: line 132
Verify command output is parseable
- Distinctive: line 136
Use the AgentSkills validator if available:
- Distinctive: line 179
Create a branch: - Don't push directly to master
- Distinctive: line 181
Update README.md: if adding new skills
- Distinctive: line 182
Test before submitting: - Verify skills work as expected
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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.
Files
AGENTS.md
This file provides guidance for AI coding agents working on the Speakeasy Agent Skills repository. It covers how to create, maintain, and improve skills for the Speakeasy CLI.
Repository Structure
speakeasy-api/skills/
├── .claude-plugin/ # Claude Code plugin configuration
│ ├── plugin.json # Plugin manifest (namespace: "speakeasy")
│ └── marketplace.json # Marketplace metadata
├── skills/ # Skill definitions
│ └── {skill-name}/
│ └── SKILL.md # Skill instructions
├── templates/ # Skill templates
│ └── SKILL.template.md # Template for new skills
├── AGENTS.md # This file (contributor guidance)
├── CLAUDE.md # Claude-specific contributor guidance
├── README.md # End-user documentation
└── LICENSE # Apache-2.0Creating a New Skill
1. Directory Structure
mkdir skills/{skill-name}Use kebab-case for directory names (e.g., manage-openapi-overlays).
2. SKILL.md Format
Every skill must have a SKILL.md file with YAML frontmatter. See templates/SKILL.template.md for a complete example.
Required structure:
---
name: skill-name
description: Use when [trigger condition]. Include phrases like "X", "Y", or "Z".
---Required sections:
| Section | Purpose |
# skill-name | Title matching the directory name |
## When to Use | Trigger scenarios and example phrases |
## Command | The speakeasy command to run |
## Example | Working example with explanation |
Recommended sections:
| Section | Purpose |
## Prerequisites | Required setup, env vars, dependencies |
## Decision Framework | Table mapping situations to actions |
## What NOT to Do | Anti-patterns the AI should avoid |
## Related Skills | Links to related skills |
3. Naming Conventions
- Directory:
kebab-case(e.g.,start-new-sdk-project) - SKILL.md: Always uppercase, exact filename
- Frontmatter
name: Must match directory name exactly
Skill Design Principles
Context Efficiency
Skills are loaded on-demand. Only the name and description are loaded at startup; full SKILL.md loads when activated.
- Keep SKILL.md under 500 lines - Large files waste context
- Write specific descriptions - Include trigger phrases for better activation
- Use progressive disclosure - Reference supporting files for details
- Prefer commands over inline code - Command output is smaller than code
Speakeasy CLI Patterns
Skills for the Speakeasy CLI should follow these patterns:
- Always include
--output consolefor structured, parseable output - Pipe large output to reduce context:
speakeasy run 2>&1 | tail -50 - Reference the Decision Framework for issue categorization
- Link to related skills when appropriate
Decision Framework Integration
All diagnostic and fix skills should use this escalation path:
| Issue Type | Action | Example |
| Naming issues | Fix with overlays | Bad operationIds, missing descriptions |
| Structural issues | Ask the user | Invalid $ref, missing schemas |
| Design issues | Produce strategy document | Authentication, API restructuring |
Anti-Patterns for Skills
Document what the AI should not do:
## What NOT to Do
- **Do NOT** modify source OpenAPI specs directly
- **Do NOT** disable lint rules to hide errors
- **Do NOT** assume you can fix structural problems
- **Do NOT** proceed without user input on design decisionsUpdating Existing Skills
When modifying skills:
- Preserve the frontmatter format - Name and description are required
- Maintain backward compatibility - Don't change skill behavior unexpectedly
- Update related skills if behavior changes affect them
- Test with multiple agents - Claude Code, Cursor, Copilot if possible
Testing Skills
Manual Testing
- Install the skill locally:
cp -r skills/{skill-name} ~/.claude/skills/ - Test trigger phrases work as expected
- Verify command output is parseable
Validation
Use the AgentSkills validator if available:
npx skills validate ./skills/{skill-name}Common Speakeasy Commands
Reference for skill authors:
| Command | Purpose |
speakeasy quickstart -s <spec> -t <target> | Initialize new project |
speakeasy run | Generate SDK from workflow |
speakeasy run --output console | Generate with structured output |
speakeasy lint openapi -s <spec> | Validate OpenAPI spec |
speakeasy suggest operation-ids -s <spec> | AI suggestions for operation IDs |
speakeasy overlay apply -s <spec> -o <overlay> | Apply overlay to spec |
speakeasy overlay validate -o <overlay> | Validate overlay file |
speakeasy merge -s <specs...> -o <output> | Merge multiple specs |
Plugin Configuration
plugin.json
{
"name": "speakeasy",
"version": "1.0.0",
"description": "SDK generation and OpenAPI tooling with Speakeasy CLI",
"skills": "../skills/"
}The name field sets the namespace prefix for all skills (e.g., speakeasy:start-new-sdk-project).
Adding a New Skill to the Plugin
Skills are auto-discovered from the skills/ directory. Just create the directory and SKILL.md file.
PR Guidelines
When submitting changes:
- Create a branch - Don't push directly to master
- Write clear commit messages - Describe what changed and why
- Update README.md if adding new skills
- Test before submitting - Verify skills work as expected
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
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.

