Agent Skill Loader

io.github.back1ply由 GitHub 账号 back1ply 发布v1.2.1更新于 Oct 25, 2026

Dynamically load Claude Code skills into AI agents without copying files.

概览

AI 生成的概览

一个本地 MCP 服务器,把 Claude Code 技能目录以提示词和工具形式提供给 AI 代理,无需复制文件即可加载技能。

可以做什么
在配置的目录中发现技能,可按名称或描述过滤,并按需读取技能的 Markdown 说明,或在支持 MCP Prompts 的客户端中作为斜杠命令提示词注入。把技能永久复制到项目的 .agent/skills 目录。在运行时添加、移除或列出技能搜索路径,并写入项目配置文件。诊断扫描路径、可读性和警告信息。通过文件监视器在技能增删时通知客户端。
适用场景
当你维护一套 Claude Code 技能库,并希望 Claude Desktop、Cursor 或其他 MCP 客户端实时看到它们(作为斜杠命令或由代理自行调用的工具)时使用。
运行要求
本地进程;需要 Node.js 18 或更高版本,可从 npm 全局安装或从源码构建。技能目录会从默认的 Claude 插件缓存和项目级 skill-paths.json 自动识别;可选环境变量 MCP_SKILL_PATHS、MCP_WORKSPACE_ROOT 和 MCP_NO_WATCH 用于调整路径和关闭监视器。未声明身份验证。
安装前请注意
install_skill 会把技能文件夹复制到工作区,manage_search_paths 会写入 skill-paths.json,两者都会改动磁盘文件;目标路径被限制在当前工作区内。服务器会读取并扫描所配置的目录,请只指向你信任的文件夹。在 CI 中可用 MCP_NO_WATCH 关闭文件监视器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agent Skill Loader,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Agent Skill Loader 🧠

[npm version] [MCP Registry] [License: MIT] [Node.js Version] [TypeScript] [MCP]

Agent Skill Loader is a Model Context Protocol (MCP) server that acts as a bridge between your static Claude Code Skills library and dynamic AI agents (like Claude Desktop, Cursor, or any MCP client).

It exposes skills both as MCP Prompts (slash commands, zero tool calls needed) and as MCP Tools (for programmatic use). Skills are auto-discovered from configured directories and stay live — add a new SKILL.md and the client is notified automatically.

🚀 Features

  • MCP Prompts: Skills appear as slash commands in clients. No tool call needed to inject them.
  • Live updates: listChanged notification fires when skills are added or removed (via file watcher).
  • Discovery: list_skills — scans configured skill directories, with optional search filter.
  • Dynamic Learning: read_skill — fetches the SKILL.md content.
  • Persistence: install_skill — copies a skill permanently to your project.
  • Configuration: manage_search_paths — add/remove skill directories at runtime.
  • Troubleshooting: debug_info — diagnose configuration and path issues.

🛠️ Setup

Prerequisites

  • Node.js >= 18

Option A: Install from npm (Recommended)

bash
npm install -g agent-skill-loader

Then register in .mcp.json:

json
"agent-skill-loader": {  "command": "agent-skill-loader"}

Option B: Build from Source

bash
git clone https://github.com/back1ply/agent-skill-loader.gitcd agent-skill-loadernpm installnpm run build

Then register in .mcp.json:

json
"agent-skill-loader": {  "command": "node",  "args": ["<path-to-repo>/build/index.js"]}

📂 Configuration

The server automatically detects its workspace and aggregates skill paths from:

  1. Default: %USERPROFILE%\.claude\plugins\cache (Standard location)
  2. Dynamic Config: skill-paths.json (Located in the project root)

Environment Variables

VariableDescription
MCP_SKILL_PATHSJSON array or semicolon/comma-separated list of additional skill paths
MCP_WORKSPACE_ROOTOverride auto-detected workspace root
MCP_NO_WATCHSet to 1 to disable the file watcher (useful in CI)

Dynamic Path Management

You do not need to manually edit config files. Use the tool to manage paths at runtime:

  • Add: manage_search_paths(operation="add", path="F:\\My\\Deep\\Skills")
  • Remove: manage_search_paths(operation="remove", path="...")
  • List: manage_search_paths(operation="list") creates/updates skill-paths.json.

🤖 Usage

MCP Prompts (Slash Commands)

If your client supports MCP Prompts (Claude Desktop, Cursor, etc.), skills appear automatically as slash commands. Select a skill from the slash command menu to inject its content directly — no tool calls needed.

Tools

The agent has access to five tools:

  • list_skills(query?): Returns a JSON list of available skills. Optional query filters by name/description substring (case-insensitive).
  • read_skill(skill_name): Returns the markdown instructions for a skill.
  • install_skill(skill_name, target_path?): Copies the skill folder to .agent/skills/<name>. For security, target_path must be within the current workspace.
  • manage_search_paths(operation, path?): Add, remove, or list skill search paths.
  • debug_info(): Returns diagnostic information (paths, status, warnings).

Example Agent Prompt

"I need to write a DAX measure but I'm not sure about the best practices."

The agent will automatically call list_skills, find writing-dax-measures, call read_skill, and answer with expert knowledge. Or the user can invoke the skill directly as a slash command.

🔧 Troubleshooting

If skills aren't being discovered, use debug_info() to see:

  • search_paths: Which directories are being scanned
  • path_status: Whether each path exists and is readable
  • warnings: Any errors encountered during scanning (permission denied, empty files, etc.)

Example output:

json
{  "workspace_root": "C:/projects/agent-skill-loader",  "search_paths": {    "base": ["C:/Users/pc/.claude/plugins/cache"],    "dynamic": ["F:/My/Skills"],    "effective": ["C:/Users/pc/.claude/plugins/cache", "F:/My/Skills"]  },  "path_status": [    { "path": "C:/Users/pc/.claude/plugins/cache", "exists": true, "readable": true },    { "path": "F:/My/Skills", "exists": false, "readable": false }  ],  "skills_found": 12,  "warnings": [    { "path": "F:/My/Skills", "reason": "Directory does not exist" }  ]}

📦 Project Structure

  • src/index.ts: Main server logic (tools + prompts + watcher).
  • src/utils.ts: Skill scanning, description extraction, prompt helpers, debounce.
  • build/: Compiled JavaScript output.
  • package.json: Dependencies (@modelcontextprotocol/sdk, chokidar, zod).

🤝 Contributing

To add new skills, add a folder with a SKILL.md file to one of the watched directories. The server picks them up automatically and sends a listChanged notification — no restart required.

来源:README.md,提交 8e19c6b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v1.2.1最新Oct 15, 2026
  2. v1.0.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分