Create Skill

作者 val-town2d3ec654b6a7无许可证收录于 2026年10月8日更新于 2026年10月8日

Use when the user wants to persist a preference, skill, or knowledge. Use when it would aid future val development to store a memory of how best to build something.

仅含说明AI & Agents
AI 生成的概览

说明如何编写 Val Town 的 SKILL.md 文件,让 AI 代理能发现并使用用户偏好。

功能
该技能说明在 Val Town 中创建技能的结构与约定:用户将 SKILL.md 文件放在某个 val 内的 /skills/ / 目录下。内容涵盖必需的 frontmatter 字段(name、description、可选的 triggers),指出缺少 frontmatter 的技能会被静默跳过,并列出简洁、使用第三人称等编写最佳实践。它还介绍了通过 remix 现有技能来创建新技能。
适用场景
当用户希望为将来的代理使用保存偏好、技能或知识,或需要存储关于如何更好地构建某物的指导时使用。它适用于编写或定制 Val Town 技能文件。
运行要求
不需要脚本或软件包,仅为说明性内容。它假定使用 Val Town 环境及其 MCP 服务器,并引用了外部 Claude Platform 文档。

Skills in Val Town instruct Townie and other AI agents using the Val Town MCP server how to write idiomatic vals that respect a user's preferences and knowledge.

In any val, a user can create a /skills/<name>/SKILL.md file, e.g. /skills/design/SKILL.md. Townie and the Val Town MCP server index skills with that directory/file structure across all of a user's vals. A user may choose to centralize their skills in one val or co-locate skills across multiple vals.

Frontmatter

A skill markdown file must have frontmatter:

  • name: kebab-case name of the skill; contains lowercase letters, numbers, and hyphens
  • description: helps the agent decide when the skill is relevant. A good skill description is critical for agent discovery
  • triggers: (optional) is a list of keywords to tip off the agent

The description and triggers fields enable skill discovery, i.e. tells the user's AI agent (e.g. Claude Code, Codex, Cursor) when to use it. The more specific the better, including key terms that should trigger use (which can also be enumerated in triggers). Skills without frontmatter will be silently skipped, so Townie/MCP will not be able to access them.

Best practices

The Claude Platform Docs offer skill authoring best practices, including:

  • Be concise. The context window is a public good
  • Always write in third person
  • Default assumption: AI agents are already very smart
  • Be as specific as possible (e.g. code is better than plain english where possible)
  • Improve skills based on usage and testing

Example

md
---name: designdescription: Use when styling a val's UI. Use for frontend vals that return JSX or HTMLtriggers: [css, styling, layout, theme]---
- Use `.css` files, avoid inline styles and Tailwind- Locate React components in a `/components` directory, one component per file- Use a sans-serif web-native font stack, no external fonts- ...

Remixing

A new skill can be created by remixing another user’s skill and customizing the SKILL.md file. There is a remix button in the val.town UI, and a remix_val tool in the Val Town MCP server to do so.

来源与署名

来源:val-town/plugins位于plugin/skills/create-skill提交2d3ec65

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架