Skip to content

0Dy6h/Opencode-skill-improver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

README.md

OpenCode Skill Improver

A systematic workflow for evaluating, proposing, and safely implementing improvements to existing OpenCode skills.

Overview

This skill provides an end-to-end workflow for improving OpenCode skills:

Discover skills → Evaluate quality → Propose improvements → Implement safely → Document changes

It integrates with skill-quality-reviewer for scoring and skill-development for best practices.

Features

  • 🔍 Comprehensive Evaluation: 5-dimension scoring system for skill quality assessment
  • 📊 Detailed Reports: Generate quality reports and improvement plans
  • 🛡️ Safe Implementation: Pre-flight checks, sequential execution, per-change validation
  • 📝 Automatic Documentation: Generate improvement logs with user-specified locations
  • 🔄 Rollback Support: Emergency rollback procedures for failed improvements

Installation

Option 1: Manual Installation

  1. Clone this repository:
git clone https://github.com/yourusername/opencode-skill-improver.git
  1. Copy to your OpenCode skills directory:
cp -r opencode-skill-improver ~/.config/opencode/skills/skill-improver

Option 2: Using OpenCode CLI

opencode skills install skill-improver

Usage

Basic Usage

  1. Start OpenCode in a project directory
  2. Ask to improve skills:
    • "Improve my skills"
    • "Evaluate all skills"
    • "Fix skill issues"
    • "Review and improve skills"

Trigger Phrases

This skill activates when you say:

  • "improve skills"
  • "evaluate all skills"
  • "fix skill issues"
  • "review and improve skills"
  • "apply skill improvements"

Evaluation Framework

The skill evaluates each skill across 5 dimensions:

Dimension Weight Description
Content Depth 30% Comprehensiveness and technical detail
Trigger Quality 20% Effectiveness of triggering conditions
Structure & Organization 20% Progressive disclosure and hierarchy
Practical Utility 15% Actionability and real-world usefulness
Safety & Correctness 15% Security and correctness of patterns

Scoring Formula

Overall = (Content × 0.30) + (Trigger × 0.20) + (Structure × 0.20) + 
          (Utility × 0.15) + (Safety × 0.15)

Grade Mapping

Score Grade Status
90-100 A Excellent, exemplary
80-89 B Good, minor improvements
70-79 C Adequate, needs work
60-69 D Weak, significant issues
<60 F Failing, requires rewrite

Workflow

Phase 1: Discovery & Evaluation

  1. List all available skills
  2. Read each SKILL.md file
  3. Score each skill using the 5-dimension framework
  4. Identify improvement candidates (skills scoring below 80)

Phase 2: Improvement Proposal

For each identified candidate:

  1. Diagnose specific issues
  2. Propose concrete solutions
  3. Present proposal to user for confirmation

Phase 3: Safe Implementation

Apply approved improvements with safety checks:

  1. Pre-flight checks (backup, validation)
  2. Sequential implementation
  3. Per-change validation
  4. Rollback on error

Phase 4: Documentation

  1. Ask user where to save improvement log
  2. Generate detailed improvement documentation
  3. Append to existing logs with date separation

Safety Features

Critical Rules

  1. Always read before writing — Never edit a file without reading it first
  2. Sequential execution — Apply changes one at a time, not in parallel
  3. Validate after each change — Check file integrity immediately
  4. Never delete without backup — Move to deprecated/ if removal needed
  5. Maintain change log — Document what changed and why

Error Handling

Error Type Response
File not found Stop, report to user
YAML parse error Rollback, report
Broken reference Fix reference or remove link
Unexpected content Rollback, ask user

File Structure

skill-improver/
├── SKILL.md                           # Main skill definition
├── examples/
│   ├── improvement-log-example.md     # Improvement log template
│   ├── improvement-plan-example.md    # Improvement plan template
│   └── update-report-example.md       # Update report template
├── references/
│   ├── error-handling.md              # Error handling procedures
│   ├── improvement-patterns.md        # Common improvement patterns
│   ├── merge-strategies.md            # Content merge strategies
│   ├── plan-format.md                 # Plan formatting guidelines
│   ├── safety-guidelines.md           # Safety procedures
│   ├── scoring-rubric.md              # Detailed scoring criteria
│   └── supported-updates.md           # Supported update types
└── scripts/
    ├── backup-skill.sh                # Backup script
    └── verify-update.sh               # Update verification script

Examples

Example 1: Evaluate All Skills

User: "Evaluate all my skills and show me which ones need improvement"

Claude will:
1. List all skills in ~/.config/opencode/skills/
2. Score each skill on 5 dimensions
3. Generate a summary table
4. Identify skills scoring below 80
5. Present improvement candidates

Example 2: Improve a Specific Skill

User: "Improve the daily-coding skill"

Claude will:
1. Read the current SKILL.md
2. Evaluate its quality
3. Diagnose issues
4. Propose specific improvements
5. Apply changes with your approval
6. Generate improvement log

Related Skills

  • skill-quality-reviewer — Generate quality reports and improvement plans
  • skill-development — Best practices for creating new skills
  • code-review-excellence — Effective code review practices

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenCode community for the skill development framework
  • Contributors who have helped improve this skill

Version History

2.0.0 (Current)

  • Added comprehensive 5-dimension evaluation framework
  • Implemented safe implementation workflow
  • Added user-specified log location feature
  • Enhanced error handling and rollback procedures

1.0.0

  • Initial release
  • Basic skill improvement workflow
  • Simple evaluation criteria

Support

If you encounter any issues or have questions:

  1. Check the documentation
  2. Search existing issues
  3. Create a new issue if needed

Made with ❤️ for the OpenCode community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors