review-codebase
About
This skill performs a comprehensive, multi-phase codebase review covering architecture, security, code quality, and UX/accessibility. It outputs a prioritized findings table with severity ratings that can be directly converted into GitHub issues. Use it for deep project analysis, pre-release quality gates, or onboarding to new codebases.
Quick Install
Claude Code
Recommendednpx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/review-codebaseCopy and paste this command in Claude Code to install this skill
Documentation
審碼庫
多階深之碼庫審附重之等與構出。一過合構、安、碼質、UX/可訪。生排序之得表,可直化為 create-github-issues 之 GitHub 問題。
用時
- 全項目或子項目之審(非 PR 範)乃用
- 新碼庫之啟——建何存何要之心象乃用
- 久發後之周期健察乃用
- 釋前之質閘越構、安、碼質、UX 乃用
- 出宜直入問題立或衝刺計乃用
入
- 必要:
target_path— 欲審之碼庫或子項目之根所 - 可選:
scope— 行何階:full(默)、security、architecture、quality、uxoutput_format—findings(獨表)、report(敘)、both(默)severity_threshold— 含之最少重:LOW(默)、MEDIUM、HIGH、CRITICAL
法
第一步:census 普查
錄碼庫以立範與識審之的。
- 各語/類數文:
find target_path -type f | sort by extension - 各語量總行數
- 識試所而估試覆(有試之文與無試之文)
- 察依態:鎖文存、過時依、知 CVE
- 記建系、CI/CD 配、文檔之態
- 記普查為報之首段
得:實之錄——文數、語、試之有、依之健。尚無斷。
敗則:若目路空或不可訪,止而報。若某子所不可訪,記之而以可得者續。
第二步:構之審
察結構之健:耦合、複、數流、分。
- 圖模/所構而識主構形
- 察碼複——文間之重邏、複貼之形
- 估耦合——一功之改需變多少文
- 評數流——層間有明界乎(UI、邏、數)?
- 識死碼、未用之出、孤文
- 察恆形——碼庫循己之規乎?
- 各得評:CRITICAL、HIGH、MEDIUM、LOW
得:構之得列附重之等與文引。常得:模派之複、缺抽層、環依。
敗則:若碼庫過小不能義審(< 5 文),記之而過第三步。構審需足之碼以有構。
第三步:安審
識安患與守碼缺。
- 掃注入:HTML 注入(
innerHTML)、SQL 注入、命注入 - 察認與授形(若有)
- 審誤處——誤暗吞乎?誤信露內乎?
- 對知 CVE 審依版
- 察硬秘、API 鑰、憑
- 審 Docker/容器之安:root 用戶、露口、建秘
- 察 localStorage/sessionStorage 之敏存
- 各得評:CRITICAL、HIGH、MEDIUM、LOW
得:安得列附重、影文、修議。CRITICAL 含注入患與露秘。
敗則:若無安碼(純文檔項目),記之而過第四步。
第四步:碼質
評可守、可讀、守碼。
- 識魔數與宜為命常之硬值
- 察恆命規於碼庫
- 尋系界缺之入驗
- 估誤處形——恆乎?示有用之信乎?
- 察注之碼、TODO/FIXME 之標、未畢之施
- 審試之質——試行為乎,抑試施細乎?
- 各得評:CRITICAL、HIGH、MEDIUM、LOW
得:質之得列專守。常得:魔數、不恆形、缺護。
敗則:若碼庫為生或縮,記之而調期。生碼有異於手書之質規。
第五步:UX 與可訪(若有前端)
評用驗與可訪之合。
- 察 ARIA 之角、標、地標於互動之元
- 驗鍵導——諸互動元 Tab 可達乎?
- 試焦管——板開閉時焦合邏移乎?
- 察響應之設——常斷點試之(320px、768px、1024px)
- 驗色對比合 WCAG 2.1 AA 之標
- 察讀屏之容——動內變宣乎?
- 各得評:CRITICAL、HIGH、MEDIUM、LOW
得:UX/a11y 之得列附 WCAG 引(若可)。若無前端,此步生「N/A — 無前端碼察」。
敗則:若前端碼存而不能渲(缺建步),靜審其源碼而記運時試不可。
第六步:得之合
合諸得為排序之摘。
- 合諸階之得為單表
- 依重排序(CRITICAL 先,後 HIGH、MEDIUM、LOW)
- 同重等內,依題群之(安、構、質、UX)
- 各得含:重、階、文、一行述、議修
- 出修序之議慮諸修間之依
- 摘:依重之總得、首三急、估力等
得:得表附欄:#、Severity、Phase、File(s)、Finding、Fix。修序之議慮諸得間之依(如「立試前先重構」)。
敗則:若無得,此本身為得——或碼庫特淨或審過淺。再以深察至少一階。
驗
- 諸所請階皆畢(或明略附故)
- 各得有重評(CRITICAL/HIGH/MEDIUM/LOW)
- 各得引至少一文或所
- 得表依重排序
- 修序之議慮諸得間之依
- 摘含依重之總數
- 若
output_format含report,敘段附表
與息相伴之尺
審諸階間,用 /rest 為檢點——尤於 2-5 階間,蓋其需異析視。檢點之息(簡、過)防一階之勢偏次階。rest 技之「Scaling Rest」段供檢點對全息之引。
陷
- 燒海:審大碼庫之諸行生噪。專注於高影區:入點、安界、構縫
- 重之膨:非凡得皆 CRITICAL。CRITICAL 留為可利之患與失數之險。多構患為 MEDIUM
- 見樹失林:個碼質患輕於系形。若魔數現於 20 文,乃一構得,非 20 質得
- 略普查:普查(第一步)似官然防審不存之碼或漏全所
- 階溢:構審時得安、安審時得質。記於正階而非混憂——生更淨之得表
參
security-audit-codebase— review-codebase 之安階露繁患時行深安審review-software-architecture— 為特子系行詳構審review-ux-ui— 全 UX/可訪審逾五階所及review-pull-request— 為單變行差範審clean-codebase— 施此審所識之碼質修create-github-issues— 化得表為追之 GitHub 問題
GitHub Repository
Related Skills
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
polymarket
MetaThis skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.
creating-opencode-plugins
MetaThis skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.
sglang
MetaSGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.
