Aibridge Prefab Patch logo

Aibridge Prefab Patch

Community
FlameskyDexive
aibridge-prefab-patch

Unity Prefab asset patch workflow for AIBridge. Use when modifying complex prefab assets with prefab patch operations, child or component creation, SerializedProperty writes, array edits, internal GameObject/component references, dry-run validation, or when deciding between prefab patch, inspector set_property, scene object commands, and direct Unity YAML fallback.

Overview

PublisherFlameskyDexive
RepositoryLegends-Of-Heroes
Skill nameaibridge-prefab-patch
Stars
928
Forks
193
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by FlameskyDexive on GitHub. Read the source before you install it.

Installation

Install the Aibridge Prefab Patch AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/FlameskyDexive/Legends-Of-Heroes/tree/master/.codex/skills/aibridge-prefab-patch
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/FlameskyDexive/Legends-Of-Heroes.git /tmp/Legends-Of-Heroes
mkdir -p .claude/skills
cp -r /tmp/Legends-Of-Heroes/.codex/skills/aibridge-prefab-patch .claude/skills/aibridge-prefab-patch
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Aibridge Prefab Patch in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Aibridge Prefab Patch on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Aibridge Prefab Patch is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AIBridge Prefab Patch

Use prefab patch for complex Prefab asset edits that need multiple operations in one load/save cycle. Use inspector set_property for a single simple serialized field, and inspector set_properties for small batched field edits. Use gameobject、transform、inspector for scene objects. If the requested Prefab/Scene/custom .asset operation is not supported by AIBridge, load unity-yaml-editing and follow its direct UnityYAML rules.

$CLI means the platform-appropriate AIBridge CLI invocation, usually ./.aibridge/cli/AIBridgeCLI.exe on Windows.

参数选择

  • Prefer --ops <file> for multi-step edits, nested JSON, arrays, references, or anything run from PowerShell.
  • Use --ops-json <json> only for one or two very small operations.
  • Put temporary operation files under .aibridge/patch_ops/.
  • Always run --dryRun true before writing the prefab.

标准流程

  1. Find the target prefab with asset find/search --format paths.
  2. Inspect structure with prefab get_hierarchy --prefabPath "<prefab>".
  3. Create .aibridge/patch_ops/<task>.json.
  4. Run dry-run:
bash
$CLI prefab patch --prefabPath "Assets/Prefabs/Player.prefab" --ops ".aibridge/patch_ops/player_hp_patch.json" --dryRun true
  1. If dry-run succeeds, run the same command without --dryRun true.
  2. Re-check hierarchy/properties, then run compile unity and get_logs --logType Error.

操作示例

json
[
  { "op": "ensure_child", "path": "Player/HP" },
  { "op": "ensure_component", "path": "Player/HP", "typeName": "Animator" },
  {
    "op": "set_property",
    "target": { "path": "Player/HP", "componentName": "Animator" },
    "propertyName": "m_Enabled",
    "value": true
  },
  {
    "op": "set_array",
    "target": { "path": "Player", "componentName": "YourComponent" },
    "propertyName": "items",
    "items": [
      { "key": "HP", "value": { "$gameObject": "Player/HP" } },
      {
        "key": "HPAnimator",
        "value": {
          "$component": { "path": "Player/HP", "typeName": "Animator" }
        }
      }
    ]
  }
]

支持的操作

  • ensure_child: Ensure a GameObject path exists. Optional fields: active, tag, layer.
  • ensure_component: Ensure a component exists on path. Use typeName.
  • set_property: Set one SerializedProperty on a GameObject/component/asset target.
  • set_properties: Set multiple SerializedProperties on one target.
  • set_array: Replace an array property.
  • append_array: Append items to an array property.
  • clear_array: Clear an array property.

不支持时的处理

prefab patch currently does not cover every Unity serialized structure. Use unity-yaml-editing when the task needs unsupported operations such as:

  • Scene .unity object creation or structure edits not exposed by scene/gameobject/transform/inspector commands.
  • Prefab Variant override structures, nested modification records, or operations outside the listed patch ops.
  • Creating a brand-new Prefab file from text serialization, including paired .meta, root object, child hierarchy, and component documents.
  • Adding Prefab documents/components whose schema is not covered by patch ops, after copying the shape from the same Unity version/project.
  • ScriptableObjectTable/custom .asset creation or structural edits that cannot be represented by Inspector SerializedProperty writes.
  • Other text-serialized Unity assets (.mat, .controller, .anim, etc.) requiring direct document/fileID/GUID changes.

引用写法

Use these object reference values inside value or array items:

json
{ "$gameObject": "Player/HP" }
{ "$component": { "path": "Player/HP", "typeName": "Animator" } }
{ "$asset": "Assets/Materials/HPMat.mat" }
{ "$guid": "asset-guid" }
null

注意事项

  • Do not edit Prefab YAML directly unless no Unity/AIBridge API path exists; when required, use unity-yaml-editing.
  • For direct YAML fallback, copy component schema from a same-project example, update every GameObject.m_Component, Transform.m_Children, Transform.m_Father, and component m_GameObject reference, then re-import and inspect.
  • Paths are normalized against the prefab root; both Root/Child and Child can work when unambiguous.
  • Duplicate child names under the same parent are ambiguous; use exact hierarchy paths.
  • Duplicate components of the same type are ambiguous; use componentIndex when needed.
  • Keep operation JSON under .aibridge/patch_ops/; do not put it under Assets/ or commit it.

References

  • references/prefab-reference.md: generated CLI reference for general prefab commands.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Aibridge Prefab Patch AI skill do?

Unity Prefab asset patch workflow for AIBridge. Use when modifying complex prefab assets with prefab patch operations, child or component creation, SerializedProperty writes, array edits, internal GameObject/component references, dry-run validation, or when deciding between prefab patch, inspector set_property, scene object commands, and direct Unity YAML fallback.

Why use Aibridge Prefab Patch on TypingMind?

Because you install it once and use it with any model. Aibridge Prefab Patch is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Aibridge Prefab Patch in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/FlameskyDexive/Legends-Of-Heroes/tree/master/.codex/skills/aibridge-prefab-patch. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Aibridge Prefab Patch?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Aibridge Prefab Patch?

As many as you like. As long as a model supports skills, you can use Aibridge Prefab Patch with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Aibridge Prefab Patch AI skill free?

Yes. It is published on GitHub by FlameskyDexive under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇