agentleFS
HLND2THLND2T/CS2_VibeSignatures/.claude/skills/find-CNetworkGameServerBase_ServiceQueue/SKILL.md

find-CNetworkGameServerBase_ServiceQueue

Skill67 starsChanged 58 days agoMITView on GitHub

Final-guarantee fallback for the find-CNetworkGameServerBase_ServiceQueue preprocessor. Recovers CNetworkGameServerBase_ServiceQueue in CS2 engine2.dll / libengine2.so when the LLM_DECOMPILE preprocessor cannot resolve the tail-call target of CNetworkGameServerBase_SpawnGroupThink. Use this skill only after the deterministic preprocessor returns failure. Trigger: CNetworkGameServerBase_ServiceQueue

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    If CNetworkGameServerBase_ServiceQueue.<platform>.yaml already exists in the active artifact module directory and parses to a non-empty …

    line 51
  2. Very specific:

    Use SKILL /get-func-from-yaml with func_name=CNetworkGameServerBase_SpawnGroupThink to obtain its func_va.

    line 56
  3. Very specific:

    Use SKILL /generate-signature-for-function with the resolved function address.

    line 75
  4. Very specific:

    Use SKILL /write-func-as-yaml with:

    line 77
  5. Distinctive:

    Write one output per input platform:

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Find CNetworkGameServerBase_ServiceQueue (final-guarantee fallback)

Recover the concrete CNetworkGameServerBase_ServiceQueue function in CS2 engine2.dll / libengine2.so using IDA Pro MCP tools. This is an Agent fallback: it runs only when ida_preprocessor_scripts/find-CNetworkGameServerBase_ServiceQueue.py cannot resolve the target.

Realworld Function References

The finder's LLM_DECOMPILE reference is the predecessor CNetworkGameServerBase_SpawnGroupThink, whose body ends by tail-calling CNetworkGameServerBase_ServiceQueue. Read the platform reference before searching in IDA; its addresses are reference-build values and must be verified against the current binary.

  • ida_preprocessor_scripts/references/engine/CNetworkGameServerBase_SpawnGroupThink.windows.yaml
  • ida_preprocessor_scripts/references/engine/CNetworkGameServerBase_SpawnGroupThink.linux.yaml

Background — what ServiceQueue is

CNetworkGameServerBase_SpawnGroupThink(this, spawnGroupQueue) ends by tail-calling CNetworkGameServerBase_ServiceQueue(this, spawnGroupQueue). In the reference build the tail call is the final jmp sub_XXXX in the function body:

.text:000000000051AA71    jmp sub_51A500   ; CNetworkGameServerBase_ServiceQueue

ServiceQueue is the routine that actually services the spawn-group queue: it loops with a ~5 ms time step (<now> + 0.005), walks 16-byte queue entries (shl reg, 4), and decrements the 16-bit pending-group counter at queue offset +0x16, until the deadline passes or the queue drains. Do not confuse it with its caller SpawnGroupThink — the target is the callee reached by that tail jump.

The reference artifacts are only orientation values (verify every field against the current binary):

PlatformReference func_vaReference func_rvaReference size
Windows0x1800b79900xb79900x1fe
Linux0x51a5000x51a5000x3d8

Step 0. Skip an existing output

If CNetworkGameServerBase_ServiceQueue.<platform>.yaml already exists in the active artifact module directory and parses to a non-empty mapping, skip that platform. Never derive the artifact path from bin.

Step 1. Load and decompile the predecessor

  1. Use SKILL /get-func-from-yaml with func_name=CNetworkGameServerBase_SpawnGroupThink to obtain its func_va. If it errors, STOP and report to user — this fallback cannot run without the predecessor.
  2. Decompile it (mcp__ida-pro-mcp__decompile at that address).
  3. Find the final tail call: a jmp sub_XXXX in the disassembly, or return sub_XXXX(a1, v4); in the pseudocode, that forwards the server object and the spawn-group queue pointer unchanged. That target is CNetworkGameServerBase_ServiceQueue.

Step 2. Confirm the candidate

Decompile the tail-call target and confirm it matches the ServiceQueue shape:

  • a while (1) loop gated on a timer read (a sub_XXXX() returning the current time, compared against a stored deadline of now + 0.005);
  • 16-byte queue-entry walks (shl reg, 4) and a decrement of the 16-bit counter at queue offset +0x16.

Reject a candidate that is only a wrapper that does not itself contain the queue-servicing loop.

Step 3. Generate the signature and write YAML

  1. Use SKILL /generate-signature-for-function with the resolved function address. The signature must be generated from the current function body and pass its uniqueness checks.
  2. Use SKILL /write-func-as-yaml with:
    • func_name=CNetworkGameServerBase_ServiceQueue
    • func_addr=<resolved address>
    • func_rva=<resolved address minus image base>
    • func_size=<current function size>
    • func_sig=<validated signature>

Write one output per input platform:

  • CNetworkGameServerBase_ServiceQueue.windows.yaml beside engine2.dll
  • CNetworkGameServerBase_ServiceQueue.linux.yaml beside libengine2.so

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.