How to Create a Professional Claude Code Skill - Complete Guide
Learn how to build, test, and publish Claude Code skills with our step-by-step guide. From SKILL.md format to marketplace submission, we cover everything using our Payload CMS content creator as a real example.
The Skills Revolution in AI Development
In December 2025, Anthropic released the Agent Skills specification as an open standard, fundamentally changing how developers extend AI capabilities. Within weeks, OpenAI adopted the same format for Codex CLI and ChatGPT, validating skills as the universal pattern for AI extensibility. By January 2026, the Claude Code skills marketplace exploded with hundreds of community-contributed skills ranging from creative applications to enterprise workflows.
Skills transform Claude from a general-purpose AI into a specialized tool for your exact workflow. Instead of explaining your process every time, you package it once as a skill—and Claude loads it automatically when relevant. This guide shows you exactly how to create professional skills, using our real-world Payload CMS content creator as a working example.
What is a Claude Code Skill?
A skill is a folder of instructions, scripts, and resources that Claude loads dynamically to perform specialized tasks. At its simplest, a skill is just a directory containing a SKILL.md file with YAML frontmatter and markdown instructions. The brilliance lies in Claude's progressive disclosure architecture: at startup, Claude pre-loads only the name and description of every installed skill. When a task matches a skill's description, Claude loads the full instructions on demand.
Anatomy of a Skill:
- SKILL.md (required) - YAML frontmatter with name and description, plus markdown instructions
- scripts/ (optional) - Executable scripts for automation
- references/ (optional) - Documentation loaded into context as needed
- assets/ (optional) - Templates, icons, fonts used in output
Best practice: keep SKILL.md under 500 lines and move detailed reference material to separate files. This ensures fast loading and clean organization.
Real Example: Our Payload CMS Content Creator Skill
We built payload-create-content to automate creating blog articles and project case studies for our Payload CMS site. Before this skill, creating a professional article took 2-3 hours of manual work: researching stats, structuring 8-10 sections, formatting content in Lexical JSON format, writing SQL insertion scripts with foreign key relations, and testing on the server.
The skill automates:
- Content structure (8-10 detailed sections for articles, 10+ for projects)
- Lexical JSON formatting (complex node structures, text formatting codes)
- SEO optimization (meta tags, keywords, social sharing texts)
- Multi-language support (English and French locales)
- PostgreSQL insertion with CTEs for foreign key handling
- Web research integration for market stats
Now? We type /create-content, answer 4-5 questions, and Claude generates everything—from structure to database insertion—in under 3 minutes. That's a 40x speedup.
Step 1: Planning Your Skill
Before writing any code, define three things clearly:
1. The Problem You're Solving
Identify a repetitive task you explain to Claude frequently. For us, it was creating professional articles with 8-10 sections, formatting in Lexical JSON, SEO metadata, multi-language support, and PostgreSQL insertion. We were typing variations of this prompt weekly.
2. Your Workflow Requirements
Document your exact process step-by-step. We mapped ours: gather info, research, structure content, format to Lexical JSON, generate SQL, deploy and verify.
3. Technical Specifications
List required formats, IDs, schemas, and constraints. We documented Lexical JSON format specification, database schema, tool IDs, category IDs, and quality requirements.
Step 2: Creating the SKILL.md File
Create a directory in ~/.claude/skills/ with your skill name. Inside, create SKILL.md with YAML frontmatter (name and description) followed by markdown instructions.
Step 3: Testing Your Skill Locally
Save your SKILL.md and restart Claude Code. Test by direct invocation (/your-skill-name), natural language triggers, and edge cases. We ran 5 test cases to validate behavior.
Step 4: Publishing to GitHub
Once your skill works reliably, publish it to GitHub with README.md, SKILL.md, LICENSE (MIT recommended), .gitignore, and optional metadata.json. Critical: never include credentials or sensitive data.
Step 5: Contributing to Anthropics Skills Marketplace
To share with the Claude Code community: fork anthropics/skills, clone locally, create branch, add your skill directory, update remote to your fork, commit with clear message, push, and create Pull Request to upstream.
Results & Impact
Our payload-create-content skill delivers measurable improvements:
- Time savings: From 2-3 hours to under 3 minutes per article (40x faster)
- Consistency: Every article follows the same professional structure
- Error reduction: Zero JSON/SQL errors (previously 30% failure rate)
- SEO completeness: 100% of content includes meta tags and social sharing
- Publishing frequency: Went from 1 article per week to 3-4, tripling output
Best Practices for Professional Skills
Write for progressive disclosure: Claude pre-loads only name and description. Provide complete examples so Claude never guesses formats. Use interactive questions with AskUserQuestion. Build in quality checks with checklists. Version control everything with Git.
Troubleshooting Common Issues
Skill not triggering: revise description with more trigger words. YAML parsing errors: check indentation and escaped colons. Skill produces wrong output: make instructions more explicit. Skill too slow: keep SKILL.md under 500 lines and split documentation into references folder.
Conclusion & Next Steps
Claude Code skills represent a paradigm shift—instead of repeatedly explaining your process, you teach Claude once and it becomes an expert. Skills are simple to create (just a SKILL.md file), powerful in impact (40x speedups achievable), and shareable via the Anthropics marketplace.
Ready to create your first skill? Check out our payload-create-content skill on GitHub as a complete working example, or explore the Anthropics skills repository for inspiration. The future of AI development is skills—and you can help build it.