agentleFS
speakeasy-apispeakeasy-api/sdk-generation-skills/CLAUDE.md

sdk-generation-skills

CLAUDE.md17 starsChanged 10 months agoApache-2.0View on GitHub

Claude-specific instructions for working on the Speakeasy Agent Skills repository. 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: Spec Reference: Skills follow the agentskills.io specification. Required sections: Recommended sections: Our skills follow the agentskills.io specification. Key constraints: Note: Trigger phrases belong in the description field, not in metadata (which only supports string values, not arrays). Standard section order: Skills are loaded on-demand. Only…

  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

24 rules. About 0 are common, 18 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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
  1. Very specific:

    Use kebab-case for directory names (e.g., manage-openapi-overlays).

    line 44
  2. Very specific:

    Every skill must have a SKILL.md file with YAML frontmatter.

    line 48
  3. Very specific:

    SKILL.md: Always uppercase, exact filename

    line 120
  4. Very specific:

    Frontmatter name: Must match directory name exactly

    line 121
  5. Distinctive:

    Link to related skills: when appropriate

    line 141
  6. Distinctive:

    All diagnostic and fix skills should use this escalation path:

    line 145
  7. Distinctive:

    Document what the AI should not do:

    line 155
  8. Distinctive:

    Maintain backward compatibility: - Don't change skill behavior unexpectedly

    line 172
  9. Distinctive:

    Update related skills: if behavior changes affect them

    line 173
  10. Distinctive:

    When testing or demonstrating commands:

    line 178
  11. Very specific:

    All skills are namespaced under speakeasy: via .claude-plugin/plugin.json:

    line 234
  12. Distinctive:

    Check if a related skill exists

    line 274
  13. Distinctive:

    Follow the template structure

    line 276
  14. Distinctive:

    Add decision framework if diagnostic

    line 278
  15. Distinctive:

    Update README.md skill table

    line 279
  16. Distinctive:

    Read the current skill

    line 283
  17. Distinctive:

    Check for breaking changes to related skills

    line 286
  18. Very specific:

    Check the description field has trigger phrases

    line 290
  19. Distinctive:

    Ensure phrases match how users ask

    line 291
  20. Distinctive:

    Add more keyword variations

    line 292
  21. Distinctive:

    Test with actual trigger phrases

    line 293
  22. Distinctive:

    Create a branch: - Don't push directly to master

    line 316
  23. Distinctive:

    Update README.md: if adding new skills

    line 318
  24. Distinctive:

    Test before submitting: - Verify skills work as expected

    line 319

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.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.

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

CLAUDE.md

Claude-specific instructions for working on the Speakeasy Agent Skills repository.

Quick Reference

# Create a new skill
mkdir skills/{skill-name}
cp templates/SKILL.template.md skills/{skill-name}/SKILL.md

# Test a skill locally
cp -r skills/{skill-name} ~/.claude/skills/

# Reload Claude Code and test trigger phrases

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                # General agent guidance
├── CLAUDE.md                # This file (Claude-specific guidance)
├── README.md                # End-user documentation
└── LICENSE                  # Apache-2.0

Creating 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]. Triggers on "X", "Y", or "Z".
license: Apache-2.0
---

Spec Reference: Skills follow the agentskills.io specification.

Required sections:

SectionPurpose
# skill-nameTitle matching the directory name
## When to UseTrigger scenarios and example phrases
## InputsTable of required/optional inputs
## OutputsTable of what the skill produces
## CommandThe speakeasy command to run
## ExampleWorking example with explanation

Recommended sections:

SectionPurpose
## PrerequisitesRequired setup, env vars, dependencies
## Decision FrameworkTable mapping situations to actions
## What NOT to DoAnti-patterns the AI should avoid
## TroubleshootingCommon errors and solutions
## Related SkillsLinks to related skills (always last)

agentskills.io Spec Compliance

Our skills follow the agentskills.io specification. Key constraints:

FieldConstraint
nameMax 64 chars, lowercase + hyphens only, must match directory name
descriptionMax 1024 chars, describe what AND when to use (include trigger phrases here)
licenseSimple string (we use Apache-2.0)
metadataString keys to string values only (no arrays)
compatibilityPlain string, max 500 chars (optional)
Body contentNo format restrictions, keep under 500 lines

Note: Trigger phrases belong in the description field, not in metadata (which only supports string values, not arrays).

Standard section order:

1. Frontmatter (name, description)
2. # Title
3. Intro paragraph
4. ## When to Use
5. ## Inputs
6. ## Outputs
7. ## Prerequisites (if needed)
8. ## Command
9. ## Example
10. ... other content sections ...
11. ## Decision Framework (if needed)
12. ## What NOT to Do (if needed)
13. ## Troubleshooting (if needed)
14. ## Related Skills (always last)

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:

  1. Always include --output console for structured, parseable output
  2. Pipe large output to reduce context: speakeasy run 2>&1 | tail -50
  3. Reference the Decision Framework for issue categorization
  4. Link to related skills when appropriate

Decision Framework Integration

All diagnostic and fix skills should use this escalation path:

Issue TypeActionExample
Naming issuesFix with overlaysBad operationIds, missing descriptions
Structural issuesAsk the userInvalid $ref, missing schemas
Design issuesProduce strategy documentAuthentication, 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 decisions

Modifying Existing Skills

When modifying skills:

  1. Read the skill first - Understand current behavior before changing
  2. Preserve the frontmatter format - Name and description are required
  3. Maintain backward compatibility - Don't change skill behavior unexpectedly
  4. Update related skills if behavior changes affect them
  5. Keep under 500 lines - Large skills waste context

Running Speakeasy Commands

When testing or demonstrating commands:

# Use --output console for structured output
speakeasy run --output console

# Pipe large output to reduce context
speakeasy lint openapi -s spec.yaml 2>&1 | tail -50

# Filter for errors only
speakeasy lint openapi -s spec.yaml 2>&1 | grep -E "(error|warning)"

Skill Writing Guidelines

Description Field

The description in frontmatter is critical for skill activation. Include:

  • Trigger condition: "Use when X"
  • Trigger phrases: Exact phrases users might say
  • Keywords: Terms that should activate this skill

Good example - see skills/diagnose-generation-failure/SKILL.md

Bad: description: Helps with generation issues (too vague, no trigger phrases)

Template Sections

See templates/SKILL.template.md for the complete structure including:

  • Inputs/Outputs tables
  • Decision Framework table
  • What NOT to Do section
  • Troubleshooting section
  • Related Skills links

Common Speakeasy Commands

Reference for skill authors:

CommandPurpose
speakeasy quickstart -s <spec> -t <target>Initialize new project
speakeasy runGenerate SDK from workflow
speakeasy run --output consoleGenerate with structured output
speakeasy lint openapi --non-interactive -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 <spec1> -s <spec2> -o <output>Merge multiple specs
speakeasy pull --list --format jsonList registry sources

Plugin Configuration

Namespace

All skills are namespaced under speakeasy: via .claude-plugin/plugin.json:

{
  "name": "speakeasy",
  "version": "1.0.0",
  "description": "SDK generation and OpenAPI tooling with Speakeasy CLI",
  "skills": "../skills/"
}

Skills appear as speakeasy:skill-name in Claude Code.

Adding Skills

Skills are auto-discovered from the skills/ directory. Just create the directory and SKILL.md file.

Testing Skills

Local Testing

# Copy to Claude's skills directory
cp -r skills/{skill-name} ~/.claude/skills/

# Reload Claude Code and test trigger phrases

Validation

Manual validation checklist:

  1. Frontmatter has name and description fields
  2. Description includes trigger phrases ("Use when...")
  3. Commands match actual CLI (speakeasy <command> --help to verify)
  4. Related skills links are valid

Common Tasks

Add a new skill for a speakeasy command

  1. Check if a related skill exists
  2. Create skills/{command-name}/SKILL.md
  3. Follow the template structure
  4. Include trigger phrases in description
  5. Add decision framework if diagnostic
  6. Update README.md skill table

Update an existing skill

  1. Read the current skill
  2. Make minimal changes
  3. Preserve frontmatter format
  4. Check for breaking changes to related skills

Fix a skill that isn't triggering

  1. Check the description field has trigger phrases
  2. Ensure phrases match how users ask
  3. Add more keyword variations
  4. Test with actual trigger phrases

Commit Guidelines

# Create a branch first
git checkout -b feat/add-new-skill

# Commit with clear message
git commit -m "Add skill for [purpose]

- Created skills/{name}/SKILL.md
- Added trigger phrases for [scenarios]
- Linked to related skills"

# Push and create PR
git push -u origin feat/add-new-skill

PR Guidelines

When submitting changes:

  1. Create a branch - Don't push directly to master
  2. Write clear commit messages - Describe what changed and why
  3. Update README.md if adding new skills
  4. Test before submitting - Verify skills work as expected

File Reference

FilePurpose
skills/*/SKILL.mdSkill definitions
templates/SKILL.template.mdTemplate for new skills
.claude-plugin/plugin.jsonPlugin manifest (namespace)
README.mdEnd-user documentation
AGENTS.mdGeneral agent guidance
CLAUDE.mdThis file

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.