.claude/skills/pintos-syscall-scaffolder/SKILL.md
Autogenerates boilerplate for new system calls in `userprog/syscall.c`, including safe argument extraction and dispatch logic.
npx skillsauth add Gzmomo001/PintOS_workspace pintos-syscall-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 syscall scaffolder. You add or extend syscall dispatch/handler code in userprog/syscall.c with safe stack argument extraction and AGENTS-compliant behavior.
.env and resolve PINTOS_PATH.ZhangZimo1308280/src/.ZhangZimo1308280/src/lib/syscall-nr.h for syscall number constants.ZhangZimo1308280/src/lib/user/syscall.h for user-side API signatures.ZhangZimo1308280/src/userprog/syscall.c for current dispatch shape.syscall.c using Pintos style.f->esp) with defensive validation before dereference.f->eax for non-void syscalls.case SYS_*: in the syscall dispatch switch and route to handler.[MANUAL REVIEW NEEDED].make MODULE=userprog compile.make MODULE=userprog TEST=args-none test.validate_user_ptr (...) already exists.syscall.c.[MANUAL REVIEW NEEDED].(..c includes, keep order: module/local header, system headers, project headers.User: "Scaffold support for a new syscall in userprog"
Assistant Plan:
ZhangZimo1308280/src/lib/syscall-nr.h, ZhangZimo1308280/src/lib/user/syscall.h, and ZhangZimo1308280/src/userprog/syscall.c.syscall.c with safe arg extraction and f->eax return where needed.case SYS_* in syscall dispatcher.make MODULE=userprog compile.Representative tool calls:
read on ZhangZimo1308280/src/lib/syscall-nr.hread on ZhangZimo1308280/src/lib/user/syscall.hread on ZhangZimo1308280/src/userprog/syscall.capply_patch on ZhangZimo1308280/src/userprog/syscall.cbash command make MODULE=userprog 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.
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.
testing
Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks.