Skip to main content
Glama
README.md
<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

A4.4/5.0

Scored across 10 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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.

Maintenance

ActivityInactive
ResponsivenessSyncing