clpeak AGENTS.md

clpeak AGENTS.md is an instructions file for Codex, OpenCode from krrishnarraj/clpeak. It costs 1,760 tokens per session, scanned A, original, Apache-2.0.

Repository-specific instructions for clpeak, a command-line and graphical tool that measures GPU and CPU computing speed, memory bandwidth, and latency across several hardware programming systems.

In plain words
What is it for?
Use it when navigating, building, or modifying clpeak's CPU, OpenCL, Vulkan, CUDA, ROCm/HIP, Metal, oneAPI/SYCL, command-line, or Flutter interface code.
Why use it?
It explains the project's architecture, directory layout, build essentials, and platform requirements so agents can change the correct backend or shared component safely.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/krrishnarraj/clpeak/agents-md
Clone the repo
git clone --depth 1 https://github.com/krrishnarraj/clpeak

Made for: Codex, OpenCode.

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 clpeak AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/krrishnarraj/clpeak/agents-md.svg)](https://agentmods.dev/instructions/krrishnarraj/clpeak/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/krrishnarraj/clpeak/agents-md"><img src="https://agentmods.dev/badge/instructions/krrishnarraj/clpeak/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,760 This file is loaded in full into every session.
When invoked 1,760 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01760 $0.01760
Opus 5 $0.00880 $0.00880
Sonnet 5 $0.00352 $0.00352
Haiku 4.5 $0.00176 $0.00176

Measured 5d ago against content hash fd862cc4f64d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

clpeak AGENTS.md 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 5d 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.

AGENTS.md · 99 lines

How it starts

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

clpeak — "compute latency peak"

Cross-API compute benchmark tool. Measures compute, bandwidth, and latency across OpenCL, Vulkan, CUDA, ROCm/HIP, Metal, and oneAPI/SYCL GPU backends — plus a native CPU backend — from a single binary.

Architecture

Peak (src/common/peak.cpp, include/common/peak.h)   ← abstract base
├── CpuPeak    → src/cpu/                            ← native CPU backend (plain C++ / std::thread; runs first)
├── clPeak     → src/opencl/                         ← OpenCL backend
├── vkPeak     → src/vulkan/                         ← Vulkan backend
├── CudaPeak   → src/cuda/                           ← CUDA backend
├── RocmPeak   → src/rocm/                           ← ROCm/HIP backend
├── MetalPeak  → src/metal/                          ← Metal backend
└── OneapiPeak → src/oneapi/                         ← oneAPI/SYCL backend (Intel GPUs)

Shared code lives in src/common/ and include/common/. Each backend has its own CMakeLists.txt that builds a static library (peak_opencl, etc.). The CLI entry point is src/cli/main.cpp. The Flutter GUI (app/) drives the same backends through the clpeak_ffi C-ABI bridge (src/ffi/).

Directory Map

Path Purpose
include/common/ All neutral headers — peak.h, benchmark_enums.h, logger.h (base), logger_text.h (shared text logger), etc.
include/opencl/ OpenCL backend headers — cl_peak.h, cl_common.h
include/vulkan/ Vulkan backend header — vk_peak.h
include/cuda/ CUDA backend header — cuda_peak.h
include/rocm/ ROCm/HIP backend header — rocm_peak.h
include/metal/ Metal backend header — mtl_peak.h
include/oneapi/ oneAPI/SYCL backend header — oneapi_peak.h
include/cpu/ Native CPU backend header — cpu_peak.h
src/common/ Peak base, gating, result store, calibration, inventory (no logger)
src/opencl/ OpenCL backend: clPeak class + per-benchmark .cpp + .cl kernels
src/vulkan/ Vulkan backend: vkPeak class + SPIR-V shaders
src/cuda/ CUDA backend: CudaPeak class + .cu kernels (AOT-compiled to fatbins at build time, embedded in the binary)
src/rocm/ ROCm/HIP backend: RocmPeak class + .hip kernels (AOT-compiled with hipcc --genco at build time, embedded in the binary)
src/metal/ Metal backend: MetalPeak class (ObjC++) + .metal kernels
src/oneapi/ oneAPI/SYCL backend: OneapiPeak class + SYCL kernels (inline lambdas, AOT/JIT via DPC++)
src/cpu/ Native CPU backend: CpuPeak class + std::thread pool + per-ISA SIMD kernels (one feature TU per ISA, runtime-dispatched); cache/DRAM bandwidth + memory latency
src/cli/ Desktop CLI: main.cpp
src/ffi/ clpeak_ffi C-ABI bridge for the GUI (event-stream logger, launch/cancel, catalog); clpeak-gui CMake target; Android/iOS build superprojects
app/ Flutter GUI — one codebase for Android, iOS, macOS, Linux, Windows (Dart FFI over src/ffi)
third_party/ Vendored submodules: libopencl-stub, Vulkan-Headers (Android build)
tool/ Helper scripts (build_ios_native.sh — stages the iOS xcframework; make_dmg.sh — macOS GUI disk image; shader_ops.py — reads a Vulkan shader's inner loop back out of the compiled SPIR-V)
src/common/cmake/ Version handling (version.cmake, version.h.in) — git-describe once at configure time
results/ Saved reference runs (--xml-file output) per vendor — the baselines a suspicious number gets checked against
snap/ Snap packaging (snapcraft.yaml, classic confinement)
packaging/flatpak/ Flathub packaging — manifest + AppStream MetaInfo (Vulkan+OpenCL+CPU only)
packaging/homebrew/ Homebrew formula (clpeak.rb) for macOS + Linuxbrew, targeting homebrew-core
docs/ GitHub Pages site (Jekyll, built natively by Pages from this folder — no plugins). Also holds the app screenshots the README links to, in docs/assets/img/

Read the full file on GitHub · 99 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. 5d ago First seen · 99 lines · 1,760 tokens per session scan A fd862cc4f64d

Subscribe to this mod's changes

clpeak AGENTS.md is an instructions file published in the GitHub repository krrishnarraj/clpeak (517 stars, last pushed today), licensed Apache-2.0. It adds 1,760 tokens to every session, about $0.0088 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.