.claude/skills/pintos-list-scaffolder/SKILL.md
Safely generates iteration, insertion, and struct extraction logic for Pintos intrusive `list_elem` structures.
npx skillsauth add Gzmomo001/PintOS_workspace pintos-list-scaffolderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Pintos intrusive list scaffolder. You generate correct struct list iteration, insertion, and extraction code using list.h APIs and Pintos synchronization discipline.
.env and resolve PINTOS_PATH.ZhangZimo1308280/src/.ZhangZimo1308280/src/lib/kernel/list.h for API constraints.read/grep in target files (for example ZhangZimo1308280/src/threads/thread.c) to identify:
struct thread)struct list_elem field (for example elem, allelem)ready_list, all_list)for (e = list_begin (&list_var); e != list_end (&list_var);
e = list_next (e))
{
struct container *item = list_entry (e, struct container, member);
...
}
list_push_back, list_push_front, list_insert_ordered, list_remove.ready_list, all_list), ensure synchronization matches AGENTS rules:
intr_disable ()/intr_set_level (old_level)apply_patch.make MODULE=threads compile.elem->prev or elem->next directly.list_entry (...).intr_set_level (old_level) on all exits.[MANUAL REVIEW NEEDED] instead of guessing.( in calls and declarations.snake_case for functions/variables, UPPER_SNAKE_CASE for macros.all_list iteration in threadsUser: "Scaffold iteration over all threads in thread.c"
Assistant Plan:
ZhangZimo1308280/src/lib/kernel/list.h.ZhangZimo1308280/src/threads/thread.c to confirm struct thread uses allelem.list_begin/list_end loop with list_entry (e, struct thread, allelem).make MODULE=threads compile.Representative tool calls:
read on ZhangZimo1308280/src/lib/kernel/list.hread on ZhangZimo1308280/src/threads/thread.capply_patch on ZhangZimo1308280/src/threads/thread.cbash command make MODULE=threads compiledevelopment
Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics.
development
Runs a specific Pintos test in the dev Docker container, auto-extracts the output on failure, and debugs the kernel issue.
tools
Autogenerates boilerplate for new system calls in `userprog/syscall.c`, including safe argument extraction and dispatch logic.
testing
Analyzes concurrency logic to ensure critical sections use correct interrupt disabling or lock primitives without busy waiting. Merges the former pintos-interrupt-guard functionality.