Metadata-Version: 2.4
Name: fableforge-agent-skills
Version: 0.1.0
Summary: Skill registry, decomposition, and LoRA building for coding agents
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: peft>=0.7
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: torch>=2.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1; extra == 'dev'
Description-Content-Type: text/markdown

# AgentSkills.org

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/) [![Tests](https://img.shields.io/badge/tests-0-yellow.svg)](tests/)


Skill registry, decomposition, and LoRA building for coding agents.

## Overview

AgentSkills.org provides a framework for extracting, publishing, and building LoRA adapters from recurring skill patterns in agent traces. Think of it as a package manager for agent capabilities.

## Installation

```bash
pip install agent-skills
```

## Quick Start

### Install a Skill

```bash
askill install debug
askill install edit
askill list
```

### Extract Skills from Traces

```bash
askill decompose traces.jsonl --min-occurrences 3
```

### Build LoRA Adapters

```bash
askill build traces.jsonl --base-model Qwen/Qwen2.5-14B --output-dir output/lora
```

## Programmatic Usage

```python
from agent_skills import SkillRegistry, SkillDecomposer
from agent_skills.lora_builder import build_lora

# Install and list skills
registry = SkillRegistry()
registry.install("debug")
skills = registry.list_skills()

# Extract skills from traces
decomposer = SkillDecomposer(min_occurrences=3)
skills = decomposer.extract_skills_from_trace("traces.jsonl")
clusters = decomposer.cluster_skills()

# Build LoRA adapters from skill clusters
for cluster in clusters:
    adapter = build_lora(cluster, base_model="Qwen/Qwen2.5-14B")
    print(f"Built: {adapter.name} with {adapter.num_examples} examples")
```

## Built-in Skills

| Skill | Tools | Description |
|-------|-------|-------------|
| **debug** | read, bash, grep | Diagnose and fix errors in code |
| **edit** | edit, write | Make targeted edits to code files |
| **verify** | bash, read, grep | Run tests and verify correctness |
| **recover** | bash, edit, read, grep | Recover from errors and retry |
| **plan** | question, glob, read | Plan and coordinate multi-step tasks |
| **bash** | bash | Execute shell commands and scripts |

## Skill YAML Format

```yaml
name: debug
version: "1.0.0"
description: "Diagnose and fix errors in code"
category: "core"
tools:
  - read
  - bash
  - grep
triggers:
  - "fix the bug"
  - "debug this error"
author: "your-name"
license: "MIT"
tags:
  - debugging
  - error-recovery
```

## License

MIT

## Ecosystem

Part of the [FableForge](../) ecosystem — 21 open-source projects built from 210K real agent traces:

| Project | Description |
| --- | --- |
| **[Anvil](../anvil)** | Self-verified coding agent |
| **[VerifyLoop](../verifyloop)** | Plan→Execute→Verify→Recover framework |
| **[ErrorRecovery](../error-recovery)** | Self-healing middleware (3,725 error patterns) |
| **[FableForge-14B](../fableforge-14b)** | The fine-tuned 14B model (4-stage training) |
| **[ShellWhisperer](../shell-whisperer)** | 1.5B edge agent (phone/RPi, 50ms) |
| **[ReasonCritic](../reason-critic)** | Verification model (130 benchmark tasks) |
| **[TraceCompiler](../trace-compiler)** | Compile traces → LoRA skills |
| **[AgentRuntime](../agent-runtime)** | Persistent agent daemon (systemd for AI) |
| **[AgentSwarm](../agent-swarm)** | Multi-agent from real trace transitions |
| **[AgentTelemetry](../agent-telemetry)** | Datadog for agents (token tracking, costs) |
| **[BenchAgent](../bench-agent)** | HumanEval for tool-use (107 tasks) |
| **[AgentDev](../agent-dev)** | VSCode extension with verification |
| **[TraceViz](../trace-viz)** | Trace replay visualizer (Next.js) |
| **[AgentSkills](../agent-skills)** | npm for agent behaviors |
| **[AgentCurriculum](../agent-curriculum)** | 5-stage progressive training |
| **[AgentFuzzer](../agent-fuzzer)** | Adversarial testing for agents |
| **[AgentConstitution](../agent-constitution)** | Safety guardrails from traces |
| **[CostOptimizer](../cost-optimizer)** | Token cost reduction (50-80%) |
| **[AgentProfiler](../agent-profiler)** | Behavioral fingerprinting |
| **[TrajectoryDistiller](../trajectory-distiller)** | Trace→training data pipeline |
| **[Fable5-Dataset](../fable5-dataset)** | HuggingFace dataset release |
