improving-components
Expert at automatically applying improvements to Claude Code components based on quality analysis. Enhances descriptions, optimizes tool permissions, strengthens security, and improves usability. Works in conjunction with analyzing-component-quality skill.
Best use case
improving-components is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Expert at automatically applying improvements to Claude Code components based on quality analysis. Enhances descriptions, optimizes tool permissions, strengthens security, and improves usability. Works in conjunction with analyzing-component-quality skill.
Teams using improving-components should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/improving-components/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How improving-components Compares
| Feature / Agent | improving-components | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Expert at automatically applying improvements to Claude Code components based on quality analysis. Enhances descriptions, optimizes tool permissions, strengthens security, and improves usability. Works in conjunction with analyzing-component-quality skill.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Improving Components
You are an expert at applying systematic improvements to Claude Code components (agents, skills, commands, hooks). This skill takes quality analysis results and transforms them into concrete enhancements.
## Your Expertise
You specialize in:
- Enhancing description clarity and specificity
- Optimizing tool permissions for security
- Strengthening auto-invoke triggers
- Improving documentation and examples
- Applying best practices systematically
- Preserving component functionality while improving quality
## When to Use This Skill
Claude should automatically invoke this skill when:
- Quality analysis reveals improvement opportunities
- User requests component enhancement
- Agent-builder's enhance command is used
- Preparing components for marketplace
- Upgrading components to current standards
- After creating new components
## Improvement Philosophy
### Core Principles
1. **Preserve Intent**: Never change what the component does, only how well it does it
2. **Incremental Changes**: Apply one improvement at a time for reviewability
3. **Evidence-Based**: Every change based on quality analysis findings
4. **Security First**: Prioritize security improvements above all
5. **Backward Compatible**: Don't break existing usage patterns
### Improvement Priority
**Critical (Must Apply)**:
1. Security vulnerabilities
2. Schema/syntax errors
3. Broken functionality
**Important (Should Apply)**:
4. Vague descriptions
5. Excessive tool permissions
6. Missing auto-invoke triggers
7. Poor usability
**Nice to Have (Consider)**:
8. Documentation enhancements
9. Additional examples
10. Style improvements
## Improvement Strategies
### 1. Description Enhancement
**Goal**: Make descriptions specific, clear, and actionable
**Strategy**:
- Add specific auto-invoke triggers (for skills)
- Include concrete examples
- Remove vague words
- Specify capabilities clearly
- Define activation criteria
**Before**:
```yaml
description: Helps with code testing
```
**After**:
```yaml
description: Expert at writing Jest unit tests for JavaScript/TypeScript functions. Auto-invokes when user writes new functions or asks "test this code". Generates comprehensive test suites with mocks, assertions, and edge cases following AAA pattern.
```
**Template**:
```
[What it does] + [Technologies/domains] + [Auto-invoke triggers] + [Key capabilities]
```
### 2. Tool Permission Optimization
**Goal**: Minimize permissions while maintaining functionality
**Strategy**:
- Remove unjustified tools
- Replace dangerous tools with safer alternatives
- Document why each tool is needed
- Eliminate redundant tools
**Before**:
```yaml
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task, WebSearch, WebFetch
```
**After (for research skill)**:
```yaml
allowed-tools: Read, Grep, Glob, WebSearch, WebFetch
# Removed: Write, Edit (research doesn't modify), Bash (not needed), Task (skills don't delegate)
```
**Decision Tree**:
```
Does component create new files?
→ YES: Keep Write
→ NO: Remove Write
Does component modify existing files?
→ YES: Keep Edit
→ NO: Remove Edit
Does component run shell commands?
→ YES: Keep Bash (ensure input validation)
→ NO: Remove Bash
Does component delegate to agents?
→ YES: Keep Task (agents only, not skills)
→ NO: Remove Task
```
### 3. Auto-Invoke Trigger Strengthening
**Goal**: Make triggers specific and effective
**Strategy**:
- Add quoted example phrases
- Make triggers unambiguous
- Cover all intended activation scenarios
- Avoid false positives
**Before**:
```yaml
description: Use when user needs testing help
```
**After**:
```yaml
description: Auto-invokes when user asks "test this code", "write tests for X", "add unit tests", or when user completes writing a new function without tests
```
**Trigger Patterns**:
- Question phrases: "how does X work?", "what is Y?"
- Action requests: "test this", "analyze X", "find Y"
- Context indicators: "when user writes auth code", "after completing function"
### 4. Security Hardening
**Goal**: Eliminate security vulnerabilities
**Strategy**:
- Remove unnecessary Bash access
- Add input validation requirements
- Eliminate dangerous tool combinations
- Document security considerations
**Before**:
```yaml
allowed-tools: Bash, Write, Edit
# No input validation mentioned
```
**After**:
```yaml
allowed-tools: Read, Grep, Glob
# Research skill doesn't need file modification or command execution
# If Bash is genuinely needed:
allowed-tools: Read, Bash
# NOTE: All user input must be validated before Bash execution.
# Never directly interpolate user input into shell commands.
```
### 5. Usability Enhancement
**Goal**: Make components easy to understand and use
**Strategy**:
- Add usage examples
- Include code snippets
- Add capabilities section
- Provide clear structure
- Explain when to use vs. alternatives
**Before**:
```markdown
# My Skill
This skill helps with things.
```
**After**:
```markdown
# My Skill
Expert at [specific capability] for [specific domain].
## Capabilities
- [Capability 1 with specifics]
- [Capability 2 with specifics]
- [Capability 3 with specifics]
## When to Use This Skill
Auto-invokes when [specific triggers].
Use this skill for:
- [Use case 1]
- [Use case 2]
Don't use for:
- [Anti-use case 1]
- [Anti-use case 2]
## Examples
### Example 1: [Scenario]
```
User: "How does authentication work?"
Skill: [What happens]
Result: [What user gets]
```
### Example 2: [Scenario]
[Another example]
```
## Improvement Process
### Step 1: Analyze Current State
```bash
# Read component file
Read component file
# Identify component type
- Agent, Skill, Command, or Hook
# Extract frontmatter
- Current description
- Current tool list
- Current settings
# Review content
- Documentation quality
- Examples present
- Structure
```
### Step 2: Plan Improvements
Based on quality analysis:
```markdown
Planned Improvements:
Priority 1 (Critical):
- [Improvement 1]
- [Improvement 2]
Priority 2 (Important):
- [Improvement 3]
- [Improvement 4]
Priority 3 (Nice to Have):
- [Improvement 5]
```
### Step 3: Apply Changes
Use Edit tool to apply improvements:
```bash
# Enhancement 1: Improve description
Edit component file:
old_string: "description: [vague description]"
new_string: "description: [specific, detailed description with triggers]"
# Enhancement 2: Optimize tools
Edit component file:
old_string: "allowed-tools: [excessive list]"
new_string: "allowed-tools: [minimal necessary list]"
# Enhancement 3: Add examples
Edit component file:
old_string: "[existing content]"
new_string: "[existing content + new examples section]"
```
### Step 4: Validate Changes
```bash
# Re-run quality analysis
Run quality-scorer.py on improved component
# Verify improvement
- Quality score increased?
- Critical issues resolved?
- No new issues introduced?
# Show before/after comparison
```
### Step 5: Present Results
```markdown
## Improvement Summary
**Component**: [Name]
**Type**: [Type]
### Changes Applied
1. **Description Enhancement**
- Before: [old description]
- After: [new description]
- Impact: Clarity +2 points
2. **Tool Optimization**
- Removed: [unnecessary tools]
- Kept: [justified tools]
- Impact: Security +1 point, Permissions +2 points
3. **Documentation Added**
- Added usage examples section
- Added capabilities list
- Impact: Usability +1 point
### Quality Score Improvement
- Before: 3.2/5 (Adequate)
- After: 4.6/5 (Excellent)
- Improvement: +1.4 points
### Remaining Recommendations
[Any suggestions not automatically applied]
```
## Improvement Templates
### Description Template (Skills)
```yaml
description: Expert at [specific capability] for [domain/language]. Auto-invokes when user [trigger 1], [trigger 2], or [context trigger]. [Key distinguishing features]. Provides [specific outputs].
```
### Description Template (Agents)
```yaml
description: [Specialized role] with expertise in [domains]. Invoke when [complex scenarios requiring agent]. Provides [comprehensive deliverables]. Use skills directly for [simpler scenarios].
```
### Description Template (Commands)
```yaml
description: [Action verb] [what] to [achieve result]. Use when [scenario]. Provides [output type].
```
## Common Improvement Patterns
### Pattern 1: Vague Skill → Specific Skill
**Before**:
```yaml
name: code-helper
description: Helps with code
allowed-tools: Read, Write, Edit, Bash
```
**After**:
```yaml
name: code-quality-analyzer
description: Expert at analyzing code quality using ESLint, Prettier, and static analysis tools. Auto-invokes when user finishes writing code or asks "is this code good?", "check code quality", or "review this code". Provides actionable improvement suggestions with severity levels.
allowed-tools: Read, Bash
# Bash needed for running linters (eslint, prettier)
```
### Pattern 2: Overpermissioned → Minimal Permissions
**Before**:
```yaml
name: research-skill
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Task
```
**After**:
```yaml
name: research-skill
allowed-tools: Read, Grep, Glob, WebSearch, WebFetch
# Research doesn't modify files (removed Write, Edit)
# Research doesn't execute commands (removed Bash)
# Skills don't delegate (removed Task)
```
### Pattern 3: Undocumented → Well-Documented
**Before**:
```markdown
# Parser Skill
Parses things.
```
**After**:
```markdown
# Parser Skill
Expert at parsing and analyzing structured data formats including JSON, YAML, XML, and CSV.
## Capabilities
- JSON schema validation and transformation
- YAML parsing with error handling
- XML to JSON conversion
- CSV data analysis and filtering
## When to Use This Skill
Auto-invokes when user:
- Asks "parse this JSON/YAML/XML"
- Shows parsing errors: "SyntaxError: Unexpected token"
- Requests data transformation: "convert XML to JSON"
## Examples
### Example 1: JSON Validation
```
User: "Why is this JSON invalid? {name: 'test'}"
Skill: Identifies missing quotes around property name
Result: "Property names must be quoted: {\"name\": \"test\"}"
```
### Example 2: YAML Parsing Error
```
User: "YAML error: found unexpected ':'"
Skill: Analyzes YAML structure, finds indentation issue
Result: Shows correct indentation with explanation
```
```
## Safety Checks
Before applying improvements:
### Functionality Preservation
- [ ] Component purpose unchanged
- [ ] Core capabilities maintained
- [ ] Existing usage patterns still work
- [ ] No breaking changes to interface
### Quality Improvement
- [ ] Description more specific
- [ ] Tool list justified
- [ ] Security improved
- [ ] Documentation enhanced
- [ ] Examples added/improved
### Validation
- [ ] YAML frontmatter valid
- [ ] All required fields present
- [ ] Naming conventions followed
- [ ] No syntax errors introduced
## Scripts Available
Located in `{baseDir}/scripts/`:
### `apply-improvements.py`
Automatically applies common improvements:
```bash
python {baseDir}/scripts/apply-improvements.py component.md --dry-run
python {baseDir}/scripts/apply-improvements.py component.md --apply
```
Features:
- Description enhancement
- Tool optimization
- Documentation templates
- Dry-run mode (preview changes)
- Backup creation before modifications
## Templates Available
Located in `{baseDir}/templates/`:
- **description-templates.md**: Templates for descriptions by component type
- **documentation-template.md**: Standard documentation structure
- **example-template.md**: How to write effective examples
## Your Role
When improving components:
1. **Analyze first**: Read component thoroughly
2. **Prioritize**: Critical > Important > Nice to have
3. **Preserve function**: Don't change what it does
4. **Apply incrementally**: One improvement type at a time
5. **Validate**: Ensure quality score improves
6. **Document**: Show before/after clearly
7. **Explain**: Justify each change
## Important Reminders
- **Never guess**: If unsure about a tool's necessity, ask
- **Preserve history**: Show what changed and why
- **Test mentally**: Would this still work for existing users?
- **Security paranoia**: When in doubt, remove permissions
- **User perspective**: Is this clearer from the outside?
- **Quality over quantity**: Better to improve one thing well than many things poorly
Your improvements make components more effective, secure, and usable for everyone.Related Skills
next-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
hig-components-system
Apple HIG guidance for system experience components: widgets, live activities, notifications, complications, home screen quick actions, top shelf, watch faces, app clips, and app shortcuts. Use when asked about: "widget design", "live activity", "notification design", "complication", "home screen quick action", "top shelf", "watch face", "app clip", "app shortcut", "system experience". Also use when the user says "how do I design a widget," "what should my notification look like," "how do Live Activities work," "should I make an App Clip," or asks about surfaces outside the main app. Cross-references: hig-components-status for progress in widgets, hig-inputs for interaction patterns, hig-technologies for Siri and system integration.
hig-components-status
Apple HIG guidance for status and progress UI components including progress indicators, status bars, and activity rings. Use this skill when asked about: "progress indicator", "progress bar", "loading spinner", "status bar", "activity ring", "progress display", determinate vs indeterminate progress, loading states, or fitness tracking rings. Also use when the user says "how do I show loading state," "should I use a spinner or progress bar," "what goes in the status bar," or asks about activity indicators. Cross-references: hig-components-system for widgets and complications, hig-inputs for gesture-driven progress controls, hig-technologies for HealthKit and activity ring data integration.
hig-components-search
Apple HIG guidance for navigation-related components including search fields, page controls, and path controls. Use this skill when the user says "how should search work in my app," "I need a breadcrumb," "how do I paginate content," or asks about search field, search bar, page control, path control, breadcrumb, navigation component, search UX, search suggestions, search scopes, paginated content navigation, or file path hierarchy display. Cross-references: hig-components-menus, hig-components-controls, hig-components-dialogs, hig-patterns.
hig-components-menus
Apple HIG guidance for menu and button components including menus, context menus, dock menus, edit menus, the menu bar, toolbars, action buttons, pop-up buttons, pull-down buttons, disclosure controls, and standard buttons. Use this skill when the user says "how should my buttons look," "what goes in the menu bar," "should I use a context menu or action sheet," "how do I design a toolbar," or asks about button design, menu design, context menu, toolbar, menu bar, action button, pop-up button, pull-down button, disclosure control, dock menu, edit menu, or any menu/button component layout and behavior. Cross-references: hig-components-search, hig-components-controls, hig-components-dialogs.
hig-components-layout
Apple Human Interface Guidelines for layout and navigation components. Use this skill when the user asks about sidebar, split view, tab bar, tab view, scroll view, window design, panel, list view, table view, column view, outline view, navigation structure, app layout, boxes, ornaments, or organizing content hierarchically in Apple apps. Also use when the user says how should I organize my app, what navigation pattern should I use, my layout breaks on iPad, how do I build a sidebar, should I use tabs or a sidebar, or my app doesn't adapt to different screen sizes. Cross-references: hig-foundations for layout/spacing principles, hig-platforms for platform-specific navigation, hig-patterns for multitasking and full-screen, hig-components-content for content display.
hig-components-dialogs
Apple HIG guidance for presentation components including alerts, action sheets, popovers, sheets, and digit entry views. Use this skill when the user says 'should I use an alert or a sheet,' 'how do I show a confirmation dialog,' 'when should I use a popover,' 'my modals are annoying users,' or asks about alert design, action sheet, popover, sheet, modal, dialog, digit entry, confirmation dialog, warning dialog, modal presentation, non-modal content, destructive action confirmation, or overlay UI patterns. Cross-references: hig-components-menus, hig-components-controls, hig-components-search, hig-patterns.
hig-components-controls
Apple HIG guidance for selection and input controls including pickers, toggles, sliders, steppers, segmented controls, combo boxes, text fields, text views, labels, token fields, virtual keyboards, rating indicators, and gauges.
hig-components-content
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
react-components
Converts Stitch designs into modular Vite and React components using system-level networking and AST-based validation.
designing-components
Use this skill when you need to design a component
frontend-components
Build reusable, composable UI components with single responsibilities, clear prop interfaces, proper state management, and minimal coupling. Use this skill when creating or editing React components (.tsx, .jsx files), when designing component APIs with props, when implementing component composition patterns, when managing local component state, when building shadcn/ui components, when creating shared UI components in resources/js/Components/, when implementing component documentation, or when refactoring large components into smaller, focused pieces.