graphics-api-hooking

graphics-api-hooking is a skill for Claude Code from gmh5225/awesome-game-security. It costs 64 tokens per session (3,565 once invoked), scanned A, original, MIT.

A technical guide to intercepting graphics calls and drawing overlays in DirectX, OpenGL, and Vulkan. It also covers examining how a game's rendering pipeline produces frames.

In plain words
What is it for?
Use it when working with functions such as Present, SwapBuffers, draw calls, swap chains, shaders, overlays, screenshots, or graphics debugging in game-security research.
Why use it?
Graphics interception varies by API, driver, application, and capture tool, so the guide helps identify suitable hook points and avoid false conclusions.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

Good fit Use it when working with functions such as Present, SwapBuffers, draw calls…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gmh5225/awesome-game-security/graphics-api
About the project

awesome-game-security is a curated collection focused on security research for games and game software, including cheating, anti-cheat systems, debugging, and anti-debugging. It is intended for security researchers and developers studying or building game-protection tools. The catalogue entries provide skills for AI coding agents related to the repository’s security workflows.

gmh5225/awesome-game-security · 3,479 stars · on GitHub · gs.awesome.rip

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gmh5225/awesome-game-security --skill graphics-api
Clone the repo
git clone --depth 1 https://github.com/gmh5225/awesome-game-security

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graphics-api-hooking

README.md
[![agentmods](https://agentmods.dev/badge/skills/gmh5225/awesome-game-security/graphics-api.svg)](https://agentmods.dev/skills/gmh5225/awesome-game-security/graphics-api)
Your own site
<a href="https://agentmods.dev/skills/gmh5225/awesome-game-security/graphics-api"><img src="https://agentmods.dev/badge/skills/gmh5225/awesome-game-security/graphics-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.03565
Opus 5 $0.00032 $0.01783
Sonnet 5 $0.00013 $0.00713
Haiku 4.5 $0.00006 $0.00357

Measured 7d ago against content hash ca6521798b0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

graphics-api-hooking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/graphics-api/SKILL.md · 501 lines

How it starts

The opening of the file, as written. The whole thing — 501 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Graphics API Hooking & Rendering

Overview

This skill covers graphics API resources from the awesome-game-security collection, including DirectX, OpenGL, and Vulkan hooking techniques, overlay rendering, and graphics debugging.

Capture paths, hook points, synchronization, latency, and observable artifacts vary by API, driver, compositor, application, and tool version. Verify the active path and use research-rigor before attributing a capture or overlay signal.

README Coverage

  • DirectX > Guide
  • DirectX > Hook
  • DirectX > Tools
  • DirectX > Emulation
  • DirectX > Compatibility
  • DirectX > Overlay
  • OpenGL > Guide
  • OpenGL > Source
  • OpenGL > Hook
  • Vulkan > Guide
  • Vulkan > API
  • Vulkan > Hook
  • Cheat > Overlay
  • Cheat > Render/Draw
  • Cheat > Anti Screenshot
  • Anti Cheat > Screenshot
  • Anti Cheat > Detection:Overlay

DirectX

DirectX 9

// Key functions to hook
IDirect3DDevice9::EndScene
IDirect3DDevice9::Reset
IDirect3DDevice9::Present

DirectX 11

// Key functions to hook
IDXGISwapChain::Present
ID3D11DeviceContext::DrawIndexed
ID3D11DeviceContext::Draw

DirectX 12

// Key functions to hook
IDXGISwapChain::Present
ID3D12CommandQueue::ExecuteCommandLists

VTable Hooking

// DX11 Example
typedef HRESULT(__stdcall* Present)(IDXGISwapChain*, UINT, UINT);
Present oPresent;

HRESULT __stdcall hkPresent(IDXGISwapChain* swapChain, UINT syncInterval, UINT flags) {
    // Render overlay here
    return oPresent(swapChain, syncInterval, flags);
}

// Hook via vtable
void* swapChainVtable = *(void**)swapChain;
oPresent = (Present)swapChainVtable[8];  // Present is index 8

OpenGL

Key Functions

wglSwapBuffers
glDrawElements
glDrawArrays
glBegin/glEnd (legacy)

Hook Example

typedef BOOL(WINAPI* wglSwapBuffers_t)(HDC);
wglSwapBuffers_t owglSwapBuffers;

BOOL WINAPI hkwglSwapBuffers(HDC hdc) {
    // Render overlay
    return owglSwapBuffers(hdc);
}

Read the full file on GitHub · 501 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 501 lines · 64 tokens per session scan A ca6521798b0c

Subscribe to this mod's changes

graphics-api-hooking is a skill published in the GitHub repository gmh5225/awesome-game-security (3,479 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 3,565 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

xedit-conflict-audit

Use when auditing conflicts in a Bethesda plugin set — determining for a record (or a plugin's records) which override wins, what the conflict label is, what references it, and whether the configuration is safe or breaking.

hashgraph-online/awesome-codex-plugins · 51 tokens

diagnosing-bgs-problems

A symptom-first guide for investigating crashes, frame-rate drops, stuttering, freezes, and startup failures in Bethesda Game Studios games with mods.

hashgraph-online/awesome-codex-plugins · 72 tokens

adv-debug

Debug and analyze an ADV.JS project using deterministic checks. Use when validating scripts, resolving missing character or scene references, finding dead branches or orphan scenes, measuring route coverage, inspecting compiled project context, or replaying a failing narrative path.

YunYouJun/advjs · 51 tokens

minecraft-debug-mcp

Operate and debug the live Minecraft bot through its built-in MCP REPL server. Use when work requires starting the bot with pnpm dev, connecting to the local MCP endpoint, inspecting cognitive state/logs/history, injecting synthetic chat/events, or running targeted REPL code against the running brain during…

moeru-ai/airi · 68 tokens

console-get-logs

Retrieve Unity Editor logs from the MCP plugin's LogCollector, optionally filtered by log type or time window. Useful for debugging and monitoring Editor activity.

IvanMurzak/Unity-MCP · 35 tokens

editor-application-get-state

Return the current state of UnityEditor.EditorApplication — playmode, paused state, compilation state, and related flags.

IvanMurzak/Unity-MCP · 31 tokens