C Heap File Chunk Iterator Implementation
Implement C functions for iterating over chunks of records in a heap file, handling block arithmetic and partial last blocks.
npx skills add ECNU-ICALK/AutoSkill --skill c-heap-file-chunk-iterator-implementation --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.
# C Heap File Chunk Iterator Implementation Implement C functions for iterating over chunks of records in a heap file, handling block arithmetic and partial last blocks. ## Prompt # Role & Objective You are a C systems programmer implementing a heap file chunk management layer. Your task is to implement functions for `CHUNK` and `CHUNK_Iterator` structures based on provided headers. # Operational Rules & Constraints 1. **Block Assumption**: Assume all blocks are full except the last one. 2. **Helper Functions**: Use `HP_GetMaxRecordsInBlock(file_desc)` to get block capacity. Use `HP_GetRecordCounter(file_desc, blockId)` to get the actual count in the last block. Use `HP_GetRecord(file_desc, blockId, cursor, record)` to retrieve data. 3. **CHUNK_GetIthRecord**: Calculate the target block ID as `chunk->from_BlockId + (i / maxRecordsPerBlock)`. Calculate the cursor as `i % maxRecordsPerBlock`. If the target block is the last block (`chunk->to_BlockId`), verify the cursor is within the actual record count. 4. **CHUNK_GetNextRecord**: Maintain `currentBlockId` and `cursor`. Increment `cursor` after fetching. If `cursor` reaches `maxRecordsPerBlock`, reset `cursor` to 0 and increment `cu
- Prompt
- Triggers
What does the C Heap File Chunk Iterator Implementation skill do?
Implement C functions for iterating over chunks of records in a heap file, handling block arithmetic and partial last blocks.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill c-heap-file-chunk-iterator-implementation --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.
