$npx -y skills add HLND2T/CS2_VibeSignatures --skill generate-reference-yamlGenerate reference YAML via project CLI into ida_preprocessor_scripts/references/<module>/<func_name>.<platform>.yaml
| 1 | # Generate Reference YAML |
| 2 | |
| 3 | Use this skill as the unified backend entrypoint through project CLI. |
| 4 | |
| 5 | Do not call IDA API directly in this skill. Always run `generate_reference_yaml.py`. |
| 6 | |
| 7 | ## Required parameters |
| 8 | |
| 9 | - `func_name` |
| 10 | - `gamever` (Obtain from dll path via ida-pro-mcp if not specified) |
| 11 | - `module` (Obtain from dll path via ida-pro-mcp if not specified) |
| 12 | - `platform` (Obtain from dll path via ida-pro-mcp if not specified) |
| 13 | |
| 14 | ## Command examples |
| 15 | |
| 16 | ### 1) Attach to existing MCP (should be used when there is an existing ida-pro-mcp connection) |
| 17 | |
| 18 | ```bash |
| 19 | uv run generate_reference_yaml.py -gamever 14141 -module engine -platform windows -func_name CNetworkGameClient_RecordEntityBandwidth -mcp_host 127.0.0.1 -mcp_port 13337 |
| 20 | ``` |
| 21 | |
| 22 | ### 2) Auto-start `idalib-mcp` with binary (fallback when no MCP is attached) |
| 23 | |
| 24 | ```bash |
| 25 | # Windows -- always pass -platform windows explicitly |
| 26 | uv run generate_reference_yaml.py -func_name {FUNC_NAME} -auto_start_mcp -binary "bin/{gamever}/{module}/{binary_name}.dll" -platform windows -debug |
| 27 | |
| 28 | # Linux -- always pass -platform linux explicitly |
| 29 | uv run generate_reference_yaml.py -func_name {FUNC_NAME} -auto_start_mcp -binary "bin/{gamever}/{module}/lib{module}.so" -platform linux -debug |
| 30 | ``` |
| 31 | |
| 32 | where `{gamever}` can be obtained from `.env` -> `CS2VIBE_GAMEVER`. |
| 33 | |
| 34 | **IMPORTANT -- Always pass `-platform` explicitly.** While `-platform` can theoretically be inferred from the binary extension (`.dll` -> windows, `.so` -> linux), auto-inference is unreliable and may produce the wrong platform's reference YAML. Always pass `-platform windows` or `-platform linux` explicitly. |
| 35 | |
| 36 | ### 3) Custom output name |
| 37 | |
| 38 | Use `-output_filename` when the reference YAML file name should differ from the default `<func_name>.<platform>.yaml`: |
| 39 | |
| 40 | ```bash |
| 41 | uv run generate_reference_yaml.py -gamever 14141 -module engine -platform windows -func_name CNetworkGameClient_RecordEntityBandwidth -output_filename CNetworkGameClient_RecordEntityBandwidthReference.windows.yaml -mcp_host 127.0.0.1 -mcp_port 13337 |
| 42 | ``` |
| 43 | |
| 44 | `-output_filename` accepts a file name ending in `.yaml`, not a path. The file is still written under `ida_preprocessor_scripts/references/<module>/`. The YAML payload's `func_name` remains the value passed to `-func_name`. |
| 45 | |
| 46 | **IMPORTANT -- Run `generate_reference_yaml.py` sequentially, NOT in parallel.** All invocations share the same IDA MCP connection. Running them in parallel will cause connection conflicts and failures. Run one command at a time, waiting for each to complete before starting the next. |
| 47 | |
| 48 | ## Output path |
| 49 | |
| 50 | - Default: `ida_preprocessor_scripts/references/<module>/<func_name>.<platform>.yaml` |
| 51 | - With `-output_filename <name>.yaml`: `ida_preprocessor_scripts/references/<module>/<name>.yaml` |
| 52 | |
| 53 | ## Manual checks after generation |
| 54 | |
| 55 | 1. `func_va` is credible for current binary/version. |
| 56 | 2. `disasm_code` is non-empty and matches target function semantics. |
| 57 | 3. `procedure` matches expected semantics when available; it can be an empty string when Hex-Rays is unavailable. |
| 58 | 4. `func_name` only confirms the output file targets your requested canonical name; it does not prove address resolution correctness. |
| 59 | |
| 60 | ## `LLM_DECOMPILE` path wiring |
| 61 | |
| 62 | - Generated file path in repository: |
| 63 | - `ida_preprocessor_scripts/references/<module>/<func_name>.<platform>.yaml` |
| 64 | - In target `find-*.py`, when `LLM_DECOMPILE` uses relative paths, write: |
| 65 | - `references/<module>/<func_name>.<platform>.yaml` |
| 66 | - Example tuple: |
| 67 | - `("CNetworkMessages_FindNetworkGroup", "prompt/call_llm_decompile.md", "references/engine/CNetworkGameClient_RecordEntityBandwidth.windows.yaml")` |