find-what-writes
Skill0 starsChanged 48 days agoMITView on GitHub
Find the instruction that writes (or reads) a memory address, with Pointer Lab's access watch over MCP, and read the registers it captured to find the structure the value lives in. Use when the user asks what writes to an address, what changes a value, which code decreases health, or wants to NOP or hook the code behind a value, or is on Pointer Lab tutorial steps 5, 8 or 9.
In this repository7 other files it gives its agents.
- find-a-valueSkill
- make-a-signatureSkill
- netcode-first-lookSkill
- safetySkill
- static-reconSkill
- walk-a-pointer-chainSkill
- write-a-trainerSkill
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
- Very specific: line 14
Check the target against the safety skill first.
- Very specific: line 21
Start the watch on the value's address.
- Very specific: line 29
Use "writes_only": false to also catch reads, for example to find the code that draws the value.
- Very specific: line 45
Read the site that matches.
- Distinctive: line 65
Stop the watch. It holds one of the CPU's four debug registers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Find what writes to an address
A hardware data breakpoint on the value's address traps every instruction that writes it. Pointer Lab groups the hits by instruction and explains the registers. Handbook: Ch. 12 Finding Game Data, Ch. 15 Debugging with x64dbg, Ch. 16 Code Caves and NOP. Tutorial: step 5 (find it and NOP it), step 8 (find it before injecting), step 9 (shared code).
Check the target against the safety skill first. You need an address from
find-a-value, and Pointer Lab's MCP tools (see find-a-value for setup).
Procedure
The addresses and ids below are examples. Use the ones your calls return.
Start the watch on the value's address.
lengthis the value's size: 4 for i32 and f32, 8 for f64 and i64. The address must be aligned to that size. The watch attaches Pointer Lab's debugger by itself.access_watch_start {"address": 2381400145672, "length": 4, "writes_only": true}Use
"writes_only": falseto also catch reads, for example to find the code that draws the value.- Make the value change. Ask the user to trigger it (tutorial: Hit me) and to say how many times they did.
Read the sites.
access_watch_sites {}Each site has
address(the instruction),text,hit_count,instruction_resolved, andregisters, a list of{register, value, means}.Read the site that matches. The right one has a
hit_countequal to the number of changes the user made. Then look atmeans:"watched address is RBX+0x10"says the object's base is in RBX and the value is at offset 0x10 inside it. That offset is the last offset of the pointer chain (walk-a-pointer-chain), and it is the same for every object of this type.- A
meansnaming the value itself, such as RAX holding the new value, tells you where the new value came from.
See the code around it, and name it.
disassemble {"address": 140699127795536, "count": 10} describe {"address": 140699127795536}describereturns a name such asPointerLabTutorial.exe+0x1A2B. Write that down, not the absolute address: ASLR moves the module next run.Stop the watch. It holds one of the CPU's four debug registers.
access_watch_stop {}
Success, and dead ends
Success is one site whose hit_count tracks the user's actions, with
instruction_resolved: true and a means line that names a base register
and an offset.
| What happened | What it means | Next step |
access_watch_start fails: not aligned | The address is not a multiple of length | Use the value's real size. A 4-byte value on an odd address is a packed struct; watch with length 1 |
| No sites after several changes | The address is a copy the game only displays, or the change goes through another address | Go back to find-a-value and find the address the game reads. Try writes_only: false to see who reads this one |
instruction_resolved: false | A data watchpoint traps after the write; the walk back to the instruction failed | Use trap_address_hex; the writer is the instruction just before it. disassemble a few bytes earlier |
Many sites, or one site with a huge hit_count | Shared code: a memcpy or a function that writes many objects | This is step 9. See below |
| Hits climb with no user action | A timer or a background thread writes it | Normal for a regenerating value. Compare means across hits |
Shared code (tutorial step 9)
One instruction writes both the player's and the enemy's health. NOPing it makes both invulnerable. To tell them apart, compare the two objects.
- From the site's
registers, take the base register value for the player. Find the enemy's value the same way and watch it too, or read the second hit's registers. Lay both objects side by side:
struct_add {"name": "Fighter"} struct_guess {"id": 1, "addresses": [2381400145664, 2381400146176], "size": 64} struct_read {"id": 1, "addresses": [2381400145664, 2381400146176]}Rows with
identical: falseare the fields that tell the objects apart. In the tutorial the id field is at offset 4: 1 for the player, 2 for the enemy.- The fix is an injection that compares that field and skips the write for
one object. That is
aa_checkthenaa_set_enabled, andaa_set_enabledneeds the user's opt-in (safety). Write the script, runaa_check, and show the user its notes before anything is enabled.
Removing the instruction (tutorial step 5)
A NOP is patch_apply with 90; Pointer Lab pads it with more NOPs to cover
the whole instruction. It is blocked until the user opts in. Before calling
it, show the instruction from disassemble and say that patch_restore_all
puts it back.
patch_apply {"address": "PointerLabTutorial.exe+0x1A2B", "hex": "90", "description": "NOP the health write"}
patches_list {}The user can also select the site in the Access Watch panel and press NOP.
Next: make-a-signature for the instruction you found, so it can be found
again after an update.
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
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.

