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.
npx skills add AMD-AGI/Apex --skill aiter-reflectiongit clone --depth 1 https://github.com/AMD-AGI/ApexWrote 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.
[](https://agentmods.dev/skills/amd-agi/apex/aiter-reflection)<a href="https://agentmods.dev/skills/amd-agi/apex/aiter-reflection"><img src="https://agentmods.dev/badge/skills/amd-agi/apex/aiter-reflection/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/amd-agi/apex/aiter-reflection"><img src="https://agentmods.dev/badge/skills/amd-agi/apex/aiter-reflection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.00766 |
| Opus 5.5 | $0.00018 | $0.00306 |
| Sonnet 5.5 | $0.00009 | $0.00153 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade C, and why
aiter-reflection scanned grade C with 1 finding 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 3mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- `rm -f aiter/jit/*.so && rm -rf aiter/jit/build ~/.aiter` How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Aiter Reflection
Overview
Optimize AMD MI300 GPU kernels for correctness and performance using the aiter workflow, then record each iteration to the kernel experiment database.
Workflow
1) Locate targets and understand tests
- Use the provided context to identify target kernel files, kernels, and their op tests.
- Run the op tests once to understand output format and verify correctness expectations. (Attention: Stucked background op test processes and lock files under jit folder may cause the op tests running failed; Op tests require JIT compiling, please be prepared to wait for a long time)
2) Build a benchmark shell script
- Come up with a new name for this iteration and create a folder logs/. Put the shell script under this folder
- Reuse the existing op_test python script
- Covers common shapes: 128, 256, 512, 1024, 2048, 4096 if applies
- Repeats each op test multiple times and reports the correctness and the average time consuming.
- Use at least 100 iterations per configuration for reliable results
- Include 10-20 warmup iterations to handle JIT compilation overhead
- Add torch.cuda.synchronize() after each kernel call
- Use fixed random seed for reproducibility
- Use high-precision timing (time.perf_counter())
- Implements a robust timeout to avoid hangs.
- Outputs structured timing per shape.
3) Establish a baseline
- Before testing: Check for background GPU processes that may interfere
- Use
rocm-smiorps aux | grep pythonto identify GPU tasks - Stop any unrelated GPU workloads
- Use
- Clear JIT compilation cache to ensure clean state
- Run the benchmark script using the
.venvPython environment - Save results under logs/ folder with timestamp
4) Iterate on kernel optimization (one iteration)
- Read the kernel source, identify bottlenecks, and call
rocprof-computeat least once to deepen bottleneck analysis. - Use
kernel-exp-historyto review related optimization history and extract ideas. - Modify the kernel file to improve performance for multiple shapes allowed.
- Save the changes: (git diff > logs//iter_diff.patch)
- Reinstall aiter and clear cache:
python -m pip install -e . --no-build-isolation --no-deps --force-reinstallrm -f aiter/jit/*.so && rm -rf aiter/jit/build ~/.aiter
- Re-run the benchmark to measure the new performance.
- If results seem suspicious (unexpected regressions):
- Verify no background processes are running
- Re-test baseline with same methodology
- Check if JIT compilation overhead affected measurements
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.
- 3mo ago First seen · 73 lines · 46 tokens per session scan C e71dfa936c10
aiter-reflection is a skill published in the GitHub repository AMD-AGI/Apex (80 stars, last pushed 2mo ago), licensed MIT. It adds 46 tokens to every session and 766 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
aiter-reflection compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| aiter-reflectionAMD-AGI/Apex | Skill | 80 | 2mo ago | MIT | C | 46 | Claude Code, Codex |
| write-cuda-layernorm-kerneltensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| write-cuda-reduction-kerneltensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| write-triton-gemm-kerneltensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| write-triton-layernorm-kerneltensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| choose-tile-size-and-work-partitioningtensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |
| write-numerically-stable-kerneltensormux/kernel-skills | Skill | 93 | 5mo ago | MIT | A | 0 | Claude Code, Codex |