CPython Runtime Introspection
SkillWeb & browsingLets your agent inspect a running Python process from the inside, capturing code, frames, and variables live.
Use CPython Runtime Introspection in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add CPython Runtime Introspection and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the CPython Runtime Introspection skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Inspect embedded or packaged CPython processes at runtime by tracing child processes, acquiring the GIL, injecting Python, replacing builtins.input, walking frame.f_back, exporting frame code objects, locals, globals, and disassembly, and hooking PyEval or marshal boundaries. Use when static extract
What this skill tells your AI
The instructions your AI receives, as published by manyuegong33/r0crawl_skills in skills/cpython-runtime-introspection/SKILL.md and read by ahel’s review.
Prove the process and runtime
- Handle one-file parent and child processes separately.
- Record module bases and the exact Python version.
- Capture an input or output stack and confirm it enters CPython.
- Match injector and target architecture.
Prefer semantic injection
Inject Python-level code instead of reverse engineering the evaluator first:
- Acquire the GIL with
PyGILState_Ensure. - Execute a small payload with
PyRun_SimpleStringFlagsor a compatible API. - Release the GIL.
- Install
scripts/frame_probe.pybefore the interestinginput()or verifier executes.
See references/injection-boundaries.md for native API sequencing.
Walk caller frames
At a semantic choke point such as builtins.input:
- start at
sys._getframe(1) - walk
frame.f_back - record
co_filename,co_name,f_lineno,co_names, andco_consts - safely serialize local/global values
- write
marshal.dumps(frame.f_code)using the target runtime - disassemble in the same Python version
Do not rely on native stacks alone; they usually stop at generic evaluator functions.
Fallback boundaries
If Python-level injection is unavailable, instrument in this order:
PyEval_EvalCodeor version-specific evaluator boundaryPyMarshal_ReadObjectFromStringPyImport_ExecCodeModule*- input or comparison builtins
Quality gates
- Preserve the original input function and restore it after capture.
- Limit repr length and handle repr exceptions.
- Export code objects before modifying locals.
- Confirm dumped marshal objects load under the exact Python version.
- Validate the recovered verifier independently against live behavior.
Signals
- GitHub stars
- 294
- Forks
- 103
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
cpython-runtime-introspection- Source
- github.com/manyuegong33/r0crawl_skills
github.com/manyuegong33/r0crawl_skills
Related picks
Skill · wshobson
The pick for Pythonpython-pro
Skill · jeffallan
The pick for Pythonbrowser-use
Skill · browser-use
More in Web & browsingwebapp-testing
Skill · anthropics
More in Web & browsingplaywright-cli
Skill · microsoft
More in Web & browsingbenchmark
Skill · affaan-m
More in Web & browsing