Agent skill

x86-64 Assembly Reference

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

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

MITAuto-check passedDevelopment

Install x86-64 Assembly Reference

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-x86 -a claude-code

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

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills assembly-x86 --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/low-level-programming/assembly-x86 .claude/skills/assembly-x86 && 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
assembly-x86
GitHub stars
252
Token cost
~1.5k tokens
SKILL.md length
501 words
Files
2 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 7 steps: Generate and read assembly → x86-64 registers → System V AMD64 ABI (Linux, macOS, FreeBSD) → …
  • Reading assembly a compiler generated for a C or C++ function
  • SKILL.md covers Purpose, Triggers, Workflow and Related skills
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Generating and reading AT&T-syntax assembly from GCC or Clang is the starting point, followed by a full register table down to 8-bit sub-registers and their conventional purpose, the integer and floating-point argument registers, return-value registers, and the caller-saved versus callee-saved split for the System V AMD64 ABI used on Linux, macOS, and FreeBSD. Stack alignment rules, the 128-byte red zone available to leaf functions, and common instruction patterns round out what's needed to debug register and stack state or write inline assembly in C or C++.

When your agent uses it

  • Reading assembly a compiler generated for a C or C++ function
  • Writing inline assembly or SIMD intrinsics in C or C++
  • Debugging register or stack state using objdump or GDB output

Example prompts

  • “What does this GCC-generated assembly do with %rdi and %rsi?”
  • “Why would the red zone matter for this leaf function?”
  • “Write inline assembly for this hot loop using AVX intrinsics.”

Workflow steps

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

  1. Generate and read assembly
  2. x86-64 registers
  3. System V AMD64 ABI (Linux, macOS, FreeBSD)
  4. Common instruction patterns
  5. AT&T vs Intel syntax
  6. Inline assembly (GCC extended asm)
  7. SSE/AVX intrinsics (preferred over inline asm)

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are c and bash).

    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

x86-64 Assembly Reference loads about 1.5k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 501 words of instructions outside code blocks.

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

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). 501 words, ~1,460 tokens.

Download SKILL.mdSave it as .claude/skills/assembly-x86/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
assembly-x86
description
x86-64 assembly skill for reading, writing, and debugging assembly code. Use when reading GCC/Clang assembly output, writing inline asm in C/C++, understanding the System V AMD64 ABI calling convention, or debugging register and stack state. Activates on queries about x86-64 assembly, AT&T vs Intel syntax, inline asm, calling conventions, SIMD intrinsics, or reading disassembly output from objdump or GDB.

x86-64 Assembly

Purpose

Guide agents through x86-64 assembly: reading compiler output, understanding the ABI, writing inline asm, and common patterns.

Triggers

  • "How do I read the assembly GCC generated?"
  • "What are the x86-64 registers?"
  • "What is the calling convention on Linux/macOS?"
  • "How do I write inline assembly in C?"
  • "How do I use SSE/AVX intrinsics?"
  • "This assembly uses %rsp / %rbp — what does it mean?"

Workflow

1. Generate and read assembly
bash
# AT&T syntax (GCC default)
gcc -S -O2 -fverbose-asm foo.c -o foo.s

# Intel syntax
gcc -S -masm=intel -O2 foo.c -o foo.s

# From GDB
(gdb) disassemble /s main    # with source
(gdb) x/20i $rip

# From objdump
objdump -d -M intel -S prog  # Intel + source (needs -g)
2. x86-64 registers
64-bit32-bit16-bit8-bit high8-bit lowPurpose
%rax%eax%ax%ah%alReturn value / accumulator
%rbx%ebx%bx%bh%blCallee-saved
%rcx%ecx%cx%ch%cl4th arg / count
%rdx%edx%dx%dh%dl3rd arg / 2nd return
%rsi%esi%si—%sil2nd arg
%rdi%edi%di—%dil1st arg
%rbp%ebp%bp—%bplFrame pointer (callee-saved)
%rsp%esp%sp—%splStack pointer
%r8–%r11%r8d–%r11d%r8w–%r11w—%r8b–%r11b5th–8th args / caller-saved
%r12–%r15%r12d–%r15d%r12w–%r15w—%r12b–%r15bCallee-saved
%ripInstruction pointer
%rflags%eflagsStatus flags
%xmm0–%xmm7FP/SIMD args and return
%xmm8–%xmm15Caller-saved SIMD
%ymm0–%ymm15AVX 256-bit
%zmm0–%zmm31AVX-512 512-bit
3. System V AMD64 ABI (Linux, macOS, FreeBSD)

Integer/pointer argument registers (in order): %rdi, %rsi, %rdx, %rcx, %r8, %r9

Floating-point argument registers: %xmm0–%xmm7

Return values:

  • Integer: %rax (low), %rdx (high if 128-bit)
  • Float: %xmm0 (low), %xmm1 (high)

Caller-saved (scratch): %rax, %rcx, %rdx, %rsi, %rdi, %r8–%r11, %xmm0–%xmm15

Callee-saved (must preserve): %rbx, %rbp, %r12–%r15

Stack: 16-byte aligned before call; call pushes 8 bytes → 16-byte aligned at function entry after prologue.

Red zone: 128 bytes below %rsp may be used by leaf functions without adjusting %rsp. Not available in kernel/signal handlers.

Show full SKILL.md (243 more words)Show less
4. Common instruction patterns
PatternMeaning
mov %rdi, %raxCopy rdi to rax
mov (%rdi), %raxLoad 8 bytes from address in rdi
mov %rax, 8(%rdi)Store rax to rdi+8
lea 8(%rdi), %raxLoad effective address rdi+8 into rax (no memory access)
push %rbxPush rbx; rsp -= 8
pop %rbxPop into rbx; rsp += 8
call fooPush return addr; jmp foo
retPop return addr; jmp to it
xor %eax, %eaxZero rax (smaller encoding than mov $0, %rax)
test %rax, %raxSet ZF if rax == 0 (cheaper than cmp $0, %rax)
cmp $5, %rdiSet flags for rdi - 5
jl labelJump if signed less than
5. AT&T vs Intel syntax
FeatureAT&TIntel
Operand ordersource, destdest, source
Register prefix%raxrax
Immediate prefix$4242
Memory operand8(%rdi)[rdi+8]
Size suffixmovl, movq— (inferred)

GCC emits AT&T by default. Use -masm=intel for Intel syntax.

6. Inline assembly (GCC extended asm)
c
// Basic: increment a register
int x = 5;
__asm__ volatile (
    "incl %0"
    : "=r"(x)   // outputs: =r means write-only register
    : "0"(x)    // inputs: 0 means same as output 0
    : // clobbers: none
);

// CPUID example
uint32_t eax, ebx, ecx, edx;
__asm__ volatile (
    "cpuid"
    : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
    : "a"(1)    // input: leaf 1
);

// Atomic increment
static inline int atomic_inc(volatile int *p) {
    int ret;
    __asm__ volatile (
        "lock; xaddl %0, %1"
        : "=r"(ret), "+m"(*p)
        : "0"(1)
        : "memory"
    );
    return ret + 1;
}

Constraint codes:

  • "r" — any general register
  • "m" — memory operand
  • "i" — immediate integer
  • "a", "b", "c", "d" — specific registers (%rax, %rbx, %rcx, %rdx)
  • "=" prefix — output (write-only)
  • "+" prefix — read-write
  • "memory" clobber — tells compiler memory may be modified (barrier)
7. SSE/AVX intrinsics (preferred over inline asm)
c
#include <immintrin.h>   // includes all x86 SIMD headers

// Add 8 floats at once with AVX
__m256 a = _mm256_loadu_ps(arr_a);   // load 8 floats (unaligned)
__m256 b = _mm256_loadu_ps(arr_b);
__m256 c = _mm256_add_ps(a, b);
_mm256_storeu_ps(result, c);

Check CPU support at compile time: -mavx2 or -march=native. Check at runtime: __builtin_cpu_supports("avx2").

For a full register and instruction reference, see references/reference.md.

  • Use skills/low-level-programming/assembly-arm for AArch64/ARM assembly
  • Use skills/compilers/gcc for -S -masm=intel flag details
  • Use skills/debuggers/gdb for stepping through assembly (si, ni, x/i)

© 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

SKILL.md and 1 other file (references) in skills/low-level-programming/assembly-x86 of mohitmishra786/low-level-dev-skills.

  • SKILL.md
  • references/reference.md

Open the folder on GitHubat commit bdc5847

Compare with similar skills

x86-64 Assembly Reference 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.

x86-64 Assembly Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
x86-64 Assembly Reference this skillmohitmishra786/low-level-dev-skills252—~1.5kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

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.

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

    252 GitHub stars~1.8k 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.

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

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

    252 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed
  • Build Acceleration

    mohitmishra786/low-level-dev-skills

    Build acceleration skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.

    252 GitHub stars~1.4k tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about x86-64 Assembly Reference

What does x86-64 Assembly Reference do?

Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly. Generating and reading AT&T-syntax assembly from GCC or Clang is the starting point, followed by a full register table down to 8-bit sub-registers and their conventional purpose, the integer and floating-point argument registers, return-value registers, and the caller-saved versus callee-saved split for the System V AMD64 ABI used on Linux, macOS, and FreeBSD. Stack alignment rules, the 128-byte red zone available to leaf functions, and common instruction patterns round out what's needed to debug register and stack state or write inline assembly in C or C++.

When should I use x86-64 Assembly Reference?

x86-64 Assembly Reference fits situations like: reading assembly a compiler generated for a C or C++ function; writing inline assembly or SIMD intrinsics in C or C++; debugging register or stack state using objdump or GDB output.

How do I install x86-64 Assembly Reference in Claude Code?

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

How do I install x86-64 Assembly Reference in Codex?

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

Can I use x86-64 Assembly Reference 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 assembly-x86 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/assembly-x86, .gemini/skills/assembly-x86, .github/skills/assembly-x86 and .opencode/skills/assembly-x86 in your project.

What does x86-64 Assembly Reference need to run?

SKILL.md names no scripts, command-line tools or credentials: x86-64 Assembly Reference is instructions for the agent only.

Does x86-64 Assembly Reference 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 x86-64 Assembly Reference 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 x86-64 Assembly Reference use?

x86-64 Assembly Reference 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 x86-64 Assembly Reference use?

About 1.5k tokens (SKILL.md is roughly 5.8k 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 1.2k tokens, read only when the agent opens those files.

What are the alternatives to x86-64 Assembly Reference?

Skills that share tags, products or a category with x86-64 Assembly Reference: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains x86-64 Assembly Reference?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 252 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.