# Skill Library

> Let the agent grow its own toolkit by writing reusable skill modules that subsequent runs can call — compounding capability over time.

- **Category**: Agentic AI
- **Subcategory**: Tool Use & Environment
- **Canonical URL**: https://designpattern.fyi/patterns/skill_library/

---

## Description
**Intent**: Accumulate reusable know-how across runs instead of re-deriving the same solutions from scratch every time.

**Context**: Your long-running agent handles recurring task shapes — weekly competitor reports, periodic data cleans, repeating onboarding workflows. Every run re-derives the same scrape-clean-summarize pipeline from first principles. The runtime supports loading new code modules without restarting the agent.

**Solution**: A directory (e.g., `skills/*.py` or `skills/*.md`) where the agent can write new modules. A loader (`importlib` in Python, dynamic import in JS) makes them callable. A critic gates additions to prevent low-quality skills from landing. Old skills are versioned, never silently overwritten.


## Use Cases
- Patterns of tool use repeat across runs and re-derivation cost is noticeable.
- The agent can write and version reusable modules safely.
- A critic or reviewer gates additions to the library.





## Trade-offs


### Advantages

- Compounding capability over time — the agent gets better at recurring tasks automatically.

- Skills are reviewable and removable, unlike fine-tuned weights.




### Considerations & Drawbacks

- Skill-name collisions and silent shadowing can corrupt the library.

- Library quality decays without periodic review and pruning.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/skill-library/)

