Agent skill

Numa Programming

by mohitmishra786 in mohitmishra786/low-level-dev-skills

NUMA programming skill for multi-socket memory locality. An agent skill from mohitmishra786/low-level-dev-skills.

MITAuto-check passed

Install Numa Programming

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill numa-programming -a claude-code

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

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills numa-programming --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/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/allocators/numa-programming .claude/skills/numa-programming && 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
numa-programming
GitHub stars
253
Token cost
~1.5k tokens
SKILL.md length
304 words
Files
1
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

NUMA programming skill for multi-socket memory locality. An agent skill from mohitmishra786/low-level-dev-skills.

  • Works in 9 steps: Topology detection → Process binding with numactl → libnuma API → …
  • Detecting NUMA topology
  • SKILL.md covers Purpose, When to Use, Workflow and Common Problems, plus 1 more section
  • Calls node and apt

What it does

Numa Programming is an agent skill from mohitmishra786/low-level-dev-skills. NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology, mbind, lstopo, or remote memory access.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Detecting NUMA topology
  • Binding processes with numactl
  • Using libnuma API
  • Building NUMA-aware data structures

Example prompts

  • “/numa-programming”

Workflow steps

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

  1. Topology detection
  2. Process binding with numactl
  3. libnuma API
  4. NUMA-aware data structures
  5. Thread affinity alignment
  6. Remote access diagnosis
  7. Measuring remote penalty
  8. lstopo visualization
  9. Decision tree

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. 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

    Shell commands in SKILL.md call:

    • node
    • apt

    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

Numa Programming loads about 1.5k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 304 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 304 words, ~1,515 tokens.

Download SKILL.mdSave it as .claude/skills/numa-programming/SKILL.md (or your agent's skills folder).
name
numa-programming
description
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology, mbind, lstopo, or remote memory access.

NUMA Programming

Purpose

Guide agents through NUMA-aware programming: topology detection with numactl and sysfs, libnuma API (numa_alloc_onnode, mbind, set_mempolicy), process binding with numactl, NUMA-aware data structures, remote access diagnosis with perf stat, and lstopo visualization.

When to Use

  • Multi-socket server shows poor scaling despite low CPU utilization
  • Memory bandwidth saturation on one NUMA node
  • Binding database or cache process to local memory
  • Designing per-node freelists or sharded allocators
  • Measuring remote vs local memory access latency
  • Tuning HPC, DPDK, or custom allocator for socket locality

Workflow

1. Topology detection
bash
# Hardware topology summary
numactl --hardware

# Detailed topology with distances
lstopo --of console

# sysfs nodes
ls /sys/devices/system/node/
cat /sys/devices/system/node/node0/meminfo
cat /sys/devices/system/node/node0/cpulist

Typical output:

available: 2 nodes (0-1)
node 0 cpus: 0-15
node 0 size: 65536 MB
node 1 cpus: 16-31
node 1 size: 65536 MB
node distances:
node   0   1
  0:  10  21
  1:  21  10

Distance 10 = local, higher = remote (cross-socket).

2. Process binding with numactl
bash
# Bind to node 0 CPUs and memory
numactl --cpunodebind=0 --membind=0 ./myapp

# Interleave memory across all nodes
numactl --interleave=all ./myapp

# Preferred node (fallback if full)
numactl --preferred=0 ./myapp

# Show process NUMA policy
numactl --show
cat /proc/self/numa_maps
3. libnuma API
c
#include <numa.h>
#include <numaif.h>
#include <stdio.h>

int main(void) {
    if (numa_available() < 0) {
        fprintf(stderr, "NUMA not available\n");
        return 1;
    }
    int node = numa_node_of_cpu(0);
    printf("CPU 0 on node %d\n", node);

    // Allocate on specific node
    size_t size = 1024 * 1024 * 1024;
    void *mem = numa_alloc_onnode(size, 0);
    if (!mem) return 1;

    // Bind existing memory
    unsigned long nodemask = 1UL << 0;
    mbind(mem, size, MPOL_BIND, &nodemask, sizeof(nodemask) * 8, 0);

    numa_free(mem, size);
    return 0;
}
bash
gcc -o numa_test numa_test.c -lnuma
APIPurpose
numa_alloc_onnodeAllocate on specific node
numa_alloc_localAllocate on current CPU's node
mbindSet policy on existing mapping
set_mempolicyDefault policy for subsequent allocs
move_pagesMigrate pages to target node
4. NUMA-aware data structures
c
// Per-node freelist — avoids cross-node synchronization
#define MAX_NODES 8
struct per_node_pool {
    void *free_list[MAX_NODES];
    int   node_count;
};

void *pool_alloc_numa(struct per_node_pool *p) {
    int node = numa_node_of_cpu(sched_getcpu());
    void *blk = p->free_list[node];
    if (blk) {
        p->free_list[node] = *(void **)blk;
        return blk;
    }
    return numa_alloc_onnode(BLOCK_SIZE, node);
}

Pin threads to cores on the same node as their pool.

5. Thread affinity alignment
bash
# Pin thread 0 to CPU 0 (node 0), allocate on node 0
numactl --cpunodebind=0 --membind=0 ./worker --id 0
numactl --cpunodebind=1 --membind=1 ./worker --id 1
c
#include <pthread.h>
#include <sched.h>

cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(target_cpu, &cpuset);
pthread_setaffinity_np(pthread_self(), sizeof(cpuset), &cpuset);
6. Remote access diagnosis
bash
# Cache misses often spike with remote memory
perf stat -e cache-misses,cache-references,node-load-misses \
    numactl --cpunodebind=0 --membind=1 ./myapp

# Compare local vs remote binding
perf stat numactl --cpunodebind=0 --membind=0 ./myapp
perf stat numactl --cpunodebind=0 --membind=1 ./myapp
bash
# NUMA hit/miss stats (if available)
perf stat -e node-loads,node-load-misses,node-stores ./myapp
7. Measuring remote penalty
c
// Microbenchmark: touch 1GB on local vs remote node
clock_t start = clock();
for (size_t i = 0; i < size; i += 4096)
    sum += ((char *)mem)[i];

Expect 1.5–3x slowdown for remote access depending on interconnect (QPI/UPI/Infinity Fabric).

8. lstopo visualization
bash
# Graphical (if X11)
lstopo

# Text with memory/PCI
lstopo --of ascii

# Export for documentation
lstopo file.png

Shows: NUMA nodes, cores, caches, PCI devices — essential for DPDK NIC placement.

9. Decision tree
Poor scaling on multi-socket?
├── Check numactl --hardware
├── Verify thread and memory on same node
├── perf stat node-load-misses
├── Remote misses high?
│   ├── numactl --membind=local
│   └── Per-node data partitioning
└── Still slow → memory bandwidth bound; reduce sharing

Common Problems

SymptomCauseFix
OOM on one node despite free RAM elsewhereMPOL_BIND too strictUse --preferred or interleave
2x slower after scaling threadsRemote memory accessnumactl --membind matching CPU node
Inconsistent benchmark resultsOS migrated pagesmbind MPOL_BIND; mlock if needed
DPDK NIC on wrong socketPCI far from CPUlstopo; bind EAL to local socket
libnuma not foundPackage not installedapt install libnuma-dev
First-touch policy surpriseAlloc on node 0, run on node 1Allocate from bound thread
  • skills/allocators/custom-allocators — per-node pool allocators
  • skills/async-io/dpdk — rte_malloc_socket, NIC NUMA locality
  • skills/hpc/mpi — MPI process binding per NUMA node
  • skills/profilers/hardware-counters — cache miss measurement
  • skills/profilers/linux-perf — perf NUMA events
  • skills/low-level-programming/cpu-cache-opt — cache locality fundamentals

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

Files

Just SKILL.md in skills/allocators/numa-programming of mohitmishra786/low-level-dev-skills.

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Numa Programming 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.

Numa Programming compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Numa Programming this skillmohitmishra786/low-level-dev-skills253—~1.5kAutomated safety check: PassMIT
LocalizeDonchitos/Claude-Code-Game-Studios26k—~5.2kAutomated safety check: NotesMIT
SEO LocalAgriciDaniel/claude-seo18k—~4.5kAutomated safety check: PassMIT
Threat Detectionalirezarezvani/claude-skills28k—~3.5kAutomated safety check: PassMIT
Local Legal SEO Auditsickn33/agentic-awesome-skills47k2 repos~3.2kAutomated safety check: PassMIT
Local SEOevery-app/open-seo23k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Localize

    Donchitos/Claude-Code-Game-Studios

    Localization pipeline — find hardcoded strings, extract string tables, cultural review, VO, RTL, enforce string freeze.

    26k GitHub stars~5.2k tokensUpdated 8 days ago
    Frontend & DesignAuto-check: notes
  • SEO Local

    AgriciDaniel/claude-seo

    Audit local SEO, including Google Business Profile, NAP consistency, citations, reviews, local schema, location pages, and multi-location structure.

    18k GitHub stars~4.5k tokensUpdated 3 days ago
    Marketing & SEOAuto-check passed
  • Threat Detection

    alirezarezvani/claude-skills

    A skill your agent uses when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry.

    28k GitHub stars~3.5k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Local Legal SEO Audit

    sickn33/agentic-awesome-skills

    Audit and improve local SEO for law firms, attorneys, forensic experts and legal/professional services sites with local presence, focusing on GBP, directories, E-E-A-T and practice/location pages.

    47k GitHub starsUsed in 2 repos~3.2k tokens
    Marketing & SEOAuto-check passed
  • Local SEO

    every-app/open-seo

    Audit a Google Business Profile, compare it to local competitors, and map Maps visibility around a location.

    23k GitHub stars~1.9k tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Brightdata Local Search

    davila7/claude-code-templates

    Set up and run local web searches using Bright Data SERP API with the unfancy-search pipeline (query expansion, SERP retrieval, RRF reranking).

    32k GitHub stars~1.2k tokensUpdated today
    Productivity & AutomationAuto-check: notes

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    253 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    253 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Numa Programming

What does Numa Programming do?

NUMA programming skill for multi-socket memory locality. An agent skill from mohitmishra786/low-level-dev-skills. Numa Programming is an agent skill from mohitmishra786/low-level-dev-skills. NUMA programming skill for multi-socket memory locality.

When should I use Numa Programming?

Numa Programming fits situations like: detecting NUMA topology; binding processes with numactl; using libnuma API; building NUMA-aware data structures.

How do I install Numa Programming in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill numa-programming -a claude-code`. Or copy the skill folder (skills/allocators/numa-programming in mohitmishra786/low-level-dev-skills) into .claude/skills/numa-programming in your project. Claude Code loads it when a task matches its description.

How do I install Numa Programming in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill numa-programming -a codex`. Or copy the skill folder (skills/allocators/numa-programming in mohitmishra786/low-level-dev-skills) into .agents/skills/numa-programming in your project. Codex loads it when a task matches its description.

Can I use Numa Programming 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 mohitmishra786/low-level-dev-skills --skill numa-programming -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/numa-programming, .gemini/skills/numa-programming, .github/skills/numa-programming and .opencode/skills/numa-programming in your project.

What does Numa Programming need to run?

Going by SKILL.md and its folder, Numa Programming needs the command-line tools its instructions call (node and apt).

Does Numa Programming 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 Numa Programming 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 Numa Programming use?

Numa Programming 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 Numa Programming use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Numa Programming?

Skills that share tags, products or a category with Numa Programming: Localize (Donchitos/Claude-Code-Game-Studios, 26k stars), SEO Local (AgriciDaniel/claude-seo, 18k stars), Threat Detection (alirezarezvani/claude-skills, 28k stars) and Local Legal SEO Audit (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Numa Programming?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 253 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.