syz-extract-constants

syz-extract-constants is a skill for Claude Code, Codex from xuansenpa1/skillrevise. It costs 20 tokens per session (852 once invoked), scanned A, a copy of syz-extract-constants, MIT.

A guide for defining kernel constants in syzlang, the description language used by syzkaller, a Linux system-call fuzzing tool. It covers manual constant files and extracting values from kernel headers.

In plain words
What is it for?
Use it when adding or updating syzkaller descriptions that depend on kernel constants across one or more CPU architectures.
Why use it?
It prevents fuzzing descriptions from using missing or incorrect ioctl numbers, flags, and other architecture-specific values.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or updating syzkaller descriptions that depend on kernel constants across one or more CPU architectures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xuansenpa1/skillrevise/syz-extract-constants
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.

Any agent
npx skills add xuansenpa1/skillrevise --skill syz-extract-constants
Clone the repo
git clone --depth 1 https://github.com/xuansenpa1/skillrevise

Made for: Claude Code, Codex.

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 syz-extract-constants

README.md
[![agentmods](https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/syz-extract-constants/github.svg)](https://agentmods.dev/skills/xuansenpa1/skillrevise/syz-extract-constants)
Your own site
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/syz-extract-constants"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/syz-extract-constants/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 syz-extract-constants

Your own site · 80×15
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/syz-extract-constants"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/syz-extract-constants.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 852 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 100% copy Near-identical to another mod 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.00020 $0.00852
Opus 5 $0.00010 $0.00426
Sonnet 5 $0.00004 $0.00170
Haiku 4.5 $0.00002 $0.00085

Measured 9d ago against content hash 2fc1affd7993, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

syz-extract-constants 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 9d ago.

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.

Origin

This is a copy

100% identical to syz-extract-constants — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

data/skillsbench/tasks/syzkaller-ppdev-syzlang/environment/skills/syz-extract-constants/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Defining Constants in Syzlang

Overview

Syzkaller needs to know the actual values of kernel constants (ioctl numbers, flags, etc.) to generate valid fuzzing programs. There are two ways to provide these values:

  1. Manual .const file - Define constants directly in a companion file
  2. syz-extract tool - Extract values from kernel source headers (requires kernel source)

Create a .const file alongside your .txt file with the constant values:

File naming

  • Syzlang description: sys/linux/dev_ppdev.txt
  • Constants file: sys/linux/dev_ppdev.txt.const

Constants file format

# Constants for your syzlang descriptions
arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
PPCLAIM = 28811
PPRELEASE = 28812
IEEE1284_MODE_NIBBLE = 0
IEEE1284_MODE_BYTE = 1

The arches line declares which architectures these constants are valid for. For architecture-independent constants (like ioctls), list all architectures.

Calculating ioctl values

Linux ioctl numbers are encoded as:

  • _IO(type, nr) = (type << 8) | nr
  • _IOR(type, nr, size) = (2 << 30) | (size << 16) | (type << 8) | nr
  • _IOW(type, nr, size) = (1 << 30) | (size << 16) | (type << 8) | nr
  • _IOWR(type, nr, size) = (3 << 30) | (size << 16) | (type << 8) | nr

For ppdev (type='p'=0x70):

  • PPCLAIM = _IO('p', 0x8b) = 0x708b = 28811

Method 2: Using syz-extract (Requires kernel source)

If kernel source is available:

cd /opt/syzkaller

# Extract constants for a specific file
make extract TARGETOS=linux SOURCEDIR=/path/to/linux FILES=sys/linux/dev_ppdev.txt

Note: This environment does not include kernel source. Use Method 1 (manual constants file) instead.

After Defining Constants

After creating the .const file, build syzkaller:

cd /opt/syzkaller
make descriptions  # Compiles descriptions + constants
make all           # Full build

Common Errors

Read the full file on GitHub · 102 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. 9d ago First seen · 102 lines · 20 tokens per session scan A 2fc1affd7993

Subscribe to this mod's changes

syz-extract-constants is a skill published in the GitHub repository xuansenpa1/skillrevise (56 stars, last pushed 7d ago), licensed MIT. It adds 20 tokens to every session and 852 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to syz-extract-constants, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens