From david-skills
Maintains Claude Code skills repositories: rename skills, reorganize folders, fix installation commands, update cross-references, troubleshoot 'No matching skills found' CLI errors.
npx claudepluginhub thedavidweng/skillsThis skill uses the workspace's default tool permissions.
Maintain an Agent Skills-compatible repository: rename skills, fix installation commands, and avoid CLI pitfalls.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Processes PDFs: extracts text/tables/images, merges/splits/rotates pages, adds watermarks, creates/fills forms, encrypts/decrypts, OCRs scans. Activates on PDF mentions or output requests.
Share bugs, ideas, or general feedback.
Maintain an Agent Skills-compatible repository: rename skills, fix installation commands, and avoid CLI pitfalls.
--skill Uses Exact Matching, Not GlobThe npx skills add --skill flag does not support shell globs.
# WRONG — produces "No matching skills found for: wiki*"
npx skills add thedavidweng/skills --skill "wiki*"
# CORRECT — list each skill individually
npx skills add thedavidweng/skills \
--skill wiki-core \
--skill wiki-inline-linking \
--skill wiki-slug-rename
Use --all to install every skill in a repo without naming them.
npx skills add thedavidweng/skills --all
npx skills add user/repo only discovers top-level skill directories and known priority paths by default. For nested category layouts, keep a .claude-plugin/plugin.json manifest in the repository root so the installer shows the curated default multi-select menu without requiring --full-depth.
{
"name": "repo-skills",
"skills": [
"./category/skill-one",
"./category/skill-two"
]
}
The skills entries must be relative paths starting with ./, and each listed directory must contain a valid SKILL.md.
A skill name appears in three places. All must stay in sync.
mv old-name/ new-name/
---
name: new-name
description: ...
---
Update every README.md that links to the skill:
npx skills remove old-name -y
npx skills add thedavidweng/skills --skill new-name -y
wiki- Prefix to a Skill FamilyWhen unifying a family of skills under a common prefix:
slug-rename/ -> wiki-slug-rename/name: in each SKILL.mdnpx skills add clones from remote, so local changes alone do not affect installsWhen moving skills from ~/.hermes/skills/ (or another agent's skill directory) into the thedavidweng/skills repository:
find ~/.hermes/skills -name "SKILL.md" | sort
Read the SKILL.md. Reject or defer if it contains:
Skills that ARE good candidates: those with generic rules, workflows, and decision frameworks that apply to any user with a similar setup.
Before adding to the repo, scrub:
{{vault_root}}Each migrated skill needs:
skill-name/
├── README.md # Human-facing overview
└── SKILL.md # Full agent workflow spec
If the original had a references/ directory with templates or scripts, preserve it.
Ensure the folder name matches the name: field in SKILL.md frontmatter. If not, rename the folder or update the field.
Add the new skill to:
wiki/README.md skill table (if it's a wiki skill)README.md skill table.claude-plugin/plugin.json, if the skill should appear in the default npx skills add user/repo menu# Verify the skill appears in discovery
npx skills add thedavidweng/skills --list 2>&1 | grep new-skill-name
# Verify it installs cleanly
npx skills add thedavidweng/skills --skill new-skill-name -y
Important: npx skills add clones from GitHub. Local changes are invisible until committed and pushed.
When skill names change (e.g., during prefix unification), stale symlinks remain in .agents/skills/:
# Remove old skill installations
npx skills remove old-skill-name old-skill-name-2 -y
# Install with new names
npx skills add thedavidweng/skills --skill new-skill-name -y
oh-my-codex prints:
⚠ Warning: Exceeded skills context budget of 2%. Loaded skill descriptions were truncated...
oh-my-codex recursively scans the entire repository. If the same skill exists in multiple places (e.g., both .agents/skills/wiki-core/ and wiki/wiki-core/), every skill is loaded twice, doubling the description character count.
Diagnose:
# Find all SKILL.md files and show duplicate directory names
find . -name "SKILL.md" -exec dirname {} \; | sort | uniq -d
# Measure total description characters
python3 -c "
import os, re
total = 0
for root, _, files in os.walk('.'):
if 'SKILL.md' in files:
with open(os.path.join(root, 'SKILL.md')) as f:
m = re.search(r'^description:\s*[\"\']?(.*?)[\"\']?\s*$', f.read(), re.M)
if m: total += len(m.group(1).strip('\"\''))
print(f'Total description chars: {total}')
"
Fix: Remove the duplicate copy. Typically .agents/skills/ is the stale installation directory and wiki/ (or the canonical category folder) is the source of truth.
rm -rf .agents/skills/
# Add to .gitignore to prevent future accidental commits
echo -e ".agents/\n.claude/\n.codebuddy/\n.kiro/\n.trae/\n" >> .gitignore
# Reinstall cleanly from remote
npx skills add thedavidweng/skills --all -y
The official spec recommends concise descriptions. If any single description exceeds ~300 characters, it consumes disproportionate budget.
Diagnose:
python3 -c "
import os, re
for root, _, files in os.walk('.'):
if 'SKILL.md' in files:
with open(os.path.join(root, 'SKILL.md')) as f:
m = re.search(r'^description:\s*[\"\']?(.*?)[\"\']?\s*$', f.read(), re.M)
if m:
d = m.group(1).strip('\"\'')
if len(d) > 250:
print(f'{len(d):4d} chars | {os.path.relpath(root)}')
"
Fix: Compress the description to under 200 characters. Move detailed trigger conditions into the SKILL.md body, not the frontmatter.
When inheriting or reviewing a skills repo, audit for accidentally committed personal information before publishing or sharing.
Search for common PII categories:
grep -rn -E '(翁|献|琼|静雯|杨杨|冠豪|Jianshuang|Lanfei|Hui-Fen|Menglin|david-weng|weng-jia|绣山|CSW|UBC|150,000|youtube\\.token|YUTU_CACHE|~/yout)' wiki/ code-review/ content-ops/ maintenance/ skill-repo-maintenance/
Typical categories to check:
zhang-san-income-cert.md)~/youtube.token.personal.json)Use a scripted replacement map to ensure consistency:
replacements = {
'real-name-slug': 'zhang-san',
'Real Name': 'Zhang San',
'institution-abbrev': 'some-school',
'~/personal.path.json': '~/token.json',
}
Then verify with the same grep pattern — it should return zero hits.
If PII existed in previous commits, deleting it from current files is not enough. The old commits still contain the data.
Create an orphan branch and force push:
# Stage all cleaned files
git add -A
git commit -m "clean: remove PII, fix structure, add compliance files"
# Create orphan branch to sever history
git checkout --orphan new_main
git add -A
git commit -m "Initial commit: cleaned skills repository"
# Replace main
git branch -D main
git branch -m main
git push --force origin main
Caution: This permanently erases all prior commit history. Ensure the cleaned tree is complete before forcing.
Before claiming a repo is spec-compliant, verify every skill directory:
| Check | Rule | How to verify |
|---|---|---|
| No README.md in skill dir | "Do NOT create extraneous documentation" | find . -maxdepth 2 -name 'README.md' should only return root/category docs |
Frontmatter has only name + description | "Do not include any other fields" | grep -E '^[a-z-]+:' SKILL.md in frontmatter block |
agents/openai.yaml exists | Recommended by spec for UI metadata | ls agents/openai.yaml in each skill dir |
| Description < 250 chars | Prevents context budget overflow | python3 -c "import re; ... print(len(desc))" |
| SKILL.md < 500 lines | Official recommendation | wc -l SKILL.md |
Folder name == name: field | Required for CLI matching | basename $(dirname SKILL.md) vs frontmatter |
| No duplicate skill copies | Causes 2% context budget warning | `find . -name 'SKILL.md' |
When a SKILL.md exceeds 500 lines, compress without losing functionality:
Move code examples to references/
references/config-example.yamlreferences/commands.md*(See references/config-example.yaml)*Remove redundant explanations
Collapse multi-step sections into bullet lists
Remove stale example artifacts
references/rename-checklist.md — Step-by-step checklist for bulk skill renames