360 Secure SkillHub
360 安全技能中心

skill-mcp

核心功能为展示skill-mcp可加载技能的标准结构、SKILL.md元数据格式、配套参考文件组织方式及可运行脚本声明规范,内置Node示例脚本可输出运行时接收的参数、工作目录、环境变量名等上下文。适用于验证skill-mcp服务配置是否正常,或开发自定义技能时参考声明块编写、脚本调用(含用户二次确认流程)规则,通过skill_run指令传参调用即可返回对应上下文信息。

chrischall
chrischall
热度 56.92
最近更新 2026-10-10 07:29:54
分类:开发依赖:MCP 服务 / 代码执行 / 读写文件应用场景:API 集成 / 自动化脚本 / 模板 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skill-mcp
Metadata
name
skill-mcp-demo
description
The example skill shipped with skill-mcp — shows the SKILL.md shape, a bundled reference file, and a declared runnable script.
when-to-use
When checking that skill-mcp is wired up, or when writing a skill's own mcp-host declaration block.
mcp-host
{"version":1,"run":[{"script":"scripts/report.js","interpreter":"node","timeout":15}]}

skill-mcp demo

This skill exists so skill-mcp does something useful the first time it runs, and so the shape of a skill it can serve is visible in one file.

What a skill is

A directory holding SKILL.md — YAML frontmatter (name, description, and optionally the mcp-host: block below) followed by instructions — plus any files the instructions refer to. Read references/declaration.md with skill_file for the declaration block's fields.

Declaring a runnable script

Only a script named in mcp-host.run may be executed, and only through skill_run. This skill declares one:

  • scripts/report.js — prints what the fence handed it: its argv, its working directory, and the NAMES of the environment variables it received.

Run it to see the fence from the inside:

skill_run(name: "skill-mcp-demo", script: "scripts/report.js", args: ["hello"])

skill_run asks the user to confirm first. Where the client cannot show a confirmation prompt (or the server sets MCP_CONFIRM_ELICITATION=off, which sends every client down this path), that first call starts nothing and returns a preview of exactly what would run plus a confirmToken; once the user approves, call again with the same arguments and confirmToken: "<token>".

What the fence does and does not do

It decides which code runs and what it is handed. It does not make the code safe — a declared script is still arbitrary code, bounded by whatever the host running this server bounds it with.