agentleFS
hoatv2211hoatv2211/GameStudio-CodexKIT/skills/lua-client-server-contract-audit/SKILL.md

lua-client-server-contract-audit

Skill3 starsChanged 3 months agoMITView on GitHub

Use when normalized Lua client/server RPC contract copies or generated protocol tables disagree on opcode, request-response fields, types, ordering, or source authority.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use for Lua packet failures, RPC mismatch, silent request drops, wrong opcodes, missing response fields, duplicated protocol tables, or …

    line 35
  2. Distinctive:

    Do not use for translation text authority, generic localization keys, or runtime network capture that requires service control or …

    line 38
  3. Distinctive:

    Read-only. Never edit generated protocol copies directly, send live exploit packets, start servers, or mutate network state during the …

    line 44
  4. Distinctive:

    Do not treat localized labels as protocol fields.

    line 67
  5. Distinctive:

    Do not send packets to prove a static contract mismatch.

    line 68
  6. Very specific:

    Use the bundled scripts/lua_contract_audit.py on normalized JSON exports and project-local generation maps for authority.

    line 78

≈ “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

Lua Client Server Contract Audit

Overview

Compare normalized client and server protocol contracts without editing either copy, then identify missing packets, opcode drift, field drift, and authority ambiguity.

When to use

Use for Lua packet failures, RPC mismatch, silent request drops, wrong opcodes, missing response fields, duplicated protocol tables, or client/server copy drift.

When NOT to use

Do not use for translation text authority, generic localization keys, or runtime network capture that requires service control or credentials.

Required inputs and context discovery

Collect authoritative and copied protocol paths, generation pipeline, packet names, opcodes, field order/types, request/response direction, client/server versions, and no-touch generated paths.

Safety and risk level

Read-only. Never edit generated protocol copies directly, send live exploit packets, start servers, or mutate network state during the audit.

Workflow

  1. Identify source-of-truth and generated/copied protocol files. Completion criterion: every compared file is labeled source, generated, copy, or unknown.
  2. Normalize packet names, opcodes, direction, and fields into deterministic maps. Completion criterion: parsing ambiguity is reported rather than guessed.
  3. Compare presence, opcode, field names/order/types, and request/response pairing. Completion criterion: mismatches cite both client and server paths.
  4. Trace the generation or synchronization path for each mismatch. Completion criterion: the correct editable source is identified or BLOCKED.
  5. Propose source-first fixes and regression fixtures without mutating live services. Completion criterion: generated copies are never hand-edited.

Evidence and output contract

Produce lua-contract-audit.json with source/copy classification, missing packets, opcode mismatches, field mismatches, authority, generation path, limitations, and recommended source fixes.

Handoff contract

Record client/server paths, versions, source authority, mismatches, generated no-touch files, parsing limitations, and next source-first action.

Pitfalls and anti-rationalization

  • Same packet name does not prove same opcode or fields.
  • Copy synchronization should not be fixed in every destination manually.
  • Do not treat localized labels as protocol fields.
  • Do not send packets to prove a static contract mismatch.

Verification checklist

  • Source and copies are classified.
  • Packet presence, opcodes, and fields were compared.
  • Mismatches cite both sides.
  • Generated files remain untouched.
  • Source-first regression plan exists.

References and scripts

Use the bundled scripts/lua_contract_audit.py on normalized JSON exports and project-local generation maps for authority.

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.