Logo Skill Creator

Skill Creator

Cộng đồngPhổ biến
Besty0728
skill-creator

Hướng dẫn cách tạo kỹ năng UnitySkills tùy chỉnh do người dùng định nghĩa trong dự án Unity của bạn — một phương thức C# [UnitySkill] cùng các quy ước giúp tác nhân AI và máy chủ phát hiện và kiểm soát quyền sử dụng kỹ năng đó

Add to TypingMind

Tổng quan

Nhà phát hànhBesty0728
Kho mãUnity-Skills
Tên kỹ năngskill-creator
Sao
1.9K
Bản fork
176
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Besty0728 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Skill Creator trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/skill-creator
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.

Sử dụng trong TypingMind

Bật Skill Creator trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Skill Creator ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Skill Creator với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Writing your own custom skill for your project
  • Extending what agents can do in this specific Unity project
  • Learning the [UnitySkill] metadata contract and discovery rules
  • 为自己的工程编写自定义技能、扩展 Agent 在本工程可调用的能力

Skill Creator (advisory)

Audience: an agent (or developer) adding a custom skill to your own Unity project, not to the UnitySkills plugin source. A custom skill is a public static method marked [UnitySkill] compiled inside your project's Editor code; the server discovers it automatically — you never edit the plugin.

Where the C# must live

Put the file under Assets/ in an Editor-only location (e.g. Assets/Editor/UnitySkillsCustom/MySkills.cs, or any asmdef whose platform is Editor). The plugin's editor asmdef has autoReferenced: true, so Assembly-CSharp-Editor and ordinary user Editor asmdefs see the public API without adding references.

  • Never put custom skill code inside the package (Packages/com.besty.unity-skills/) or Library/PackageCache/: package updates and self-update replace that whole tree and your file is wiped.
  • The class need not be a MonoBehaviour; a plain static class is fine.

Compile and discovery loop

After you write the C# (through script_create with the full content, or by any editor), Unity recompiles and performs a domain reload. The router re-runs TypeCache.GetMethodsWithAttribute<UnitySkillAttribute>() on the next request, so the new skill is registered automatically — there is no restart, no list to update.

Recommended agent flow:

  1. Check the name is free: GET /skills?q=<prefix> or read GET /skills/schema?names=<cand>&wire=v2.
  2. script_create { scriptName, folder: "Assets/...", content: <full source> } — returns { path, jobId, waitUrl }.
  3. Wait for compile: GET /jobs/<jobId>?wait=90 (retry through the reload); inspect resultData.compilation.errors. script_get_compile_feedback(scriptPath) gives on-demand diagnostics.
  4. Confirm registration: GET /skills/schema?names=<your_skill>&wire=v2 should return your skill with its description and parameters.
  5. First real call with ?mode=dryRun.

Note: script_create is MayTriggerReload + high-risk — it is NeverInSemi: it needs Bypass mode or a panel Allowlist entry; ask the user rather than attempting a grant.

Naming rules (read this before choosing a name)

  • Skill names are snake_case verbs like gameobject_create. A user custom skill must be prefixed (e.g. my_, acme_): my_apply_team_branding, not apply_branding.
  • On a name collision the later-registered declaration wins, and registration order is not guaranteed — a name that matches a built-in can shadow it (or be shadowed). The registry logs a warning naming both declaring types (Skill name conflict: '<name>' declared by both <A> and <B>; using the latter.). Always check the name is free first.
  • Provide a matching xxx_batch variant when per-item looping makes sense.

The metadata contract (the attribute)

Fill [UnitySkill] truthfully — the router, permission gating, schema, and agents all read it:

csharp
[UnitySkill("my_greet",
    "First sentence is what the agent reads; mention parameters.",
    Category = SkillCategory.Uncategorized,                 // user skills cannot add enum values
    Operation = SkillOperation.Query,                       // Query | Create | Modify | Delete | Execute | Analyze (combine with |)
    Tags = new[] { "greeting", "demo" },                    // improves /skills/recommend matching
    Outputs = new[] { "message" },                          // MUST be a subset of what you actually return
    TracksWorkflow = false, MutatesScene = false,           // honest risk flags (see below)
    RiskLevel = "low")]                                     // low | medium | high
public static object MyGreet(
    [SkillParam("Who to greet")] string name = "world") { ... }
  • Category: SkillCategory is a closed enum — custom skills cannot add values. Use the nearest existing category or Uncategorized. A skill in GameObject/Component/Material/Scene/Sample is hidden under the Guide surface profile unless it is a pure read; any writer with MutatesScene = true is hidden under NoSceneAuthoring. This is intentional: honest metadata, not a loophole to dodge.
  • Risk flags drive permission: a skill declaring Operation.Delete, MayEnterPlayMode, MayTriggerReload, or RiskLevel = "high" is auto-classified NeverInSemi — it returns MODE_FORBIDDEN under Approval and Auto and only runs in Bypass or via the panel Allowlist. Mode defaults to FullAuto; declare Mode = SkillMode.SemiAuto only for a pure read with zero side effects. Fill these truthfully or your skill is gated wrong.
  • Outputs: every entry must be a key the method actually returns; the schema contract tests check this.

Writing the method body (public API only)

Only the public surface is available to project code. Use:

  • Validate.Required(x, "x") — returns an error object to return early: if (Validate.Required(x, "x") is object err) return err;
  • GameObjectFinder.FindOrError(name, instanceId, path) — never GameObject.Find.
  • SkillErrorResponse.Build(SkillErrorCode.X, message, ...) for business errors (do throw only for truly unknown framework errors). SkillErrorCodeExtensions is internal — do not try to call it.
  • Writers that mutate scene state should register Undo and call WorkflowManager.SnapshotXxx(...) when TracksWorkflow = true; batch with BatchExecutor.Execute<TItem>(items, perItem, idFn).
  • Return a structured object (anonymous or a DTO) — it is serialized with SkillsCommon.JsonSettings.

A complete minimal example:

csharp
using UnitySkills;

public static class MyCustomSkills
{
    [UnitySkill("my_greet", "Return a greeting for a name.",
        Operation = SkillOperation.Query,
        Tags = new[] { "greeting" }, Outputs = new[] { "message" },
        MutatesScene = false, RiskLevel = "low")]
    public static object MyGreet([SkillParam("Who to greet")] string name = "world")
    {
        if (Validate.Required(name, "name") is object err) return err;
        return new { message = $"Hello, {name}!" };
    }
}

How agents find it (no doc file required)

Agents do not read a markdown file to call your skill — they discover it through the same schema-first path used for built-ins:

  • GET /skills/recommend?intent=<words>&includeSchema=true&topN=3&wire=v2 — matches on name, Tags, and Description.
  • GET /skills/schema?names=my_greet&wire=v2 — full parameter schema (with each [SkillParam] note) when the name is known.

So the quality of Description, Tags, and every [SkillParam] is the documentation. Keep the first description sentence specific and parameter-aware.

Optional long-form docs (where NOT to put them)

If a custom skill needs prose beyond the schema, put markdown in a file inside your project (e.g. Assets/UnitySkillsCustom/README.md) and point to it from the skill's Description, or as a sibling agent-skill folder outside the managed install tree (e.g. <project>/.claude/skills/my-tool/SKILL.md).

  • Never write docs inside the installed unity-skills skill folder (e.g. .claude/skills/unity-skills/skills/my-mod/SKILL.md): install/update/auto-sync overwrites that tree, and Uninstall deletes the whole install directory, destroying anything inside it.

Guardrails

  • Do not add SkillCategory enum values, SkillRouter entries, or route-table rows — discovery is automatic.
  • Do not reference internal plugin members (only public API compiles from your project).
  • Do not shadow built-in names; always prefix.
  • Do not put C# or docs inside the managed package or install tree (update/uninstall removes them).
  • Do not fudge MutatesScene / risk flags to bypass gating; the surface profiles and permission modes depend on them being true.

Mode: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).

Câu hỏi thường gặp

Kỹ năng AI Skill Creator làm được gì?

Hướng dẫn cách tạo kỹ năng UnitySkills tùy chỉnh do người dùng định nghĩa trong dự án Unity của bạn — một phương thức C# [UnitySkill] cùng các quy ước giúp tác nhân AI và máy chủ phát hiện và kiểm soát quyền sử dụng kỹ năng đó

Vì sao nên dùng Skill Creator trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Skill Creator là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Skill Creator trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/skill-creator. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Skill Creator?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Skill Creator với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Skill Creator với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Skill Creator có miễn phí không?

Có. Kỹ năng này được Besty0728 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇