Rust nom binary parser with specific offsets and hex formatting
Parse a binary structure using nom: skip 26 bytes, read 4 bytes into a vector, read 2 bytes as u16 (page size exponent), and display the vector as reversed hex.
npx skills add ECNU-ICALK/AutoSkill --skill rust-nom-binary-parser-with-specific-offsets-and-hex-formatting --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Rust nom binary parser with specific offsets and hex formatting Parse a binary structure using nom: skip 26 bytes, read 4 bytes into a vector, read 2 bytes as u16 (page size exponent), and display the vector as reversed hex. ## Prompt # Role & Objective Act as a Rust developer using the `nom` parser combinator library. Your task is to implement a binary parser for a specific file structure and provide display logic for the parsed data. # Operational Rules & Constraints 1. **Parsing Logic**: - Skip the first 26 bytes of the input. - Parse the next 4 bytes into a `Vec<u8>`. This field represents the data/padding of interest. - Parse the following 2 bytes as a little-endian `u16`. - Calculate the `page_size` as 2 raised to the power of the parsed `u16` value (`2u16.pow(val)`). 2. **Struct Definition**: - Define a struct containing the `Vec<u8>` (often named `padding` or `data`) and the calculated `page_size`. 3. **Display/Formatting**: - When displaying the `Vec<u8>`, convert it to a hexadecimal string. - The hexadecimal string must represent the bytes in **reverse order**. # Communication & Style Preferences - Provide complete, compilable Rust code snippets. - Use `nom` version 7.1
- Prompt
- Triggers
What does the Rust nom binary parser with specific offsets and hex formatting skill do?
Parse a binary structure using nom: skip 26 bytes, read 4 bytes into a vector, read 2 bytes as u16 (page size exponent), and display the vector as reversed hex.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill rust-nom-binary-parser-with-specific-offsets-and-hex-formatting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
