Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Proposal: Skills — workflow-level context for tool composition

未关闭
#161 10 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
javascript
领域
web-dev

调研方向

Start with the proposal’s registerSkill() strawman API and the existing registerTool() and provideContext() behavior. There are unresolved API and semantics questions, so the first task is to identify the relevant specification section or proposal entry point and determine the intended scope; completion requires an agreed API and normative documentation, which this issue does not yet identify.

由索引模型根据 Issue 内容生成。

描述

backlog enhancement

Proposal to let pages register skills — bundling tools with structured context and workflow guidance — so agents can use a site competently, not just functionally.

Tools can tell agents what a site can do, but Skills tell agents how to do it well.

A skill bundles registered tools with structured context and optional guidance, so agents can operate competently within a domain rather than calling functions blind.

Strawman API

navigator.modelContext.registerSkill({
  name: "personal_shopper",
  description: "Shopping assistant guidance for this store",
  instructions: `
    1. Ask about occasion and budget before searching
    2. Our sizing runs small — suggest one size up
    3. For orders over $100, mention current promotion
    4. Always mention 30-day return policy before checkout
    5. Use requestUserInteraction() for payment confirmation
  `,
  tools: ["searchProducts", "showProducts", "addToCart", "applyPromoCode"],
  context: {
    currentPromotion: { code: "SPRING30", minOrder: 100, discount: "30%" },
    returnPolicy: "30-day free returns, free first exchange",
    sizingNote: "Sizes run ~1 size small vs. US standard"
  },
  annotations: { category: "commerce", version: "1.0" }
});

Tools are still registered independently via registerTool(). A skill references them by name and adds the layer of how and when to use them.

instructions is an optional hint — clients that don't interpret natural language (accessibility tools, OS assistants) can ignore it and still use the tools and structured context directly.

Problem

An e-commerce site registers searchProducts, addToCart, and applyPromoCode. An agent can call them. But it doesn't know the store's sizing runs small, there's an active promo code, it should ask about occasion before searching, or which products pair well together.

Tool descriptions can't carry this weight — they document individual functions, not workflows. The gap grows with domain complexity: travel sites need fare class knowledge, support portals need triage logic.

Design Considerations

  • Trust. Skills influence agent behavior. Safeguards: user-inspectable (like page source), domain-scoped (like tools), advisory (agents serve users first). Browsers could enforce content policies on instructions.
  • Discoverability. A .well-known/webmcp manifest could include skill declarations alongside tools.
  • Agnosticism. instructions is a hint for LLM-based agents. The structured context object and tools list are useful to any client. Non-LLM clients skip what they don't understand — same pattern as readOnlyHint.

Open Questions

  • New method (registerSkill) or extension to provideContext()?
  • Should instructions be plain text, structured steps, or both?
  • How should skills interact with the agent's own system-level constraints?

Prior Art

  • MCP prompts/resources — backend MCP's guidance and data primitives
  • MCP-B — already bridges WebMCP to full MCP including prompts and resources via npm packages
  • Claude Skills, Custom GPTs, LobeHub Skills — production patterns bundling instructions + tools + context
主要语言
Bikeshed
星标
4.7k
派生
328
平均合并
2 天 15 小时
30 天内合并 PR
16

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

webmachinelearning/webmcp 的其他 Issue

查看 webmachinelearning/webmcp 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。