agentleFS
HLND2THLND2T/CS2_VibeSignatures/.claude/skills/get-vtable-from-yaml/SKILL.md

get-vtable-from-yaml

Skill67 starsChanged 59 days agoMITView on GitHub

Load vtable information from a pre-generated YAML file. Use this skill when you need to get vtable address and size for a class before analyzing virtual functions. This skill checks for existing vtable YAML files and errors out if not found, ensuring the vtable analysis has been done first.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the following code with the appropriate class_name:

    line 20
  2. Distinctive:

    Do NOT proceed with any remaining steps in the calling skill.

    line 72
  3. Distinctive:

    When a skill needs vtable information, use this skill first:

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Get VTable from YAML

Load vtable information from a pre-generated {class_name}_vtable.{platform}.yaml file beside the binary.

Parameters

  • class_name: The class name to look up (e.g., CCSPlayerController, CCSPlayer_WeaponServices, CServerSideClient)

An IDA Pro MCP session is required, resolved per mcp-ida-session.md: idb_list → idb_open (script fallback only if the endpoint is unreachable). Honor its IDB save discipline — an idle-TTL self-exit does not save.

Method

1. Check and Load VTable YAML

Run the following code with the appropriate class_name:

mcp__ida-pro-mcp__py_eval code="""
import idaapi
import os

class_name = "<CLASS_NAME>"  # Replace with actual class name

input_file = idaapi.get_input_file_path()
dir_path = os.environ.get('CS2VIBE_ARTIFACT_DIR') or os.path.dirname(input_file)
platform = 'windows' if input_file.endswith('.dll') else 'linux'

yaml_path = os.path.join(dir_path, f"{class_name}_vtable.{platform}.yaml")

if os.path.exists(yaml_path):
    with open(yaml_path, 'r', encoding='utf-8') as f:
        print(f.read())
    print(f"YAML_EXISTS: True")
else:
    print(f"ERROR: Required file {class_name}_vtable.{platform}.yaml not found.")
"""

2. Handle Result

If YAML exists (YAML_EXISTS: True), extract these values from the output:

  • vtable_va: The vtable virtual address (use as <VTABLE_START>)
  • vtable_rva: The vtable relative virtual address
  • vtable_size: The vtable size in bytes
  • vtable_numvfunc: The valid vtable entry count (last valid index = count - 1)
  • vtable_entries: An array of virtual functions starting from vtable[0].

Example YAML content:

vtable_class: CCSPlayerController
vtable_symbol: _ZTV19CCSPlayerController
vtable_va: 0x221fc80
vtable_rva: 0x221fc80
vtable_size: 0xd60
vtable_numvfunc: 428
vtable_entries:
  - 0x9b4bb0
  - 0x9b4bc0
  - 0x9b4bd0

If YAML does NOT exist, ERROR OUT and report to user:

ERROR: Required file {class_name}_vtable.{platform}.yaml not found.
Please run `/write-vtable-as-yaml` with class_name={class_name} first to generate the vtable YAML file.

Do NOT proceed with any remaining steps in the calling skill.

Usage in Other Skills

When a skill needs vtable information, use this skill first:

### 1. Get {ClassName} VTable Address

**ALWAYS** Use SKILL `/get-vtable-from-yaml` with `class_name={ClassName}`.

If the skill returns an error, stop and report to user.
Otherwise, extract `vtable_va`, `vtable_numvfunc` and `vtable_entries` for subsequent steps.

Expected Output Values

FieldDescriptionExample
vtable_classClass nameCCSPlayerController
vtable_vaVirtual address of vtable0x2114cd0
vtable_rvaRelative virtual address0x2114cd0
vtable_sizeSize in bytes0xd60
vtable_numvfuncNumber of virtual functions428
vtable_entriesAn array of virtual functions starting from vtable[0]...

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.