# Write a skill once. Load it into any agent.

A skill is one Markdown file. The package reads it and hands each runtime exactly what it expects: a system prompt, an assistant config, a prompt template, a rule file.

```sh
npm install universal-agent-skills
```

## One file in, the right shape out (adapters)

Every adapter reads the same file, so there is nothing to keep in sync.

- **Claude:** `forClaude(name)`. Pass system to anthropic.messages.create().
- **OpenAI:** `forOpenAI(name)`. Spread into openai.beta.assistants.create().
- **LangChain:** `forLangChain(name)`. Give template to PromptTemplate.fromTemplate().
- **CrewAI:** `forCrewAI(name)`. Maps onto a CrewAI Agent.
- **AutoGen:** `forAutoGen(name)`. Pass to AssistantAgent().
- **Cursor:** `forCursor(name)`. Write to .cursor/rules/.
- **AGENTS.md:** `forAgentsMd(name)`. Append to your project's AGENTS.md.
- **Stitch:** `forStitchPrompt(name)`. Paste into the prompt box.
- **Generic:** `forGeneric(name)`. For your own runtime or tool registry.

## Drop it into the code you already have (usage)

Each adapter is one function call. Python frameworks read the same Markdown files straight from `node_modules`.

### Claude

`agent.js`

```js
import Anthropic from "@anthropic-ai/sdk";
import { forClaude } from "universal-agent-skills";

const anthropic = new Anthropic();
const { system } = forClaude("super-ui");

const msg = await anthropic.messages.create({
  model: "claude-opus-5-5",
  max_tokens: 4096,
  system,
  messages: [{ role: "user", content: "Review this dashboard screen." }],
});
```

### OpenAI

`assistant.js`

```js
import OpenAI from "openai";
import { forOpenAI } from "universal-agent-skills";

const openai = new OpenAI();
const assistant = await openai.beta.assistants.create({
  model: "gpt-4o",
  ...forOpenAI("super-ui"), // { name, description, instructions }
});
```

### LangChain

`chain.js`

```js
import { PromptTemplate } from "@langchain/core/prompts";
import { forLangChain } from "universal-agent-skills";

// Each declared input becomes a {placeholder} in the template.
const { template, inputVariables } = forLangChain("super-ui");
const prompt = PromptTemplate.fromTemplate(template);
```

### CrewAI & AutoGen

`agents.py`

```py
# Build a catalog once from Node:
#   node -e "import('universal-agent-skills').then(m =>
#     console.log(JSON.stringify(m.loadAllSkills())))" > skills.json
import json
from crewai import Agent
from autogen import AssistantAgent

skills = {s["name"]: s for s in json.load(open("skills.json"))}
skill = skills["super-ui"]

crew_agent = Agent(role=skill["name"], goal=skill["description"],
                   backstory=skill["instructions"])
autogen_agent = AssistantAgent(name=skill["name"],
                               system_message=skill["instructions"])
```

### Cursor & AGENTS.md

`terminal`

```sh
# Write Cursor, AGENTS.md and Stitch versions to skills/<name>/exports/
node scripts/export-skill.js super-ui
node scripts/export-skill.js --all

# Or from code: forCursor(name), forAgentsMd(name), forStitchPrompt(name)
# Copy a skill's references/ folder alongside the file so its links resolve.
```

## Fourteen functions. That's the whole API.

Everything takes a skill name and returns plain data. Types ship in `src/index.d.ts`.

### Load

- `loadAllSkills()` → `Skill[]`
- `getSkill(name)` → `Skill`
- `listSkills()` → `SkillSummary[]`
- `getRelatedSkills(name)` → `RelatedSkillSummary[]`
- `asSystemPrompt(name)` → `string`

### Adapt

- `forClaude(name)` → `{ system, metadata }`
- `forOpenAI(name)` → `{ name, description, instructions }`
- `forLangChain(name)` → `{ template, inputVariables }`
- `forCrewAI(name)` → `{ role, goal, backstory }`
- `forAutoGen(name)` → `{ name, system_message }`
- `forCursor(name)` → `{ filename, content }`
- `forAgentsMd(name)` → `{ filename, content }`
- `forStitchPrompt(name)` → `{ content }`
- `forGeneric(name)` → `{ name, description, version, … }`

## A folder and a Markdown file (write a skill)

Put a `SKILL.md` in `skills/<name>/`. There's no registry and no build step. Add a `references/` folder for longer material the skill points to.

```md
---
name: my-skill
description: When to use this skill and what it produces.
version: 0.1.0
tags: [domain, capability]
inputs:
  - name: input_name
    description: What this input is.
    required: true
related: [other-skill]   # optional
author: your-name        # optional, only if you wrote it
---

# my-skill

The instructions the agent follows: the process,
the output shape, and what to avoid.
```

- **Lead with intent.** The first paragraph says when the skill applies.
- **Process before output.** Describe how to think, not only what to emit.
- **Specify the output shape.** Models drift without a target format.
- **Name the failure modes.** A "what to avoid" section prevents the common mistakes.
- **Be concrete.** One real example teaches more than a paragraph of advice.

## More

- [API reference](https://skills.rakibulism.space/docs/api.md): the HTTP API and its OpenAPI spec.
- [CLI](https://skills.rakibulism.space/docs/cli.md): the `agent-skills` command.
- [Contribute](https://skills.rakibulism.space/contribute.md): add your skill to the library.

---

Page: https://skills.rakibulism.space/docs · Site guide for agents: https://skills.rakibulism.space/llms.txt
