Skip to content

Hytidel/skill-refiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

skill-refiner — Rewrite skills into hallucination-proof, step-enforced pipeline specs

License: MIT GitHub stars

English | 中文

Introduction

When we write skills as workflows, common problems emerge:

  • Multi-step tasks should execute serially, but agents self-authorize parallelization or step-skipping.
  • Downstream steps depend on upstream outputs, but upstream steps produce nothing — agents hallucinate results and proceed anyway.
  • Some steps must write intermediate results to files, but agents skip the write and claim completion in chat.

skill-refiner addresses these issues by adopting a prompt-enforced FSM (Finite State Machine) design philosophy. It constrains agent execution into controlled state transitions using three primitives — GATE / BLOCKING / CHECKPOINT — preventing hallucination-driven progress, step-skipping, and mid-task state loss.


This skill has a side benefit: cost savings.

You can first use a capable model (e.g., Claude Opus) to call skill-refiner and rewrite your existing skills, then switch to a weaker model (e.g., Claude Haiku) to execute the rewritten skills. Because the rewritten prompts have stronger constraints, even a weaker model may achieve comparable output quality through better prompt alignment.

The tradeoff: the rewritten SKILL.md becomes longer, consuming more tokens from the weaker model. You can judge whether this optimization is worthwhile through simple experimentation and calculation.

If you find it useful, a Star ⭐ is always appreciated.


📦 Installation

Option 1: CLI (Recommended)

npx skills add Hytidel/skill-refiner

Option 2: Manual

Clone the repo or download the ZIP, then move the ./skills/skill-refiner directory into your agent tool's skills folder:

Tool Skills directory
Claude Code (global) ~/.claude/skills/
Claude Code (project) .claude/skills/
Other tools See your tool's documentation

🚀 Quick Start

After installation, just tell your agent:

refine skill: <skill name or path>

Or:

refine skill: <skill name or path>

You can also invoke the skill explicitly:

/skill-refiner refine the `skill-creator` skill

The agent will automatically back up the original skill, analyze the pipeline structure, rewrite SKILL.md, and wait for your confirmation before finishing.


🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License.


🙏 Acknowledgements

Inspired by the ppt-master skill and its exploration of the prompt-enforced FSM workflow design pattern.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors