neuron-nki-writer-agent

neuron-nki-writer-agent is an agent for Claude Code from aws-neuron/neuron-agentic-development. It costs 319 tokens per session (1,851 once invoked), scanned A, original, Apache-2.0.

An agent for writing and changing NKI kernels, which are programs that run tensor operations on AWS Neuron chips. It can work from PyTorch, NumPy, or a written description.

In plain words
What is it for?
Use it to create kernels, modify existing NKI code, add shape or data-type support, refactor how data is tiled, and implement kernel features.
Why use it?
It reduces the manual work of translating tensor code and adapting kernels to new shapes, data types, tiling strategies, or requirements.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool; mentions Claude Code.

Good fit Use it to create kernels, modify existing NKI code, add shape or data-type support, refactor how data is tiled, and implement kernel features.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent
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.

Clone the repo
git clone --depth 1 https://github.com/aws-neuron/neuron-agentic-development

Made for: Claude Code.

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 neuron-nki-writer-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent/github.svg)](https://agentmods.dev/agents/aws-neuron/neuron-agentic-development/neuron-nki-writer-agent)
Your own site
<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/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.

agentmods 80×15 button for neuron-nki-writer-agent

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 319 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00319 $0.01851
Opus 5.5 $0.00128 $0.00740
Sonnet 5.5 $0.00064 $0.00370
Haiku 4.5 $0.00032 $0.00185

Measured today against content hash 16c847e606b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 today.

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/neuron-nki-writer-agent.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 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:

  1. 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-docs to look up unfamiliar APIs or confirm operation signatures
  2. Consult /neuron-nki-writing — use the skill for hardware constraint tables, tiling strategy design, utility selection guide (TiledRange, TensorView, SbufManager), and memory access patterns
  3. Generate kernel — follow the kernel template and coding conventions in the /neuron-nki-writing skill (kernel_assert, div_ceil, docstrings, descriptive names). Add the attribution line (see Attribution)
  4. 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 NkiTensor view 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, plus t.is_contiguous() / t.is_indirect()) instead of hand-coding .ap() for reshapes/slices. See api-nki-tensor.md.
  • Tensor indirection on compute ops (.indirect()) — on NeuronCore-v4+, do on-chip gather/scatter by passing a .indirect(index) view as dst/data to 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-only vector_offset indirection to compute. See NkiTensor.indirect.

Read the full file on GitHub · 116 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. today Changed · +14 lines 16c847e606b8
  2. 3mo ago First seen · 102 lines · 319 tokens per session scan A 277023805b4b

Subscribe to this mod's changes

neuron-nki-writer-agent is an agent published in the GitHub repository aws-neuron/neuron-agentic-development (72 stars, last pushed yesterday), licensed Apache-2.0. It adds 319 tokens to every session and 1,851 once invoked, about $0.0013 per session on Opus 5.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.

Related

neuron-nki-writer-agent compared with agents from other repositories

neuron-nki-writer-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
neuron-nki-writer-agentaws-neuron/neuron-agentic-developmentAgent72yesterdayApache-2.0A319Claude Code
cocotb-reviewerbabyworm/rtl-agent-teamAgent68yesterdayMITA51Claude Code
it-engineerserejaris/personal-corp-osAgent2519d agoMITA66Claude Code
fabricatorpjt222/agent-almanacAgent46yesterdayMITA25Claude Code
persona-highvibeic/vibe-icAgent32todayApache-2.0A111Claude Code
rtl-plannerbabyworm/rtl-agent-teamAgent68yesterdayMITA43Claude Code
antenna-engineerK-Dense-AI/scientific-agentsAgent2672mo agoMITA97Claude Code