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 從公開儲存庫中收錄這些內容。

檢舉或申請下架