How to Create Custom Skills for Codex Instead of Using Pre-Built Plugins
I installed a popular Codex plugin collection last month. Three thousand lines of configuration. Features for every framework I never used. Context window warnings every other session.
I spent more time disabling features than using them.
Then I discovered skill-creator - a built-in Codex skill that guides you through building exactly what you need. No bloat. No third-party dependencies. Just your workflow, your way.
The Problem with Pre-Built Plugins
Pre-built Codex plugins sound convenient. They promise instant productivity with “battle-tested” workflows. But here’s what I experienced:
Generic workflows - Designed for average use cases. My FastAPI project uses a custom auth layer. The plugin’s auth templates? Useless.
Hidden complexity - Features I never touched still consumed my context window. Codex spent tokens understanding things I didn’t need.
Dependency risk - When the plugin author stopped updating, I was stuck with deprecated patterns.
Limited flexibility - Customization meant editing someone else’s spaghetti code. Every update wiped my changes.
The Reddit community put it bluntly:
“Base codex with custom skills >>>>”
“We don’t like bloat here”
The Solution: skill-creator
OpenAI provides skill-creator as a built-in skill. It guides you through creating effective, modular skills that extend Codex’s capabilities.
To start, I ran:
codex skill createThis launched an interactive session that helped me define:
- What my skill does
- When to trigger it
- What resources to include
SKILL.md: The Core Format
Every skill centers around a SKILL.md file. Here’s the template structure:
---name: my-custom-skilldescription: [What the skill does AND when to use it. Include specific triggers.]---
# My Custom Skill
## Overview
[1-2 sentences explaining what this skill enables]
## Core Workflow
[Step-by-step instructions. Keep concise, prefer examples over explanations.]
## Resources
[Reference scripts/, references/, and assets/ directories as needed]The frontmatter is critical. Codex uses description to decide whether to load your skill. If you put “When to use this skill” in the body instead, it never gets read until after triggering - useless for triggering decisions.
Building My First Skill
I needed a FastAPI CRUD helper. Here’s how I built it.
Step 1: Initialize the structure
python scripts/init_skill.py fastapi-crud-helper --path ~/.codex/skillsThis created:
~/.codex/skills/fastapi-crud-helper/├── SKILL.md (template)├── scripts/│ └── example.py├── references/│ └── api_reference.md└── assets/ └── example_asset.txtStep 2: Edit SKILL.md
---name: fastapi-crud-helperdescription: Generate FastAPI CRUD endpoints with proper typing, validation, and error handling. Use when: (1) Creating new API endpoints, (2) Generating CRUD boilerplate, (3) Setting up Pydantic models for endpoints.---
# FastAPI CRUD Helper
## Workflow
1. Analyze endpoint requirements (method, path, models)2. Generate Pydantic request/response models3. Create endpoint function with proper type hints4. Add standard error handling with HTTPException5. Include OpenAPI documentation strings
## Template
```python@router.post("/{resource}", response_model={ResponseModel})async def create_{resource}( request: {RequestModel}, db: Session = Depends(get_db)): """Create a new {resource}.""" try: result = service.create(db, request) return result except ValueError as e: raise HTTPException(status_code=400, detail=str(e))Reference
For complex schemas, see references/schema_patterns.md.
**Step 3: Validate**
```bash title="Validate skill"python scripts/quick_validate.py ~/.codex/skills/fastapi-crud-helperThis caught a frontmatter formatting error I had made.
Step 4: Package
python scripts/package_skill.py ~/.codex/skills/fastapi-crud-helper ./distThe result: dist/fastapi-crud-helper.skill - a zip file with .skill extension.
Progressive Disclosure: Managing Context Window
Context window is a shared resource. Skills compete with conversation history and user requests. I learned to organize skills with progressive disclosure:
# Multi-Framework Skill
## Quick Start
[Core workflow - always loaded]
## Advanced Features
- **AWS deployment**: See [references/aws.md](references/aws.md)- **GCP deployment**: See [references/gcp.md](references/gcp.md)- **Azure deployment**: See [references/azure.md](references/azure.md)Claude loads AWS docs only when I choose AWS. This keeps the base skill lean.
Setting Appropriate Freedom Levels
I also learned to match specificity to task fragility:
| Freedom Level | When to Use | Example |
|---|---|---|
| High (text instructions) | Multiple valid approaches, context-dependent decisions | General coding patterns |
| Medium (pseudocode with parameters) | Preferred pattern exists, some variation acceptable | Configuration-driven behavior |
| Low (specific scripts) | Fragile operations, consistency critical | PDF manipulation, database migrations |
Think of Codex as exploring a path: a narrow bridge needs guardrails (low freedom), while an open field allows many routes (high freedom).
Common Mistakes I Made
Verbose explanations - I wrote paragraphs when concise examples sufficed. Codex learns better from patterns than prose.
Duplicating built-in knowledge - I added Python syntax tips Codex already knew. Wasted context, reduced effectiveness.
Deeply nested references - I organized content three levels deep. All reference files should link directly from SKILL.md.
Skipping validation - I packaged before validating. Caught errors in production. Always run quick_validate.py first.
Why Custom Skills Win
Custom skills create a virtuous cycle:
- Start minimal - Only what you need today
- Notice friction - Real problems reveal themselves in usage
- Iterate - Add capabilities as genuine needs emerge
- Own everything - Full control, no dependency on plugin authors
Pre-built plugins start maximal. You trim unused features - a backwards approach.
Summary
In this post, I showed how to create custom Codex skills using the built-in skill-creator. The key point is custom skills match your exact workflow with zero bloat and full control.
The process:
- Understand your concrete use cases
- Plan reusable resources (scripts, references, assets)
- Initialize with
init_skill.py - Edit SKILL.md with concise instructions
- Validate with
quick_validate.py - Package with
package_skill.py - Iterate based on real usage
For software engineers who value precision, custom skills beat pre-built plugins every time.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments