asm-patterns

Provide canonical x86-64 and ARM64 assembly patterns for NASM and GAS.

15|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/AeonDave/malskill --skill asm-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asm-patterns
Source: https://github.com/AeonDave/malskill/tree/main/programming/asm-patterns
Command: npx skills add https://github.com/AeonDave/malskill --skill asm-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides canonical patterns and guardrails for writing, reviewing, and generating assembly language code for x86-64 and ARM64 architectures, ensuring correctness and adherence to best practices.

Core Features & Use Cases

  • Architecture-Specific Patterns: Detailed examples for x86-64 (NASM/GAS) and ARM64 (AAPCS).
  • Calling Conventions: Clear tables for register usage, argument passing, and return values.
  • Core Patterns: Demonstrations of non-leaf/leaf functions, SIMD loops (SSE2/NEON), syscalls, and PIC.
  • Code Style & Tooling: Rules for code structure, comments, naming, and a quick reference for common toolchain commands.
  • Use Case: When implementing performance-critical routines in assembly, ensuring correct function prologues/epilogues, managing the stack, or interfacing with C code.

Quick Start

Use the asm-patterns skill to generate a non-leaf function prologue for x86-64 using NASM syntax.

Frequently Asked Questions about asm-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the calling conventions for x86-64 and ARM64 assembly functions?

Writing a non-leaf function in assembly requires establishing correct prologues and epilogues. This Skill demonstrates canonical patterns for stack management across x86-64 NASM and ARM64 environments.

How do I write a SIMD loop using NEON or SSE2 assembly?

To implement syscall stubs in assembly, you must follow architecture-specific register conventions. This Skill provides canonical patterns for writing syscall stubs targeting Linux and macOS System V ABI.

Can I use NASM and GAS toolchains for generating x86-64 assembly?

Position Independent Code (PIC) data access requires specific instruction sequences to ensure runtime relocation. This Skill provides canonical patterns for implementing PIC data access in both x86-64 and ARM64 assembly.

What is the correct stack management approach for leaf functions in ARM64?

The correct stack management approach for leaf functions in ARM64 follows the AAPCS standard, often avoiding stack usage entirely if registers suffice. This Skill provides canonical patterns for both leaf and non-leaf functions.