SkillForge
<p align="center">
<img src="https://img.shields.io/pypi/v/skillforge-mcp?style=for-the-badge&logo=pypi&logoColor=white&label=PyPI" alt="PyPI"/>
<img src="https://img.shields.io/badge/MCP-Server-blueviolet?style=for-the-badge" alt="MCP Server"/>
<img src="https://img.shields.io/badge/python-β₯3.10-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python"/>
<img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="License"/>
<img src="https://img.shields.io/github/stars/CatVinci-Studio/skillForge?style=for-the-badge&logo=github" alt="Stars"/>
</p>
<h1 align="center">π οΈ SkillForge</h1>
<p align="center">
<strong>An MCP server that makes your AI agent learn and evolve β one skill at a time.</strong>
</p>
<p align="center">
<em>Skills are reusable instructions that get better with every conversation.</em>
</p>
<p align="center">
<a href="README_CN.md">π¨π³ δΈζζζ‘£</a> Β· <a href="https://pypi.org/project/skillforge-mcp/">π¦ PyPI</a> Β· <a href="https://github.com/CatVinci-Studio/skillForge/issues">π Issues</a>
</p>
---
## β¨ What is SkillForge?
SkillForge is a **Model Context Protocol (MCP) server** that gives your AI agent a persistent, evolving skill library. Instead of repeating the same corrections and preferences every session, SkillForge captures them as **skills** β structured instructions that the agent loads and follows automatically.
> π‘ Think of it as **muscle memory for your AI** β it learns your conventions once and applies them forever.
### π The Feedback Loop
```
π€ User gives feedback
β
βΌ
π Agent detects improvement signal
β
βΌ
π Triage: reuse / improve / create?
β
βΌ
βοΈ Draft skill following guide + plan
β
βΌ
π‘οΈ Validation gate (reject or pass)
β
βΌ
πΎ Skill saved (auto-backed up)
β
βΌ
β
Next task uses improved skill
```
---
## π Quick Start
### π¦ Installation
```bash
# Install from PyPI (recommended)
pip install skillforge-mcp
# Or with uv
uv pip install skillforge-mcp
```
### β‘ Run the Server
```bash
# Run directly
skillforge
# Or run without installing via uvx
uvx skillforge-mcp
```
### π Connect to Claude Code
Add to your MCP config:
```json
{
"mcpServers": {
"skillforge": {
"command": "uvx",
"args": ["skillforge-mcp"]
}
}
}
```
<details>
<summary>π‘ Alternative: install from source</summary>
```bash
git clone https://github.com/CatVinci-Studio/skillForge.git
cd skillForge
pip install -e .
```
</details>
---
## π§© Architecture
```
src/skillforge/
βββ π server.py # MCP server definition & prompts
βββ π¨ response.py # Response formatting & feedback monitor
βββ π‘οΈ validator.py # Hard validation gates for skill quality
βββ π skill_manager.py # Core CRUD, backup, restore logic
βββ π§ tools/
β βββ π discovery.py # list_skills, get_skill
β βββ βοΈ crud.py # save_skill (with validation), delete_skill
β βββ πΎ backup.py # list_backups, restore_skill
β βββ π triage.py # triage_skill_request
β βββ π§ optimization.py # get_skill_guide, request_skill_optimization
βββ π guide/
βββ skill_writing_guide.md # Best practices for skill authoring
```
### π Runtime Data
SkillForge stores its data in `~/.skillforge/`:
| Directory | Purpose |
|-----------|---------|
| `~/.skillforge/skills/` | π Active skill library |
| `~/.skillforge/backups/` | ποΈ Automatic version history |
> π Override with `SKILLFORGE_SKILLS_DIR` and `SKILLFORGE_BACKUP_DIR` environment variables.
---
## π§ Available Tools
| Tool | Description |
|------|-------------|
| π `list_skills` | List all skills β **mandatory first call** before any task |
| π `get_skill` | Load full skill instructions by name |
| π `triage_skill_request` | Check existing skills before creating/improving β prevents duplication |
| π§ `request_skill_optimization` | Get a structured plan for skill improvement |
| π `get_skill_guide` | Load the skill writing best practices guide |
| βοΈ `save_skill` | Create or update a skill β **validates and rejects if quality is insufficient** |
| ποΈ `delete_skill` | Remove a skill (two-step confirmation, auto-backup) |
| π `list_backups` | View version history for a skill |
| βͺ `restore_skill` | Roll back to a previous version |
| π `get_optimization_history` | View the feedback log that drove skill changes |
---
## π‘οΈ Quality Gates (v0.2.0)
Unlike prompt-based quality control that depends on LLM compliance, SkillForge enforces quality through **hard validation gates** in `save_skill`:
| Check | Type | Rule |
|-------|------|------|
| π Description length | β Error | Must be β₯ 50 characters |
| π Body length | β Error | Must be 3β500 lines |
| π Description β name | β Error | Description must explain, not repeat the name |
| π― Trigger conditions | β οΈ Warning | Should include "when/whenever/use this skill..." |
| π£οΈ Rigid language | β οΈ Warning | Prefer reasoning over "YOU MUST ALWAYS" imperatives |
| π Description too long | β οΈ Warning | Keep under 1000 chars, move details to body |
> π΄ **Errors** block the save β fix them and retry.
> π‘ **Warnings** allow the save but flag areas for improvement.
### π Skill Triage
Before creating a new skill, `triage_skill_request` returns all existing skills so the LLM can decide:
| Decision | Condition | Action |
|----------|-----------|--------|
| **REUSE** | Existing skill covers the need | Load it with `get_skill` |
| **IMPROVE** | Existing skill partially covers it | Optimize with `request_skill_optimization` |
| **CREATE** | No relevant skill exists | Create via `request_skill_optimization` |
---
## π Skill Format
Each skill lives in its own directory as a `SKILL.md` file with YAML frontmatter:
```yaml
---
name: my-skill
description: >
What this skill does and when to trigger it.
Use this skill whenever the user asks for...
Also activate when...
---
# Skill Instructions
Your markdown instructions here...
```
### π·οΈ Frontmatter Fields
| Field | Required | Description |
|-------|----------|-------------|
| `name` | β
| Identifier (`lowercase-with-hyphens`, max 64 chars) |
| `description` | β
| Trigger conditions β WHAT it does + WHEN to use it (β₯ 50 chars) |
| `disable-model-invocation` | β | `true` = only user can invoke |
| `user-invocable` | β | `false` = only LLM can invoke |
| `allowed-tools` | β | Tools allowed without per-use approval |
| `context` | β | `fork` = run in isolated sub-agent |
---
## π§ How Optimization Works
SkillForge continuously monitors conversations for improvement signals:
| Signal | Example | Action |
|--------|---------|--------|
| π΄ **Correction** | "No, don't mock the database" | Update relevant skill |
| π‘ **Preference** | "Always use snake_case" | Create or update skill |
| π΅ **Pattern** | Same structure used 3+ times | Bundle into new skill |
| π’ **Explicit** | "Add this to the review skill" | Direct skill edit |
### π Safety Guarantees
- β
**Auto-backup** before every save and delete
- β
**One-click restore** from any backup timestamp
- β
**Path traversal protection** on all file operations
- β
**Atomic writes** with file locking for optimization logs
- β
**Hard validation gates** β quality enforced at the tool boundary, not by prompt
---
## π Why SkillForge?
| Without SkillForge | With SkillForge |
|---------------------|-----------------|
| π€ Repeat the same corrections every session | π§ Agent remembers and applies automatically |
| π Conventions scattered across docs | π¦ Single source of truth per topic |
| π² Inconsistent agent behavior | β
Deterministic, skill-guided responses |
| π No learning from feedback | π Skills evolve with every interaction |
| π€ Hope the LLM follows quality guidelines | π‘οΈ Hard validation rejects low-quality skills |
---
## π£οΈ Roadmap
- [x] π‘οΈ Hard validation gates for skill quality
- [x] π Skill triage to prevent duplication
- [ ] π Skill sharing & import from remote repositories
- [ ] π Analytics dashboard for skill usage & effectiveness
- [ ] π Cross-skill dependency management
- [ ] π§ͺ Skill testing framework with evaluation harness
- [ ] πͺ Community skill marketplace
---
## π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
---
## π License
This project is licensed under the MIT License β see the [LICENSE](LICENSE) file for details.
---
<p align="center">
<strong>Built with β€οΈ by <a href="https://github.com/CatVinci-Studio">CatVinci Studio</a></strong>
</p>
<p align="center">
<em>Forging better AI, one skill at a time. π¨</em>
</p>
TDQS
Scored across 10 tools
Each tool has a clear, unique purpose. For example, get_skill retrieves full skill content, get_skill_guide provides the writing guide, triage_skill_request analyzes intent, and request_skill_optimization creates an optimization plan. No two tools overlap in function.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., delete_skill, get_optimization_history, list_skills). The naming style is uniform and predictable across the entire set.
With 10 tools, the server covers the full skill management lifecycle without being excessive. Each tool earns its place, and the count feels balanced for the domain.
The tool set covers the complete lifecycle: listing, reading, creating/updating (save), deleting, restoring, triaging, optimizing, and reviewing history/backups. There are no obvious gaps for a skill management system.