Skill Improve

Read the skill name from the first argument. If missing, output usage and stop:

Skill Improve:

Automated Skill Enhancement for Happycapy Skills

What Is This

Skill Improve (skill-improve) is a command-line skill for the Happycapy Skills platform designed to automate the process of improving other skills through an iterative test-fix-retest loop. It operates on a specific skill, running static and category-specific tests, proposing targeted fixes for failed checks, and deciding whether to keep or revert changes based on test results. The skill leverages systematic checks to help maintain and enhance code quality and adherence to platform standards.

The improvement process is guided by the following phases:

  1. Argument parsing and validation
  2. Baseline static and category testing
  3. Automated fixes based on test failures
  4. Retesting and scoring
  5. Decision to keep or revert changes

The skill can be invoked directly by users with the required skill name as an argument, and it is designed to be both user-friendly and robust in handling missing or incorrect inputs.

Source: Happycapy Skill Improve on GitHub


Why Use It

Maintaining a growing set of skills on the Happycapy platform can be challenging, especially as standards evolve and new checks are introduced. Manual review is time-consuming and prone to inconsistency. Skill Improve addresses these pain points by:

  • Automating Quality Improvements: It systematically detects and suggests fixes for common issues, reducing manual overhead.
  • Ensuring Consistency: By using static and category-based checklists, it aligns skills with established best practices and platform guidelines.
  • Safe Iterative Enhancement: Changes are only kept if they demonstrably improve test results, minimizing the risk of regressions.
  • Transparent Reporting: It provides clear, detailed feedback on failures, warnings, and the impact of proposed fixes.

This makes Skill Improve invaluable for both skill maintainers and platform administrators aiming for a high-quality, compliant skill repository.


How to Use It

Skill Improve is invoked through the platform’s command-line interface. It requires the target skill’s name as its argument. Here is the typical workflow:

1. Parse Argument and

Validate

You must specify a skill name. If you do not, the skill will respond with a usage message and halt:

Usage: /skill-improve [skill-name]
Example: /skill-improve tech-debt

It then checks for the existence of .claude/skills/[skill-name]/SKILL.md. If not found:

Skill '[skill-name]' not found.

2. Baseline Static

Testing

Skill Improve runs the static test suite:

/skill-test static [skill-name]

It records and displays the baseline number of failures and warnings, and lists the failed checks:

Static baseline:   2 failures, 1 warning
Failing: Check 4 (no ask-before-write), Check 5 (no handoff)

If there are zero failures and warnings, it proceeds to check the skill’s category.

2b. Category Baseline

If the skill’s SKILL.md contains a category: field, Skill Improve checks this against the CCGS Skill Testing Framework/catalog.yaml and runs category-specific tests:

/skill-test category [skill-name]

It reports category-specific failures and warnings. If category: is missing:

Category: not yet assigned - skipping category checks.

3. Propose and Apply

Fixes

Skill Improve analyzes which checks failed and proposes targeted code or documentation changes to resolve them. It rewrites the skill’s code or metadata, saving a new candidate version for retesting.

4. Retest and

Score

The skill reruns the static and, if relevant, category tests on the improved version:

/skill-test static [skill-name]
/skill-test category [skill-name]

It records the new failure and warning counts.

5. Keep or

Revert

  • If the improved version has a better or equal score (fewer or equal failures/warnings), the changes are kept.
  • If the score worsens, the skill reverts to the baseline version.

All outcomes are reported to the user, ensuring transparency and auditability.

Example Session

/skill-improve tech-debt
Static baseline:   1 failure, 0 warnings
Failing: Check 3 (missing output validation)

[Fixes applied...]

Static retest:     0 failures, 0 warnings
Category retest:   0 failures, 0 warnings
Result: Improvement kept.

When to Use It

Use Skill Improve in the following scenarios:

  • Routine Skill Maintenance: Regularly run it to ensure all skills meet current quality and category requirements.
  • After Major Edits: Quickly check and enhance skills following substantial changes or refactoring.
  • Before Submission or Publishing: Run as a final check to ensure maximum compliance and quality.
  • Bulk Quality Drives: Automate improvement across multiple skills during platform-wide quality initiatives.

Important Notes

  • Skill Name Is Mandatory: The command requires a valid skill name as the first argument.
  • Non-Destructive: Skill Improve only keeps improvements if they pass or improve all relevant tests, otherwise it reverts changes.
  • Category Sensitivity: Category-specific checks depend on the presence and correctness of the category: field in SKILL.md.
  • Tooling: The skill is permitted to use tools such as Read, Glob, Grep, Write, and Bash for its operations.
  • Transparency: All actions, test results, and decisions (including reasons for skipping or reverting) are reported to the user.

Skill Improve is a powerful automation tool for maintaining skill quality and compliance, ensuring a robust and up-to-date Happycapy Skills ecosystem.