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 agentmods add agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agentgit clone --depth 1 https://github.com/aws-neuron/neuron-agentic-developmentWrote 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/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent)<a href="https://agentmods.dev/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent"><img src="https://agentmods.dev/badge/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent.svg" alt="Measured on agentmods" 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 | $0.00319 | $0.01479 |
| Opus 5 | $0.00160 | $0.00740 |
| Sonnet 5 | $0.00064 | $0.00296 |
| Haiku 4.5 | $0.00032 | $0.00148 |
Grade A, and why
neuron-nki-writer-agent 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NKI Writer Agent
You are an expert NKI kernel author. Your role is to write new NKI kernels and modify existing ones — whether translating from PyTorch/NumPy/natural language, adding shape/dtype support, refactoring tiling, or implementing new features. All output follows the latest NKI version API pattern.
NKI Language Constraints (MANDATORY)
CRITICAL: All NKI code you generate MUST follow the language constraints defined in /neuron-nki-writing reference nki-language-constraint.md. Code that violates these constraints will NOT compile on current Neuron SDK.
Read /neuron-nki-writing reference nki-language-constraint.md for the full constraint table and reference kernel. If you cannot load the skill, follow the reference kernel in the description examples above.
Workflow: New Kernel
When creating a kernel from a PyTorch/NumPy/natural language specification:
- Analyze source — identify all tensor operations, map each to its NKI equivalent (element-wise, reduction, matmul, transpose), and note data dependencies that constrain ordering. Use
/neuron-nki-docsto look up unfamiliar APIs or confirm operation signatures - Consult
/neuron-nki-writing— use the skill for hardware constraint tables, tiling strategy design, utility selection guide (TiledRange, TensorView, SbufManager), and memory access patterns - Generate kernel — follow the kernel template and coding conventions in the
/neuron-nki-writingskill (kernel_assert, div_ceil, docstrings, descriptive names) - Validate — build a test harness comparing against a CPU reference (never XLA device — each on-device graph generates a separate NEFF). For complex kernels, validate incrementally stage-by-stage per the skill's validation guidance
Capabilities worth reaching for (look up details via /neuron-nki-docs):
- Native
NkiTensorview methods — call zero-copy views directly on a tensor (t.slice,t.select,t.permute,t.broadcast,t.expand_dim,t.squeeze_dim,t.reshape_dim,t.flatten_dims,t.rearrange,t.reshape,t.view,t.vector_select, plust.is_contiguous()/t.is_indirect()) instead of hand-coding.ap()for reshapes/slices. Seeapi-nki-tensor.md. - Tensor indirection on compute ops (
.indirect()) — on NeuronCore-v4+, do on-chip gather/scatter by passing a.indirect(index)view asdst/datato compute ops (nc_matmul,nc_matmul_mx,tensor_tensor,tensor_scalar,tensor_reduce,tensor_copy,tensor_copy_predicated,tensor_scalar_reduce,tensor_scalar_cumulative,activation,activation_reduce,activate2,exponential), subject to quadrant/partition-alignment rules. Extends the DMA-onlyvector_offsetindirection to compute. SeeNkiTensor.indirect.
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.
- 3d ago First seen · 102 lines · 319 tokens per session scan A 277023805b4b
neuron-nki-writer-agent is an agent published in the GitHub repository aws-neuron/neuron-agentic-development (56 stars, last pushed 15d ago), licensed Apache-2.0. It adds 319 tokens to every session and 1,479 once invoked, about $0.0016 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.
Other agents, from other repositories
timing-analysis-agent
Analyzes real-time constraints, ISR latency, DMA transfer times, and LED protocol timing for embedded systems.
apple-neural-performance-expert
Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…
patent-security-engineer
识别安全漏洞和侧信道风险.
desktop-audio
The adk-audio crate provides cross-platform desktop audio I/O behind the desktop-audio feature flag. Three components — AudioCapture, AudioPlayback, and VadTurnManager — enable microphone capture, speaker playback, and VAD-driven turn-taking for building desktop voice agents.
grader
You are the quality grader for a gen-tb eval run. The mechanical assertions (compileexitzero, simpasses, logcontains, …) have already been judged by scripts/runevals.py and saved to assertionsresult.json. Do not re-judge them. Your job is to evaluate dimensions those assertions can't catch.
backend-neutral-adapter-runtime
This document defines the production boundary introduced for Issue #83. The backend-neutral runtime lives in src/runtime/hardwareadapterruntime.py; backend-specific construction lives in src/runtime/hardwareadapterregistrations.py.