msw-git/msw-ai-coding-plugins-official6 files

Msw Search

MSW search integration — (1) vector search for API docs and implementation guides via the msw-mcp MCP server (mlua_api_retriever / mlua_document_retriever), (2) REST API search for resources (sprite / animation / sound / resource pack / avatar). Use for 'find details, examples, or related APIs not in .d.mlua', 'need a SpriteRUID', 'monster sprite', 'background image', 'find a sound', 'avatar item lookup', etc. Keywords: document search, API details, examples, guide, retriever, resource, sprite, animation, sound, RUID, resource pack, avatar.

Specification
Skill ID
msw-git/msw-ai-coding-plugins-official/msw-search
Publisher
msw-git
Repository
msw-ai-coding-plugins-official
Installs
0
Files
6
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

msw-git/msw-ai-coding-plugins-official/msw-searchInstalls these files
  • SKILL.md
  • references/resource/avatar.md
  • references/resource/browse.md
  • references/resource/detail.md
  • references/resource/search.md
  • scripts/msw_resource_api.cjs

What this skill tells the agent

MSW Search

MSW has two distinct search targets:

  1. API docs & implementation guides — Vector search for descriptions, code examples, and related APIs missing from .d.mlua.
  2. Resources — REST API for sprites, animations, sounds, resource packs, and avatars. The only path for obtaining RUIDs.

Routing Table

Request typeGo to section
"How do I implement this?", "Show me an example", "What related APIs exist?"Document search
".d.mlua only has the signature; the description is insufficient"Document search
"I don't know the API name (semantic search)"Document search
"Implementation guide / best practice / pattern"Document search
"I need a SpriteRUID", "Find a sprite for monster / NPC / background"Resource search → start with `resource_pack`
"Find an animation / sound / resource pack"Resource search → start with `resource_pack`
"Details for this RUID", "Similar resources"Resource search
"Avatar item / default avatar lookup"Resource search
"Upload / list / update / delete my own assets"Call msw-mcp asset_* tools directly
"Set sprite pivot", "set 9-slice border", "slice boundary for UI RUID", "asset properties"Call msw-mcp asset_update_resource_storage_info directly (properties: [{ key, value }] — pivot_x/y, border_left/right/top/bottom, filter_mode, wrap_mode)
★ Resource search default — always `resource_pack` first Unless the user explicitly asks for an individual sprite / animationclip / sound / avatar item (or names a non-pack RUID directly), pass resourceTypeFilter: ["resource_pack"] to searchResources. A pack bundles every sprite + animation + sound for one asset, so picking a stray sprite or animationclip first usually leaves the entity with a single frame, no animation set, or the wrong asset family. Search the pack → drill into payload.elements → assign individual RUIDs. Switch types only on explicit intent: "BGM file", "individual sprite only", "avatar item", "animationclip similar to this RUID", etc.

Section 1 — Document Search (APIs & Guides)

Vector search via the `msw-mcp` MCP server. Supplies the detailed descriptions, code examples, related APIs, and implementation guides missing from .d.mlua.

Decision Flow

Need API-related information
│
├─ Checking signature / type / property / enum
│   → Read .d.mlua first (highest priority)
│   → If .d.mlua is insufficient, call msw-mcp
│     (code examples, parameter details, related APIs, etc.)
│
├─ Implementation guide / pattern / best practice
│   → mlua_document_retriever
│
└─ Don't know the API name (semantic search)
    → mlua_api_retriever (and/or mlua_document_retriever for broader scope)

API Research Order

Priority 1 — .d.mlua (always first)

If you know the API name, always read `.d.mlua` first. Signatures, types, properties, event parameters, and enum values can be confirmed here accurately.

Path: Environment/NativeScripts/{Component,Service,Event,Enum,Logic,Misc}/Name.d.mlua

SituationExample
Confirm method signature"Does TransformComponent have SetPosition?"
Property type / existence"What is the type of SpriteRendererComponent.RUID?"
Event parameter structure"What are the AttackEvent constructor parameters?"
List of enum values"What are the BodyMoveType values?"
Method existence"What methods does SpawnService have?"

Priority 2 — Vector search (when .d.mlua is not enough)

.d.mlua contains only signatures and lacks detailed descriptions and examples. Use vector search when you need any of the following.

SituationMCP toolExample query
Need a code examplemlua_api_retrieverAIComponent example, BehaviorTree usage
Parameter detailsmlua_api_retrieverBadgeService GetBadgeInfosAndWait parameters
Related API cross-referencesmlua_api_retrieverAttackComponent related, HitComponent
ScriptOverridable checkmlua_api_retrieverAttackComponent CalcCritical override
Don't know the API nameboth retrieversdamage calculation, inventory save
"How do I …?" implementation guidemlua_document_retrieverhow to make inventory system
Pattern / best practicemlua_document_retrievercollision detection best practice

MCP Tools (msw-mcp)

ToolDescription
`mlua_api_retriever`API details for Service / Component / Misc etc. (signatures, parameters, examples). Pass an API/class/function/component name.
`mlua_document_retriever`Authoring manuals, guidelines, MLua usage, and other document-style material. Pass a natural-language sentence describing what to implement.

On failure: If a msw-mcp tool call errors out, surface the failure to the user and fall back to .d.mlua. Do not guess — state what you couldn't verify.

Default result count: request 3 results unless wider exploration is explicitly required.


.d.mlua vs Search — Information Comparison

.d.mlua is a type stub (~29 lines); Search returns the full document (254+ lines).

Information.d.mluaSearch
Method signature / typesOO
Property declarationsOO
Detailed method description (DetailDesc)XO
Code examples (AdditionalPageContent)XO
Per-parameter descriptionsXO
Related APIs (SeeAlsoAPIs)XO
Related guides (SeeAlsoGuides)XO
ScriptOverridable flagXO
SyncDirectionPartialO
Localized descriptions (Ko/Ja/Es/Zh)XO

Maker Editor Syntax → .mlua Conversion Rules

Code examples in search results use Maker Editor syntax. They must be converted before being used in a local .mlua file.

ItemMaker Editor.mlua fileNote
Override declarationoverride integer CalcDamage(...)method integer CalcDamage(...)override → method
Block{ ... }... endBraces → end
Exec space (own method)[server only]@ExecSpace("ServerOnly")Self-defined methods: annotate explicitly
Exec space (override)[server only] shown / omitted in editorMatch the parent's `@ExecSpace` exactly — see warning belowLEA-3014 if mismatched
PropertyProperty: int32 Score = 0@Sync property int32 Score = 0Add @Sync if synced
Type intintintegerC# int → mlua integer
Type numbernumbernumberSame (double)
Type floatfloatfloatSame (single)
number (64-bit double) and float (32-bit single) are assignable to each other but remain distinct types. Follow the .d.mlua declaration.
⚠ Override ExecSpace caveat — LEA-3014 `SignatureMismatch` The Maker Editor often hides the parent's exec space and lets you toggle [server only] freely on an override block. In .mlua, however, the override's @ExecSpace must be byte-identical to the parent declared in .d.mlua. If the parent has no @ExecSpace (engine default = ExecSpace=All), the override must also omit @ExecSpace entirely. Concretely, the AttackComponent / HitComponent damage hooks (CalcDamage, CalcCritical, GetCriticalDamageRate, GetDisplayHitCount, IsAttackTarget, IsHitTarget, OnAttack) are all ExecSpace=All upstream. Adding @ExecSpace("ServerOnly") produces: `` [LEA-3014] SignatureMismatch : The signature of <Child>.CalcDamage[... (ExecSpace=ServerOnly)] must match the overridden <Parent>.CalcDamage.[... (ExecSpace=All)]. ``

More from msw-git

Use this skill in a project

Open any RiverX project, search the Skills panel for msw-git/msw-ai-coding-plugins-official/msw-search, and install it in one click.

Use this skill