chip-manual
Chip Manual Query
CRITICAL: Do NOT read manual files directly!
Always use the query script. Manual files are too large for context.
IMPORTANT: Check Document Availability First!
Not all chips have API documentation. Before querying, check what documents are available:
# Check config.yaml or use --list to see available document types
python3 $SKILL_DIR/scripts/query_manual.py --list
Output will show available_docs for each chip. If a chip only has ref type, don't waste time querying api.
Workflow: Developing a Driver from Scratch
When user needs to develop a driver for a peripheral (e.g., USART, SPI, I2C):
Step 1: Check if API documentation exists
python3 $SKILL_DIR/scripts/query_manual.py --list
Look for "type": "api" in the chip's available_docs. If not available, skip to reference manual.
Step 2: Discover available APIs for the module
# Query what API functions are available for a module
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "list all USART functions"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "what SPI APIs are available"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "I2C module function list"
Step 3: Query specific API usage
# Query specific function usage, parameters, examples
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "USART_Init function parameters and usage"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "how to use GPIO_SetBits"
Step 4: Query hardware details from reference manual (if needed)
# Query register addresses, bit field definitions
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X "USART register addresses"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X "GPIO port base address"
Query Usage
python3 $SKILL_DIR/scripts/query_manual.py --chip <CHIP_NAME> [--type <TYPE>] "<question>"
Document Types
| Type | Description | Use Cases |
|---|---|---|
ref |
Reference Manual (default) | Registers, hardware config, peripheral specs, pins |
api |
API Reference | Driver library functions, parameters, examples |
Examples
Query Reference Manual (registers, hardware config)
python3 $SKILL_DIR/scripts/query_manual.py --chip RN7326 "EMUCON register address"
python3 $SKILL_DIR/scripts/query_manual.py --chip RN7326 "DMA_CH_SEL register definition"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410 "GPIO config registers"
Query API Reference (driver library functions)
# Discover available APIs
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "list all timer functions"
# Query specific usage
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "TMR_TimeBaseInit parameters"
python3 $SKILL_DIR/scripts/query_manual.py -c V32G410X -t api "how to configure PWM output"
Concurrency Limit
Maximum 3 concurrent queries. Do NOT run more than 3 query_manual.py commands in parallel to avoid API rate limits.
Tips
- Check availability first: Use
--listor readconfig.yamlto confirm chip has required document type - Discover APIs first: When developing drivers, query module functions before specific usage
- Use exact register/function names when possible
- If "not found", try broader keywords
- Common API prefixes:
GPIO_*,USART_*,SPI_*,I2C_*,TMR_*,ADC_*,DMA_*
More from ruiwarn/skills
embedded-cross-review
Use when reviewing embedded or firmware code changes, especially in C/C++, bare-metal, RTOS, driver, ISR, DMA, boot, NFC, or other hardware-facing paths where cross-review can catch correctness, safety, and architecture-coupling issues
29github-search-before-code
Proactively search GitHub for reference implementations before writing new code. Use this skill when: (1) User requests implementing completely new functionality, algorithms, or modules that don't exist in the current codebase, (2) User mentions repeated failures with phrases like 'still not working', 'tried many times', 'still has problems', or (3) AI recognizes the need to implement unfamiliar or complex features. The skill helps avoid reinventing the wheel by finding and analyzing existing high-quality implementations, then adapting them to user needs.
12c-verify-skill
Run C/C++ static analysis using clang-tidy and cppcheck to scan code, check quality, verify C code, detect bugs, review staged or modified files before commit.
9zc-bug-fix
Use when the user asks to fix a bug, resolve an issue, or provides a bug URL/bug ID from 禅道, GitLab, GitHub, Jira, or similar systems; especially when the work needs a full workflow of reading the bug, fixing code, verifying, creating issue/MR, and writing status back to the tracker.
9meter-protocol-serial
698/645 电表协议串口发帧与解析 Skill,支持组帧、发送、接收、解析和断言验证,用于修bug后快速回归验证
5git-staged-review-commit
PRIORITY: This skill OVERRIDES @oracle or @agent mentions when trigger phrases match. Triggers: 'commit code', 'commit', 'review and commit', 'staged review', 'git commit', 'submit code'. Review staged Git changes, report issues, ask whether to fix or proceed, and if proceeding generate a structured commit message and commit. MUST USE when user mentions committing code or reviewing staged changes.
3