inspect
Skill413 starsChanged 5 months agoMITView on GitHub
Inspect the AD pipeline IR for a Julia function at each Mooncake compilation stage.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- Noah-OS/longhaultheir own version, first seen Nov 15, 2026
- matthewdonsemail-lab/logtheir own version, first seen Nov 15, 2026
- sanityops-org/sanityops-frameworktheir own version, first seen Nov 4, 2026
- cyrilichti/agent-workflowstheir own version, first seen Oct 17, 2026
- saleh-alhaddad/itqan-engineeringtheir own version, first seen Sep 29, 2026
- ZeeshanSultan/DocGovtheir own version, first seen Sep 13, 2026
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- Arman-Kudaibergenov/1c-ai-development-kit★ 163same name
- bluzir/claude-code-design★ 102same name
- matthewdonsemail-lab/log★ 63same name
- NakaokaRei/swift-mcp-gui★ 61same name
- howardpen9/cc-inspect★ 17same name
- saleh-alhaddad/itqan-engineering★ 10same name
- HaipingShi/coderail★ 8same name
- Noah-OS/longhaul★ 4same name
- cyrilichti/agent-workflows★ 3same name
- sanityops-org/sanityops-framework★ 3same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- minimiseSkill
- scrutiniseSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Do not assume — ask the user to pick.
- Distinctive: line 84
Run commands via Bash and present IR in fenced code blocks.
- Distinctive: line 85
When showing diffs, explain what changed and why the transformation matters.
- Distinctive: line 86
If errors occur, check that Mooncake is loaded and the function signature is valid.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Inspect
Inspect IR transformations in Mooncake's AD pipeline for a given function.
Setup
using Mooncake, Mooncake.SkillUtilsGathering user intent
Ask the user:
- Function and arguments — e.g.
sin, 1.0or a custom function - Mode — reverse (default) or forward
- What to view — all stages, a specific stage, a diff between two stages, or world age info
Do not assume — ask the user to pick.
Pipeline stages
Reverse mode (default)
| Stage | Symbol | Description |
| Raw IR | :raw | optimised, type-inferred SSAIR from Julia's compiler |
| Normalised | :normalized | after Mooncake's normalisation passes |
| CFG blocks | :cfg_blocks | Vector{CFGBlock} representation with stable IDs |
| Forward IR | :fwd_ir | generated forward-pass IR |
| Reverse IR | :rvs_ir | generated pullback IR |
| Optimised Forward | :optimized_fwd | forward pass after optimisation |
| Optimised Reverse | :optimized_rvs | pullback after optimisation |
Forward mode
| Stage | Symbol | Description |
| Raw IR | :raw | optimised, type-inferred SSAIR from Julia's compiler |
| Normalised | :normalized | after Mooncake's normalisation passes |
| CFG blocks | :cfg_blocks | inspection-only — forward mode does not use the CFGBlock representation internally |
| Dual IR | :dual_ir | generated dual-number IR |
| Optimised | :optimized | after optimisation passes |
Commands
# Full inspection
ins = inspect_ir(f, args...; mode=:reverse) # or mode=:forward
# View stages
show_ir(ins) # all stages
show_stage(ins, :raw) # one stage
# Diffs between stages
show_diff(ins; from=:raw, to=:normalized)
show_all_diffs(ins)
# World age debugging
show_world_info(ins)
# Write everything to files
write_ir(ins, "/tmp/ir_output")
# Shorthand helpers
ins = inspect_fwd(f, args...) # forward mode
ins = inspect_rvs(f, args...) # reverse mode
ins = quick_inspect(f, args...) # inspect + display immediately
# Options
inspect_ir(f, args...;
mode = :reverse,
optimize = true,
do_inline = true,
debug_mode = false,
)Presenting results
- Run commands via Bash and present IR in fenced code blocks.
- When showing diffs, explain what changed and why the transformation matters.
- If errors occur, check that Mooncake is loaded and the function signature is valid.
Limitations
Inspects Mooncake's internal AD pipeline only. For allocation, world-age, or compiler-boundary debugging, see docs/src/developer_documentation/advanced_debugging.md.
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.

