Agent skill
so
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/so
SKILL.md
Skill Optimizer
Analyze existing skills against best practices and apply targeted improvements.
Complements /skill-creator (creates new skills) — this skill improves existing ones.
Usage
/so [skill-name]- Analyze a specific skill (e.g.,/so hookify)/so [path]- Analyze skill at path (e.g.,/so .claude/skills/hookify)/so list- Show all skills with summary stats, then pick one to analyze
Parse $ARGUMENTS to determine the target skill.
GATE 0: Resolve Target Skill
If $ARGUMENTS == "list":
- Glob for
.claude/skills/*/SKILL.md - For each file, extract only the YAML frontmatter (read first 20 lines to get
nameanddescription) - Present summary table:
| # | Skill | Description (first 80 chars) |
|---|
- AskUserQuestion: "Which skill to analyze?" with top skills as options
If $ARGUMENTS is a skill name:
Resolve to .claude/skills/$ARGUMENTS/SKILL.md. Verify file exists.
If $ARGUMENTS is a path:
Use the path directly. Verify SKILL.md exists at that location.
If $ARGUMENTS is empty:
AskUserQuestion: "Which skill to analyze? Enter the skill name (e.g., hookify, ct, sr)."
GATE 1: Read & Analyze
Step 1: Inventory
- Read the target SKILL.md completely
- Glob for bundled resources:
[skill-dir]/scripts/*[skill-dir]/references/*[skill-dir]/assets/*- Any other files in the skill directory
- Read key reference files if present (to check for orphaned links and content quality)
Step 2: Score 7 Dimensions
Read references/evaluation-rubric.md for detailed criteria.
Score each dimension 0-10:
| # | Dimension | Focus |
|---|---|---|
| 1 | Frontmatter Quality | name, description, triggers, argument-hint, allowed-tools |
| 2 | Structure & Organization | sections, flow, GATE/STEP patterns, length |
| 3 | Instruction Clarity | imperative voice, actionable steps, error handling, examples |
| 4 | Token Efficiency | word count, progressive disclosure, redundancy |
| 5 | Trigger Precision | specific phrases, breadth, conflicts with other skills |
| 6 | Composability | delegation, related skills, AskUserQuestion usage |
| 7 | Bundled Resources | scripts/references/assets categorization, orphans |
Mark dimension 7 as N/A if the skill genuinely has no need for bundled resources.
Step 3: Present Report
Format:
## Skill Analysis: [skill-name]
**Overall Score: X.X/10** ([rating])
### Scores
| Dimension | Score | Notes |
|-----------|-------|-------|
| ... | .../10 | ... |
### Strengths (top 3)
1. ...
### Issues (top 3, prioritized)
1. [CRITICAL/HIGH/MEDIUM] ...
STOP — present the report and wait for user response before proceeding.
GATE 2: Research (optional)
Scan the SKILL.md content for mentions of:
- Frameworks/libraries (React Native, NestJS, Prisma, Expo, etc.)
- External APIs (Linear, GitHub, OpenAI, Supabase, etc.)
- CLI tools (gh, npm, docker, railway, etc.)
- Domain methodologies (DDD, TDD, Clean Architecture, etc.)
If references found:
Present the exact list of detected keywords to the user first:
AskUserQuestion: "Detected references to: [keyword1, keyword2, keyword3]. Research latest best practices for these? This will query EXA (external search)."
Options:
- "Yes, research all" - query EXA for each keyword
- "Select which to research" - let user pick specific keywords
- "Skip research" - proceed to recommendations
If user approves:
For each approved keyword:
get_code_context_exawith query: "[keyword] best practices patterns 2026"- Compare findings with skill content
- Flag discrepancies or outdated patterns
- Add research findings to the report
If no external references detected or user skips:
Proceed directly to GATE 3.
GATE 3: Recommendations & Apply
Step 1: Generate Recommendations
Based on the analysis (and research if done), create prioritized list:
- CRITICAL — Blocking issues: missing/broken frontmatter, broken resource references, security issues
- HIGH — Significant improvements: vague triggers, missing error handling, >5k words without progressive disclosure
- MEDIUM — Polish: voice inconsistency, structure optimization, better examples
Each recommendation includes:
- What to change (specific section/line)
- Why (brief rationale)
- Proposed fix (concrete text or restructuring)
Step 2: User Selection
AskUserQuestion (multiSelect): "Which improvements to apply?"
List all CRITICAL and HIGH recommendations as options. MEDIUM items listed but marked as optional.
Step 3: Apply Changes
For each selected improvement:
- Show the proposed change (old vs new)
- Apply using Edit tool
- Confirm each change
Step 4: Summary
After all changes applied:
- List all modifications made
- Show updated scores for affected dimensions
- Suggest re-running
/so [skill-name]after testing to verify improvements
Conflict Detection
When evaluating Trigger Precision (dimension 5), check for conflicts:
- Glob for all
.claude/skills/*/SKILL.md - Extract descriptions from other skills
- Compare trigger phrases with the analyzed skill
- Flag overlapping triggers that could cause mis-activation
Report format:
Potential trigger conflicts:
- [skill-a] and [skill-b]: both trigger on "create project"
Quick Reference: Priority Rules
- Frontmatter issues are always CRITICAL (skill won't load correctly)
- Token efficiency >5k words is HIGH (degrades performance)
- Missing error handling is HIGH for workflow skills, MEDIUM for reference skills
- Voice inconsistency is always MEDIUM (cosmetic but important)
- Bundled resource issues are HIGH if files are orphaned, MEDIUM if just mis-categorized
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?