Agent skill

Neuron Nki Writing

by uw-syfi in uw-syfi/vibesys

Guide for writing and modifying NKI kernels. An agent skill from uw-syfi/vibesys.

MITAuto-check passedAI & LLM Engineering

Install Neuron Nki Writing

skills CLI
$ npx skills add uw-syfi/vibesys --skill neuron-nki-writing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install uw-syfi/vibesys neuron-nki-writing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/uw-syfi/vibesys.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/skills/neuron-agentic-development/skills/neuron-nki-writing .claude/skills/neuron-nki-writing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
neuron-nki-writing
GitHub stars
108
Token cost
~5k tokens
SKILL.md length
1,568 words
Files
54 (incl. references)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Guide for writing and modifying NKI kernels. An agent skill from uw-syfi/vibesys.

  • Works in 10 steps: Identify Operations → Design Tiling Strategy → Implement Memory Access → …
  • User says write NKI kernel
  • SKILL.md covers Critical: NKI Language…, Quick Start, Complexity Assessment and Translation Workflow, plus 8 more sections
  • Runs Python scripts from its folder

What it does

Neuron Nki Writing is an agent skill from uw-syfi/vibesys. Guide for writing and modifying NKI kernels. Covers new kernel creation from PyTorch/NumPy/natural language, editing existing kernels, adding shape/dtype support, refactoring tiling strategies, and implementing new features in NKI code. Use when user says "write NKI kernel", "convert PyTorch to NKI", "translate numpy to NKI", "create NKI kernel", "implement in NKI", "NKI version of", "how to write NKI kernel", "add support for <shape/dtype", "modify this NKI kernel", "extend kernel to handle", "refactor tiling"…

Its SKILL.md is about 5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 58 other files, including reference files (for example `examples/associative_scan.py`, `examples/elementwise_exp.py` and `examples/simple_matmul.py`).

It sits in AI & LLM Engineering, covering Refactoring, Deep learning and Translation. It works with NumPy and PyTorch. The repository describes itself as: Can AI Agents Build Bespoke Systems? The licence is MIT.

When your agent uses it

  • User says write NKI kernel
  • Convert PyTorch to NKI
  • Translate numpy to NKI
  • Create NKI kernel

Example prompts

  • “write NKI kernel”
  • “convert PyTorch to NKI”
  • “translate numpy to NKI”
  • “/neuron-nki-writing”

Requirements

  • Python 3

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Identify Operations
  2. Design Tiling Strategy
  3. Implement Memory Access
  4. Add Compute Operations
  5. Validate Complex Translations
  6. Tensor Layout Flexibility (Conditional)
  7. Large Contiguous Free Dimension in DMA (≥2KB)
  8. Keep Intermediates in SBUF
  9. Maximize Hardware Parallelism (P=128)
  10. Minimum Tile Sizes

What it can do on your machine

Read from SKILL.md and the folder at commit 999938a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Neuron Nki Writing loads about 5k tokens when it runs, and up to ~118k if it reads all its reference files. Until then it costs about 176 tokens; SKILL.md has 1,568 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~176
When it runs · the whole SKILL.md, loaded when a task matches
~5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~118k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from uw-syfi/vibesys at commit 999938a, republished under its MIT licence (© uw-syfi). 1,568 words, ~5,013 tokens.

Download SKILL.mdSave it as .claude/skills/neuron-nki-writing/SKILL.md (or your agent's skills folder). This skill also uses 53 other files; get the full folder from GitHub.
name
neuron-nki-writing
description
Guide for writing and modifying NKI kernels. Covers new kernel creation from PyTorch/NumPy/natural language, editing existing kernels, adding shape/dtype support, refactoring tiling strategies, and implementing new features in NKI code. Use when user says "write NKI kernel", "convert PyTorch to NKI", "translate numpy to NKI", "create NKI kernel", "implement in NKI", "NKI version of", "how to write NKI kernel", "add support for <shape/dtype>", "modify this NKI kernel", "extend kernel to handle", "refactor tiling", "change tile size", "add batch dimension", "support variable length", "fix this kernel logic", "update kernel for gen4", or needs NKI API guidance for kernel changes.
argument-hint
[operation, PyTorch/Numpy code, or existing kernel file]

Writing NKI Kernels

This skill guides writing and modifying NKI (Neuron Kernel Interface) kernels — from new kernel creation (PyTorch/NumPy/natural language translation) to editing existing kernels (adding shape/dtype support, refactoring tiling, implementing new features). Focus on correctness using documented APIs.

Critical: NKI Language Constraints

BEFORE writing any NKI code, read references/nki-language-constraint.md for the complete list of required and forbidden API patterns covering Beta 1 → Beta 2, Beta 2 → NKI 0.3.0, and NKI 0.3.0 → NKI 0.4.0 migration rules. Violating ANY rule is a compilation failure.

Quick Start

Minimal working kernel structure:

python
import nki
import nki.isa as nisa
import nki.language as nl

@nki.jit
def my_kernel(input_hbm: nl.ndarray) -> nl.ndarray:
    """One-line description of kernel operation."""
    # 1. Allocate SBUF tile
    tile = nl.ndarray(input_hbm.shape, dtype=input_hbm.dtype, buffer=nl.sbuf)

    # 2. Load from HBM to SBUF
    nisa.dma_copy(dst=tile, src=input_hbm[0:input_hbm.shape[0], 0:input_hbm.shape[1]])

    # 3. Compute (example: element-wise exp)
    result = nl.ndarray(tile.shape, dtype=tile.dtype, buffer=nl.sbuf)
    nisa.activation(dst=result, data=tile, op=nl.exp)

    # 4. Allocate and store to HBM
    output = nl.ndarray(input_hbm.shape, dtype=input_hbm.dtype, buffer=nl.shared_hbm)
    nisa.dma_copy(dst=output, src=result)

    return output

Complexity Assessment

Before reading references, classify the task to avoid unnecessary overhead:

Simple (element-wise op, single reduction, activation, layernorm, add/multiply):

  • Use the Quick Start template and Step 4 API table directly
  • Skip utility library references entirely
  • Start writing code immediately — consult references only when stuck
  • Target: working kernel within 5 minutes

Medium (matmul, softmax, multi-step fusion, transpose with tiling):

  • Read references/common-patterns.md, references/api-translation.md and references/memory-patterns.md
  • Skip utility library references unless tiling is complex
  • Target: working kernel within 15 minutes

Complex (multi-head attention, transformer blocks, state-space models, MoE):

  • Full reference loading appropriate
  • Read utility selection guide and relevant patterns
  • Target: working kernel within 30 minutes

Start writing code as soon as possible. Reference reading should supplement coding, not precede it. Write the kernel structure first, then consult references for specific API details as needed.

Translation Workflow

Step 1: Identify Operations

Map PyTorch/NumPy operations to NKI equivalents using references/api-translation.md.

Step 2: Design Tiling Strategy

NKI operates on tiles with hardware constraints:

ConstraintLimitNotes
Partition dimension (P)≤ 128First dimension of SBUF tensor
PSUM free dimension≤ 512 (gen2/3) / ≤ 4096 (gen4)For matrix multiply results
SBUF free dimension≤ 32767Second+ dimensions
MatMul K dimension≤ 2048Contraction dimension

For tensors exceeding limits, use explicit tiling with TiledRange for remainder-safe iteration (see Utility Selection Guide below).

Step 3: Implement Memory Access

Consult the Utility Selection Guide to choose the right utilities for the kernel's access patterns, then follow references/memory-patterns.md and references/transpose-and-layout.md:

  • Contiguous DMA: For aligned, sequential access (most efficient)
  • Strided DMA: Use TensorView.slice(step=N) for gather/scatter patterns (see transpose-and-layout.md)
  • Tiling loops: Use TiledRange for dimensions requiring tiling with remainder handling
  • Transpose operations: Use nisa.nc_transpose() for P↔F transpose, TensorView for layout manipulation
  • Partition broadcast: Use stream_shuffle_broadcast when a bias/scale in partition 0 must reach all PEs
  • Buffer management: Use SbufManager when the kernel has 4+ SBUF allocations or shared sub-functions
Step 4: Add Compute Operations

Use ISA functions with explicit dst parameter:

python
# Element-wise
nisa.activation(dst=result, data=input, op=nl.exp)
nisa.tensor_tensor(dst=result, data1=a, data2=b, op=nl.add)
nisa.tensor_scalar(dst=result, data=input, op0=nl.multiply, operand0=2.0)

# Reductions
nisa.tensor_reduce(dst=result, data=input, op=nl.add, axis=1)

# Matrix multiply
nisa.nc_matmul(dst=psum_result, stationary=a, moving=b)
Step 5: Validate Complex Translations

Important: Always compute reference results on CPU, not on the XLA device. Every on-device XLA graph generates a separate NEFF file, making it hard to identify the NKI kernel's NEFF during profiling. Use tensor.cpu() before computing PyTorch/NumPy references.

For simple kernels (single operation, few tiles), comparing the final output against a PyTorch/NumPy reference is usually sufficient. For complex kernels with multiple computation stages, validate incrementally:

  1. Identify logical stages in the source operation. For example, a fused attention kernel has: QK matmul → scale → mask → softmax → AV matmul.
  2. Translate and validate one stage at a time. Write the first stage, store its output to HBM, and compare against the corresponding PyTorch intermediate. Only proceed to the next stage once the current one matches.
  3. Compose validated stages. Once each stage is verified independently, connect them (keeping intermediates in SBUF instead of round-tripping through HBM) and validate the final output.

This catches translation errors early — a mismatch in the final output of a 5-stage kernel is much harder to diagnose than a mismatch after stage 2.

Use multiple complementary checks (atol/rtol, max absolute difference, tensor norm of the difference, cosine similarity) rather than relying on a single metric.

Hardware Constraints Quick Reference

BufferMax PMax FUse Case
nl.sbuf12832767General compute
nl.psum128512 (gen2/3) / 4096 (gen4)MatMul accumulation
nl.shared_hbm--Input/output tensors

Loop Types

Loop TypeUse CaseUnrolling
nl.affine_range(N)Parallel iterations, no dependenciesFull unroll
nl.sequential_range(N)Loop-carried dependencies (cumsum)No unroll
nl.static_range(N)Compile-time constant iterationsPartial unroll

Common Patterns

For detailed code examples, anti-patterns, and production patterns (cumsum, rmsnorm_quant), see references/common-patterns.md.

Element-wise Operations
  • Reshape to 2D, tile P dimension (≤128), use nisa.activation() / nisa.tensor_tensor()
Matrix Multiply — Key Rules
  • Allocate PSUM: nl.ndarray(..., buffer=nl.psum) — uninitialized is correct
  • K-dimension loop: always nl.affine_range(), never nl.sequential_range (serializes execution)
  • Multiple nisa.nc_matmul() writes to same PSUM buffer triggers hardware accumulation
  • Never write PSUM to HBM between accumulation steps
  • Operands: stationary [K≤128, M≤128], moving [K≤128, N≤512/4096], result [M, N] in PSUM
  • Copy PSUM→SBUF via nisa.tensor_copy() before further ops
  • See examples/simple_matmul.py for complete examples
Fused ScalarE Operations
  • nisa.activation(op=nl.exp, data=x, scale=s) → exp(x * s) in one instruction
  • Available: scale, bias, or both before any activation function
Sequential Operations & Associative Scan
  • Use nisa.tensor_tensor_scan instead of explicit sequential loops
  • Pattern: out[i] = op0(data[i], out[i-1]) op1 data1[i]
  • Multi-tile: pass final state as initial= to next tile's scan
  • See examples/associative_scan.py for complete pattern

Skill References

References are tiered to minimize overhead on simple tasks. Load only what you need based on the Complexity Assessment above.

Always load (core references):
  • references/nki-language-constraint.md - MANDATORY: Required and forbidden API patterns for NKI 0.4.0, reference kernel template
  • references/common-patterns.md - Full code examples: matmul PSUM accumulation, fused ScalarE, associative scan, production patterns
  • references/api-translation.md - PyTorch/NumPy to NKI operation mapping
  • references/kernel-template.md - Standard kernel template with self-contained utilities
  • references/indexing-patterns.md - Complete indexing guide: memory-type rules (HBM/SBUF/PSUM), operation constraints (matmul/transpose/reduce), dynamic indexing with DGE modes
Load when tiling or DMA patterns are needed (medium+ complexity):
  • references/memory-patterns.md - DMA and tiling patterns with code examples
  • references/nkilib/core/tiled-range.md - TiledRange: dimension tiling with remainder handling
  • references/nkilib/core/kernel-helpers.md - Math helpers, SPMD, dtype utilities
Load when layout manipulation is needed:
  • references/transpose-and-layout.md - Transpose and layout transformation guide: nc_transpose, TensorView, array patterns, strided DMA, decision trees for layout operations
  • references/nkilib/core/tensor-view.md - TensorView: zero-copy tensor manipulation
Show full SKILL.md (632 more words)Show less
Load when advanced patterns are needed (complex kernels only):
  • references/performance-basics.md - Optimization patterns (fusion, double buffering)
  • references/nkilib/core/allocator.md - SbufManager: stack/heap SBUF allocation
  • references/nkilib/core/tile-info.md - TiledDimInfo: tile tracking with subtile support
  • references/nkilib/ops/ - Copy/broadcast operations (stream-shuffle, tp-broadcast)
  • references/nkilib/types/ - Enum types and logging utilities
  • references/nkilib/patterns/ - Reusable kernel patterns (quantization, normalization, layout conversion, MoE)
Bundled Source Code

Full source for nkilib/core utilities and subkernels:

  • references/nkilib/core/utils/ - Utility source (TensorView, TiledRange, kernel_helpers, SbufManager, etc.)
  • references/nkilib/core/subkernels/ - Reusable sub-operations (RMSNorm, LayerNorm, normalization utils)

Configuration

Default: inline nkilib utility source directly into the user's kernel file from the bundled source above. If nkilib is installed in the user's environment, use from nkilib.core.utils.X import Y imports instead.

Utility Selection Guide

Always Use
UtilityAdopt When
div_ceil(n, d)Any tile count computation. Never write (n + d - 1) // d inline.
kernel_assert()Any input validation. Never use Python assert.
Use When Pattern Matches
UtilityAdopt WhenReference
TiledRangeTiled dimension iteration with remainder handlingreferences/nkilib/core/tiled-range.md
TensorViewStrided/interleaved DMA, broadcasting, reshape without copy, dynamic selectionreferences/nkilib/core/tensor-view.md
stream_shuffle_broadcastReplicate partition-0 value (bias, scale) to all 128 partitionsreferences/nkilib/ops/stream-shuffle-broadcast.md
SbufManager4+ SBUF tensors or sub-functions sharing SBUFreferences/nkilib/core/allocator.md

Specialized: TiledDimInfo (subtile metadata), tp_broadcast (P→F broadcast, very rare).

Decision Flowchart
Kernel needs tiling?
├─ Yes → Use TiledRange for each tiled dimension
│        Use div_ceil() for tile count computations
├─ Nested tiles (subtiles within tiles)?
│  └─ Yes → TiledRange supports nesting: TiledRange(outer_tile, subtile_size)
│           For CTE-style metadata tracking → also consider TiledDimInfo
└─ No → Plain nl.affine_range()

Kernel accesses tensors non-contiguously?
├─ Strided/interleaved → TensorView.slice(step=N)
├─ Broadcasting → TensorView.broadcast(dim, size)
├─ Reshape without copy → TensorView.reshape_dim() / flatten_dims()
├─ Dynamic expert selection → TensorView.select(dim, scalar_offset)
└─ Simple contiguous → plain tensor[start:end, :]

Kernel needs to broadcast a scalar/vector to all partitions?
├─ 1D value in partition 0 → stream_shuffle_broadcast(src, dst)
└─ Column vector (P-dim) to row (F-dim) → tp_broadcast(src, dst, ...)

Kernel allocates many SBUF buffers?
├─ 4+ buffers, or sub-functions share SBUF → SbufManager
└─ 1-3 simple buffers → plain nl.ndarray(..., buffer=nl.sbuf)

Coding Conventions

Follow these conventions unless the user's instructions or existing project style indicate otherwise.

  • Prefer kernel_assert() over Python assert - Produces structured error messages ([NCC_INKI016] Kernel validation exception: ...) that clearly identify errors originating from NKI kernels, which is helpful when kernels run inside larger frameworks. The kernel template (references/kernel-template.md) provides an inline definition; alternatively, import from nkilib if installed.
  • Include docstrings with Args/Returns/Notes sections for non-trivial kernels
  • Validate inputs with shape checks before the kernel body
  • Use descriptive variable names (e.g., partition_idx not p)

Kernel Efficiency Guidelines

These are basic efficiency practices to follow when writing any kernel. They do not require advanced allocation or pipelining — just sensible layout, tiling, and data flow choices.

1. Tensor Layout Flexibility (Conditional)

If the input/output tensor layout would make the kernel significantly harder to write (e.g., requiring many strided DMAs or complex reshaping), ask the user:

"The current tensor layout [describe issue] would require [strided DMA / reshaping]. Would you allow changing the layout to [proposed layout]? This would simplify the kernel and improve performance."

Layout changes that typically help:

  • Putting the reduction dimension last (contiguous in memory)
  • Aligning dimensions to 128 (partition) and 512 (PSUM free)
  • Transposing to avoid strided DMA patterns
2. Large Contiguous Free Dimension in DMA (≥2KB)

DMA efficiency depends on the free dimension (second dimension onwards) being large and contiguous in memory. Target ≥2KB contiguous free dimension to saturate memory bandwidth.

Key concept: In a tile [P, F], the partition dimension P (first dim) is distributed across hardware partitions. The free dimension F (second dim onwards) should be large and contiguous.

Data TypeMinimum Free Dimension (Contiguous)
float32512 elements (2KB)
bfloat161024 elements (2KB)
float82048 elements (2KB)

What "contiguous" means: The free dimension elements are adjacent in HBM memory with stride=1.

Production example from mlp_tkg_gate_up_projection.py:169-181:

python
# Weight layout: [H, I] where I is the contiguous free dimension
# Load weight tile [HTile=2048, I] where I is large and contiguous
# HTile = 2048 for non-quantized (reshapes to [128, 16, I] in SBUF)

nisa.dma_copy(
    dst=weight_tiles[weight_idx][0:H0, 0:h1_tiles, 0:I],  # SBUF: [128, h1_tiles, I]
    src=unsharded_weight.ap(
        pattern=[
            [H1 * unsharded_weight.shape[1], H0],  # Partition dim
            [unsharded_weight.shape[1], h1_tiles], # Batch dim
            [1, I],                                # Free dim - contiguous (stride=1)
        ],
        offset=h_offset * dims.I + weight_shard_offset,
    ),
)
# Here I (intermediate dimension) is the large contiguous free dimension

Why this matters: Strided DMA (free dim not contiguous) has significant overhead. If your tensor layout requires strided access, consider asking the user to change the layout (see Tensor Layout Flexibility above).

3. Keep Intermediates in SBUF

Avoid unnecessary HBM round-trips by keeping intermediate results in SBUF between operations.

Common pattern: MatMul → Element-wise → HBM

python
# MatMul result in PSUM
psum_result = nl.ndarray((P, F), dtype=nl.float32, buffer=nl.psum)
nisa.nc_matmul(dst=psum_result, stationary=a, moving=b)

# Copy to SBUF for element-wise ops (PSUM → SBUF, no HBM)
sbuf_result = nl.ndarray((P, F), dtype=nl.float32, buffer=nl.sbuf)
nisa.tensor_copy(dst=sbuf_result, src=psum_result)

# Element-wise activation in SBUF (still no HBM)
nisa.activation(dst=sbuf_result, data=sbuf_result, op=nl.gelu)

# Only final result written to HBM
nisa.dma_copy(dst=output_hbm, src=sbuf_result)

Anti-pattern to avoid:

python
# BAD: Writing matmul result to HBM, then reading back for activation
nisa.dma_copy(dst=hbm_temp, src=psum_result)      # Unnecessary write
nisa.dma_copy(dst=sbuf_for_act, src=hbm_temp)     # Unnecessary read
nisa.activation(dst=sbuf_for_act, data=sbuf_for_act, op=nl.gelu)
4. Maximize Hardware Parallelism (P=128)

Always try to use the full partition dimension (128) for hardware parallelism.

Production example from mlp_tkg_constants.py:156:

python
# Hardware partition dimension constraint - always use 128
_pmax = nl.tile_size.pmax  # Max partition dimension in SBUF = 128

# Derived dimensions maximize partition usage
H0 = _pmax  # 128 (partition dimension)
H1 = H // H0  # Remaining hidden dimension

# All SBUF tiles use full partition dimension
tile = nl.ndarray((H0, free_dim), dtype=dtype, buffer=nl.sbuf)  # [128, ...]
5. Minimum Tile Sizes
OperationMinimum Tile SizeRationale
MatMul (nc_matmul)(128, 512)Partition=128, PSUM free=512 for pipelining
Vector/Scalar ops(128, 64)Partition=128, free dim ≥64 for efficiency

Production MatMul example from mlp_tkg_gate_up_projection.py:188-204:

python
# Standard matmul tile: stationary [128, T], moving [128, 512]
for i_tiles in TiledRange(I, dims._psum_fmax):  # _psum_fmax = 512
    nisa.nc_matmul(
        dst=result_psums[i_tiles.index][
            nl.ds(dims.column_tiling_dim * column_idx, T),
            0 : i_tiles.size,  # Up to 512
        ],
        stationary=hidden.ap(
            pattern=[[T * H1, H0], [H1, T]],
            offset=h_offset + column_tile_offset,
        ),
        moving=weight_tiles[weight_idx][
            0:H0,  # 128 partition dim
            column_tile_offset,
            nl.ds(i_tiles.start_offset, i_tiles.size),  # Up to 512
        ],
    )

Vector/Scalar tile sizing from mlp_tkg_constants.py:194-206:

python
# column_tiling_dim sets the free dimension for vector/scalar ops
# (e.g., activation functions, element-wise ops after matmul)
# Minimum 64 ensures efficient hardware utilization
if T <= 32:
    column_tiling_dim = 32  # Small T: use 32
elif T <= 64:
    column_tiling_dim = 64  # Medium T: use 64 (minimum for efficiency)
else:
    column_tiling_dim = 128  # Large T: use 128
SkillUse When
/neuron-nki-docsLook up specific API documentation
/neuron-nki-debuggingDebug compiler errors on device
/neuron-nki-profilingProfile kernel performance
/neuron-nki-profile-queryingQuery and analyze kernel profile data

© uw-syfi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 53 other files (references) in resources/skills/neuron-agentic-development/skills/neuron-nki-writing of uw-syfi/vibesys.

  • SKILL.md
  • examples/associative_scan.py
  • examples/elementwise_exp.py
  • examples/simple_matmul.py
  • references/api-translation.md
  • references/common-patterns.md
  • references/indexing-patterns.md
  • references/kernel-template.md
  • references/memory-patterns.md
  • references/nki-language-constraint.md
  • references/nkilib/core/allocator.md
  • references/nkilib/core/kernel-helpers.md
  • references/nkilib/core/subkernels/__init__.py
  • references/nkilib/core/subkernels/find_nonzero_indices.py
  • references/nkilib/core/subkernels/indexed_flatten.py
  • references/nkilib/core/subkernels/indexed_flatten_torch.py
  • … and 38 more

Open the folder on GitHubat commit 999938a

Compare with similar skills

Neuron Nki Writing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Neuron Nki Writing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Neuron Nki Writing this skilluw-syfi/vibesys108—~5kAutomated safety check: PassMIT
Torch Performance Optimizationalbumentations-team/albucore123—~895Automated safety check: PassMIT
Ut Refactor Reviewintel/torch-xpu-ops115—~917Automated safety check: PassApache-2.0
Xtbloom Run Python Inferencejinzhezenggroup/computational-chemistry-agent-skills148—~1.3kAutomated safety check: PassLGPL-3.0
GPU OptimizerMathews-Tom/armory329—~3.5kAutomated safety check: NotesMIT
Docstringpytorch/pytorch104k2 repos~2.6kAutomated safety check: PassCustom licence

Similar skills

  • Torch Performance Optimization

    albumentations-team/albucore

    Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions.

    123 GitHub stars~895 tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Ut Refactor Review

    intel/torch-xpu-ops

    Official

    Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests.

    115 GitHub stars~917 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Xtbloom Run Python Inference

    jinzhezenggroup/computational-chemistry-agent-skills

    Write, review, and run high-level xTBloom Python GFN2-xTB inference with Calculator, Structure, and BatchCalculator, including single systems, repeated geometry updates, heterogeneous ragged…

    148 GitHub stars~1.3k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • GPU Optimizer

    Mathews-Tom/armory

    GPU optimization for consumer NVIDIA GPUs (8-24GB VRAM) covering mixed precision, gradient checkpointing, XGBoost GPU, CuPy/cuDF migration, and torch.compile.

    329 GitHub stars~3.5k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check: notes
  • Docstring

    pytorch/pytorch

    Write docstrings for PyTorch functions and methods following PyTorch conventions.

    104k GitHub starsUsed in 2 repos~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • ExecuTorch Cortex-M Backend

    pytorch/executorch

    Developer guide for the Cortex-M (CMSIS-NN) backend in ExecuTorch: quantization pipeline, pass manager, tests and adding new ops.

    5.1k GitHub stars~872 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from uw-syfi/vibesys

All 15 skills in this repo
  • Neuron Nki Profiling

    uw-syfi/vibesys

    This skill guides using the cli to generate NKI kernel profiles (NEFF + NTFF pairs) to analyze performance on Neuron hardware.

    108 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Neuron Nki Debugging

    uw-syfi/vibesys

    This skill guides debugging NKI compilation errors on Neuron hardware.

    108 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Neuron Nki Docs

    uw-syfi/vibesys

    Research NKI documentation for API lookups, tutorials, error codes, architecture, and optimization guides.

    108 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Query and analyze NKI kernel profile data from neuron-explorer parquet files.

    108 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Triage PRs

    uw-syfi/vibesys

    Triage the open pull requests of the VibeSys repository. An agent skill from uw-syfi/vibesys.

    108 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Open PR

    uw-syfi/vibesys

    Prepare and open VibeSys pull requests from local repo changes.

    108 GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Works with

Questions about Neuron Nki Writing

What does Neuron Nki Writing do?

Guide for writing and modifying NKI kernels. An agent skill from uw-syfi/vibesys. Neuron Nki Writing is an agent skill from uw-syfi/vibesys. Guide for writing and modifying NKI kernels.

When should I use Neuron Nki Writing?

Neuron Nki Writing fits situations like: user says write NKI kernel; convert PyTorch to NKI; translate numpy to NKI; create NKI kernel.

How do I install Neuron Nki Writing in Claude Code?

Run `npx skills add uw-syfi/vibesys --skill neuron-nki-writing -a claude-code`. Or copy the skill folder (resources/skills/neuron-agentic-development/skills/neuron-nki-writing in uw-syfi/vibesys) into .claude/skills/neuron-nki-writing in your project. Claude Code loads it when a task matches its description.

How do I install Neuron Nki Writing in Codex?

Run `npx skills add uw-syfi/vibesys --skill neuron-nki-writing -a codex`. Or copy the skill folder (resources/skills/neuron-agentic-development/skills/neuron-nki-writing in uw-syfi/vibesys) into .agents/skills/neuron-nki-writing in your project. Codex loads it when a task matches its description.

Can I use Neuron Nki Writing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add uw-syfi/vibesys --skill neuron-nki-writing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/neuron-nki-writing, .gemini/skills/neuron-nki-writing, .github/skills/neuron-nki-writing and .opencode/skills/neuron-nki-writing in your project.

What does Neuron Nki Writing need to run?

Going by SKILL.md and its folder, Neuron Nki Writing needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Neuron Nki Writing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Neuron Nki Writing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Neuron Nki Writing use?

Neuron Nki Writing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Neuron Nki Writing use?

About 5k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 113k tokens, read only when the agent opens those files.

What are the alternatives to Neuron Nki Writing?

Skills that share tags, products or a category with Neuron Nki Writing: Torch Performance Optimization (albumentations-team/albucore, 123 stars), Ut Refactor Review (intel/torch-xpu-ops, 115 stars), Xtbloom Run Python Inference (jinzhezenggroup/computational-chemistry-agent-skills, 148 stars) and GPU Optimizer (Mathews-Tom/armory, 329 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Neuron Nki Writing?

uw-syfi (a GitHub organization) maintains it in uw-syfi/vibesys, which has 108 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 11, 2026.

Source: uw-syfi/vibesys on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.