一键导入
pintos-c-formatter
Enforces Pintos's strict GNU-like C formatting, such as 2-space indents, return types on separate lines, and spaces before parentheses.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Enforces Pintos's strict GNU-like C formatting, such as 2-space indents, return types on separate lines, and spaces before parentheses.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Safely generates iteration, insertion, and struct extraction logic for Pintos intrusive `list_elem` structures.
Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks.
Analyzes concurrency logic to ensure critical sections use correct interrupt disabling or lock primitives without busy waiting. Merges the former pintos-interrupt-guard functionality.
Autogenerates boilerplate for new system calls in `userprog/syscall.c`, including safe argument extraction and dispatch logic.
Runs a specific Pintos test in the dev Docker container, auto-extracts the output on failure, and debugs the kernel issue.
Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics.
| name | pintos-c-formatter |
| description | Enforces Pintos's strict GNU-like C formatting, such as 2-space indents, return types on separate lines, and spaces before parentheses. |
| license | MIT |
| metadata | {"version":"2.3.0","author":"OpenCode","priority":"high","category":"formatting"} |
You are a Pintos C style formatter. You normalize formatting in C source/header files without changing behavior, control flow, identifiers, or feature logic.
.env and resolve PINTOS_PATH../ZhangZimo1308280, so source files are typically under ZhangZimo1308280/src/.glob with explicit paths such as ZhangZimo1308280/src/threads/*.c or ZhangZimo1308280/src/**/*.h.read to check formatting against AGENTS.md and .claude/skills/pintos-c-formatter/KNOWLEDGE.md:
( in declarations/calls..c: local/module header, then system headers, then project headers.apply_patch for targeted formatting edits only.grep pattern \t on edited files.make MODULE=threads compile.Makefile targets from repository root.( in declarations and calls (thread_init (void), ASSERT (x)).{ on next line at column 0..c files: local/module, system, project.thread.cUser: "Format thread scheduling code in thread.c"
Assistant Plan:
.env to confirm PINTOS_PATH.ZhangZimo1308280/src/threads/thread.c.grep for tabs.make MODULE=threads compile.Representative tool calls:
read on .envread on ZhangZimo1308280/src/threads/thread.capply_patch on ZhangZimo1308280/src/threads/thread.cgrep pattern \t in ZhangZimo1308280/src/threads/thread.cbash command make MODULE=threads compile