generate-agent-skills
SKILL.md
Generate Agent Skills
Generate SKILL.md files for Claude, Codex, and OpenCode agents.
Usage
/generate-agent-skills # Generate ALL skills
/generate-agent-skills zod-docs # Generate only zod-docs skill
Instructions
Step 1: Verify docs exist
- If argument provided: verify
output/{argument}/exists - If no argument: process all
output/*-docs/directories - If missing, tell user to run
/build-my-context7first
Step 2: Copy to shared folder
mkdir -p dotfiles/shared
rm -rf dotfiles/shared/{skill-name}
cp -r output/{skill-name} dotfiles/shared/
Step 3: Determine tier
file_count=$(find dotfiles/shared/{skill-name} -name "*.md" -o -name "*.mdx" | wc -l)
total_size=$(du -sk dotfiles/shared/{skill-name} | cut -f1)
| Tier | Criteria | Template |
|---|---|---|
| 1 | < 30 files AND < 500KB | templates/tier1.md |
| 2 | 30-100 files OR 500KB-2MB | templates/tier2.md |
| 3 | > 100 files OR > 2MB | templates/tier3.md |
Step 3.5: Generate STRUCTURE.md (Tier 3 only)
For tier 3 docs, generate dotfiles/shared/{skill-name}/STRUCTURE.md with:
# {Library} Documentation Structure
Total: {N} files
## {directory1}/ ({count} files)
- `{directory1}/file1.md`
- `{directory1}/file2.md`
- `{directory1}/subdir/file3.md`
## {directory2}/ ({count} files)
- `{directory2}/file1.md`
...
Generation approach:
- List all
.mdand.mdxfiles in the docs folder - Group files by top-level directory
- Sort directories alphabetically
- Include full relative paths for each file
- Add file counts per directory and total
This gives the agent a complete map of available documentation before it starts searching.
Step 4: Generate SKILL.md
For each agent (Claude, Codex, OpenCode):
- Create
dotfiles/<agent>/skills/<skill-name>/SKILL.md - Use the appropriate tier template
- Do NOT create
references/- install script handles this
Step 5: Report results
Summarize which skills were generated and recommend /install-agent-skills to deploy.
Weekly Installs
7
Repository
jokejason/local-context7GitHub Stars
6
First Seen
Jan 23, 2026
Security Audits
Installed on
claude-code5
opencode5
gemini-cli4
antigravity4
windsurf4
codex4