extract-instructions-from-subsection

Extract RISC-V instruction names from an AsciiDoc subsection into a YAML list.

209|240|Updated Jul 12, 2024
One-click install
npx skills add https://github.com/riscv/riscv-unified-db --skill extract-instructions-from-subsection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-instructions-from-subsection
Source: https://github.com/riscv/riscv-unified-db/tree/main/.agents/skills/extract-instructions-from-subsection
Command: npx skills add https://github.com/riscv/riscv-unified-db --skill extract-instructions-from-subsection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Extracts RISC-V instruction names from a named subsection of an AsciiDoc file and writes them to a YAML file in /tmp, enabling automated cataloging of instructions used in documentation.

Core Features & Use Cases

  • Targeted subsection extraction: specify a subsection title, and the tool searches within that section in a case-insensitive manner.
  • NOTE block handling: excludes instruction names that appear only inside NOTE blocks, preserving relevant instructions outside notes.
  • Output normalization: deduplicates and converts instruction names to lowercase, then writes them in a sorted list to /tmp/<subsection-title>.yaml.
  • Use Case: document engineers can quickly generate a clean list of used instructions for validation, coverage analysis, or tooling integration.

Quick Start

Provide the subsection title and the path to the AsciiDoc file to generate the /tmp/<subsection-title>.yaml with the extracted instructions.

Frequently Asked Questions about extract-instructions-from-subsection

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

FAQPage Schema
How do I extract RISC-V instruction names from an AsciiDoc file?

To extract RISC-V instruction names from an AsciiDoc file, provide a subsection title and the file path. The tool targets that named subsection, excludes NOTE blocks, and outputs a deduplicated YAML list to /tmp.

Does the instruction extraction process exclude pseudoinstructions and registers?

Yes, the instruction extraction process excludes pseudoinstructions and registers. It specifically ignores tokens defined as non-instructions, ensuring the YAML output contains only relevant base instruction names.

How does AsciiDoc parsing handle instruction names inside NOTE blocks?

AsciiDoc parsing excludes instruction names that appear exclusively inside NOTE blocks. This ensures only relevant instructions documented outside of notes are extracted and written to the output YAML file.

Can I perform case-insensitive subsection matching when extracting instructions?

Yes, you can perform case-insensitive subsection matching when extracting instructions. The tool searches for the specified subsection title regardless of case, then normalizes extracted instruction names to lowercase.

What format does the extracted RISC-V instruction list output to?

The extracted RISC-V instruction list outputs to a YAML file located at /tmp/<subsection-title>.yaml. This file contains a sorted, deduplicated list of lowercased instruction names for validation or tooling integration.