tiangolo-library-skills
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLibrary Skills
库技能
Skill by ara.so — Daily 2026 Skills collection.
Library Skills lets AI coding agents use libraries as intended — always up to date. Libraries (e.g. FastAPI, Streamlit) embed official AI skills in each release, and discovers those installed packages and wires their skills into your project's directory as symbolic links. When you upgrade a library, its skills update automatically.
library-skills.agents由ara.so提供的技能——2026每日技能合集。
Library Skills 让AI编码Agent能够按预期使用各类库,且始终保持最新状态。诸如FastAPI、Streamlit这类库会在每个版本中嵌入官方AI技能,会发现已安装的这些包,并通过符号链接将它们的技能关联到项目的目录中。当你升级库时,其技能会自动更新。
library-skills.agentsInstallation & Quick Start
安装与快速开始
No global install required. Run directly with (Python) or (JavaScript/TypeScript):
uvxnpxbash
undefined无需全局安装。直接使用(Python)或(JavaScript/TypeScript)运行:
uvxnpxbash
undefinedPython projects
Python 项目
uvx library-skills
uvx library-skills
JavaScript/TypeScript projects
JavaScript/TypeScript 项目
npx library-skills
For Claude Code (which doesn't yet support the standard `.agents` directory):
```bash
uvx library-skills --claudenpx library-skills
针对暂不支持标准`.agents`目录的Claude Code:
```bash
uvx library-skills --claudeAlso installs into .claude/skills in addition to .agents
除了.agents目录外,还会安装到.claude/skills目录
---
---What It Does
功能说明
- Scans your project's installed dependencies (e.g. from the active virtualenv or )
node_modules - Finds libraries that publish their own skills at agentskills.io
- Prompts you to select which skills to install
- Creates symbolic links under (and optionally
.agents/) pointing into the installed package.claude/skills/
Because they are symlinks, upgrading the library (e.g. ) automatically updates the skill content — no need to re-run .
pip install -U fastapilibrary-skills- 扫描项目已安装的依赖(例如来自激活的虚拟环境或)
node_modules - 查找在agentskills.io上发布自有技能的库
- 提示你选择要安装的技能
- 在(可选
.agents/)目录下创建指向已安装包的符号链接.claude/skills/
由于使用的是符号链接,升级库(例如)会自动更新技能内容——无需重新运行。
pip install -U fastapilibrary-skillsCLI Reference
CLI 参考
bash
uvx library-skills [OPTIONS]| Option | Description |
|---|---|
| Also install skills in |
| Show help message and exit |
bash
uvx library-skills [OPTIONS]| 选项 | 描述 |
|---|---|
| 同时在 |
| 显示帮助信息并退出 |
Directory Structure After Installation
安装后的目录结构
my-project/
├── .agents/
│ └── fastapi -> /path/to/venv/lib/python3.x/site-packages/fastapi/skills/
├── .claude/
│ └── skills/
│ └── fastapi -> /path/to/venv/lib/python3.x/site-packages/fastapi/skills/
├── src/
│ └── main.py
└── pyproject.tomlmy-project/
├── .agents/
│ └── fastapi -> /path/to/venv/lib/python3.x/site-packages/fastapi/skills/
├── .claude/
│ └── skills/
│ └── fastapi -> /path/to/venv/lib/python3.x/site-packages/fastapi/skills/
├── src/
│ └── main.py
└── pyproject.tomlPython Project Workflow
Python 项目工作流
1. Create and activate a virtualenv with your dependencies
1. 创建并激活包含依赖的虚拟环境
bash
uv venv
source .venv/bin/activate
uv add fastapi streamlitbash
uv venv
source .venv/bin/activate
uv add fastapi streamlit2. Run library-skills
2. 运行library-skills
bash
uvx library-skillsbash
uvx library-skills→ Scans .venv, finds fastapi, streamlit with embedded skills
→ 扫描.venv,找到带有嵌入技能的fastapi和streamlit
→ Prompts: Install fastapi skills? [Y/n]
→ 提示:是否安装fastapi技能?[Y/n]
→ Creates .agents/fastapi -> .venv/lib/.../fastapi/skills/
→ 创建.agents/fastapi -> .venv/lib/.../fastapi/skills/
undefinedundefined3. For Claude Code users
3. 针对Claude Code用户
bash
uvx library-skills --claudebash
uvx library-skills --claude→ Creates .agents/fastapi AND .claude/skills/fastapi
→ 创建.agents/fastapi和.claude/skills/fastapi
---
---JavaScript/TypeScript Project Workflow
JavaScript/TypeScript 项目工作流
1. Install dependencies
1. 安装依赖
bash
npm installbash
npm installor
或
pnpm install
undefinedpnpm install
undefined2. Run library-skills
2. 运行library-skills
bash
npx library-skillsbash
npx library-skillsor with Claude support
或支持Claude的版本
npx library-skills --claude
---npx library-skills --claude
---Real Code Example: FastAPI with Up-to-Date Skills
真实代码示例:使用最新技能的FastAPI
After installing FastAPI skills, your agent will use current patterns, not deprecated ones.
python
undefined安装FastAPI技能后,你的Agent将使用当前模式,而非已弃用的模式。
python
undefinedmain.py — agent uses skills to write correct, modern FastAPI code
main.py — Agent使用技能编写正确、现代的FastAPI代码
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@app.post("/items/")
async def create_item(item: Item):
return item
With skills installed, the agent reads the embedded SKILL.md from the FastAPI package and applies the documented patterns — including any new features added in the latest release.
---from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@app.post("/items/")
async def create_item(item: Item):
return item
安装技能后,Agent会读取FastAPI包中嵌入的SKILL.md文件,并应用文档中记录的模式——包括最新版本新增的所有功能。
---How Library Authors Publish Skills
库作者如何发布技能
If you are a library author who wants to embed skills in your package:
- Create a (or similar) inside your package directory
skills/SKILL.md - Publish the package to PyPI or npm
- Register at agentskills.io so can discover it
library-skills
my-library/
├── my_library/
│ ├── __init__.py
│ └── skills/
│ └── SKILL.md ← embedded skill, shipped with every release
├── pyproject.toml
└── README.md如果你是想要在包中嵌入技能的库作者:
- 在包目录内创建(或类似文件)
skills/SKILL.md - 将包发布到PyPI或npm
- 在agentskills.io注册,以便能够发现它
library-skills
my-library/
├── my_library/
│ ├── __init__.py
│ └── skills/
│ └── SKILL.md ← 嵌入的技能随每个版本一同发布
├── pyproject.toml
└── README.mdCommon Patterns
常见模式
Re-running after upgrading libraries
升级库后重新运行
Skills update automatically via symlinks. But if you add new libraries that have skills, re-run:
bash
uvx library-skills技能会通过符号链接自动更新。但如果你添加了带有技能的新库,请重新运行:
bash
uvx library-skillsCommitting .agents/
to version control
.agents/将.agents/
提交到版本控制
.agents/Symlinks can be committed so the whole team benefits:
bash
git add .agents/
git commit -m "Add library skills for fastapi"Teammates need the same virtualenv path for symlinks to resolve, so consider using relative symlinks or documenting the setup.
符号链接可以被提交,以便整个团队受益:
bash
git add .agents/
git commit -m "添加fastapi的库技能"团队成员需要相同的虚拟环境路径才能解析符号链接,因此建议使用相对符号链接或记录设置步骤。
Checking which skills are installed
查看已安装的技能
bash
ls -la .agents/bash
ls -la .agents/fastapi -> /home/user/project/.venv/lib/python3.12/site-packages/fastapi/skills
fastapi -> /home/user/project/.venv/lib/python3.12/site-packages/fastapi/skills
streamlit -> /home/user/project/.venv/lib/python3.12/site-packages/streamlit/skills
streamlit -> /home/user/project/.venv/lib/python3.12/site-packages/streamlit/skills
---
---Troubleshooting
故障排除
uvx library-skills
finds no skills
uvx library-skillsuvx library-skills
未找到任何技能
uvx library-skills- Make sure you have a virtualenv activated (or the packages are installed in the current environment)
- The library must ship its own skills — not all libraries do yet; check agentskills.io
- 确保已激活虚拟环境(或包已安装在当前环境中)
- 该库必须自带技能——并非所有库都支持,可查看agentskills.io
Symlinks are broken after moving the project
移动项目后符号链接失效
Symlinks are absolute by default. Re-run from the new location to recreate them.
uvx library-skills默认使用绝对符号链接。在新位置重新运行即可重新创建。
uvx library-skillsClaude Code doesn't load skills from .agents/
.agents/Claude Code无法从.agents/
加载技能
.agents/Use the flag to also install into :
--claude.claude/skills/bash
uvx library-skills --claude使用标志将技能同时安装到:
--claude.claude/skills/bash
uvx library-skills --claudeSkills are stale after pip install -U fastapi
pip install -U fastapipip install -U fastapi
后技能未更新
pip install -U fastapiSkills update automatically via symlinks — no action needed. If they don't, verify the symlink target points into the virtualenv:
bash
readlink .agents/fastapi技能会通过符号链接自动更新——无需操作。如果未更新,请验证符号链接目标指向虚拟环境:
bash
readlink .agents/fastapiKey Concepts
核心概念
| Concept | Explanation |
|---|---|
| Library Skill | A |
| Standard location where agent skills are discovered by AI coding tools |
| Symlink | |
| agentskills.io | Registry of libraries that publish agent skills |
| Flag to also populate |
| 概念 | 说明 |
|---|---|
| Library Skill | 随库包一同发布的 |
| AI编码工具发现Agent技能的标准位置 |
| 符号链接 | |
| agentskills.io | 发布Agent技能的库注册中心 |
| 用于同时填充 |
Links
链接
- Documentation: https://library-skills.io
- Source Code: https://github.com/tiangolo/library-skills
- Skills Registry: https://agentskills.io
- PyPI: https://pypi.org/project/library-skills
- npm: https://www.npmjs.com/package/library-skills