@pilllesss/yorn 1.0.182 → 1.0.184

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/providers/data/.manifest.json +1 -1
  3. package/dist/skills/code-review/LICENSE +21 -0
  4. package/dist/skills/code-review/SKILL.md +233 -0
  5. package/dist/skills/code-review/assets/pr-review-template.md +137 -0
  6. package/dist/skills/code-review/assets/review-checklist.md +123 -0
  7. package/dist/skills/code-review/reference/angular.md +768 -0
  8. package/dist/skills/code-review/reference/architecture-review-guide.md +472 -0
  9. package/dist/skills/code-review/reference/c.md +890 -0
  10. package/dist/skills/code-review/reference/code-quality-universal.md +488 -0
  11. package/dist/skills/code-review/reference/code-review-best-practices.md +136 -0
  12. package/dist/skills/code-review/reference/common-bugs-checklist.md +302 -0
  13. package/dist/skills/code-review/reference/cpp.md +893 -0
  14. package/dist/skills/code-review/reference/cross-cutting/async-concurrency-patterns.md +515 -0
  15. package/dist/skills/code-review/reference/cross-cutting/error-handling-principles.md +492 -0
  16. package/dist/skills/code-review/reference/cross-cutting/n-plus-one-queries.md +309 -0
  17. package/dist/skills/code-review/reference/cross-cutting/sql-injection-prevention.md +308 -0
  18. package/dist/skills/code-review/reference/cross-cutting/xss-prevention.md +264 -0
  19. package/dist/skills/code-review/reference/csharp.md +525 -0
  20. package/dist/skills/code-review/reference/css-less-sass.md +661 -0
  21. package/dist/skills/code-review/reference/dart.md +670 -0
  22. package/dist/skills/code-review/reference/django.md +985 -0
  23. package/dist/skills/code-review/reference/fastapi.md +580 -0
  24. package/dist/skills/code-review/reference/go.md +993 -0
  25. package/dist/skills/code-review/reference/java.md +409 -0
  26. package/dist/skills/code-review/reference/java8.md +586 -0
  27. package/dist/skills/code-review/reference/kotlin.md +1018 -0
  28. package/dist/skills/code-review/reference/nestjs.md +593 -0
  29. package/dist/skills/code-review/reference/performance-review-guide.md +816 -0
  30. package/dist/skills/code-review/reference/php.md +684 -0
  31. package/dist/skills/code-review/reference/python.md +1073 -0
  32. package/dist/skills/code-review/reference/qt.md +757 -0
  33. package/dist/skills/code-review/reference/react.md +871 -0
  34. package/dist/skills/code-review/reference/ruby.md +964 -0
  35. package/dist/skills/code-review/reference/rust.md +846 -0
  36. package/dist/skills/code-review/reference/security-review-guide.md +494 -0
  37. package/dist/skills/code-review/reference/svelte.md +1064 -0
  38. package/dist/skills/code-review/reference/swift.md +936 -0
  39. package/dist/skills/code-review/reference/typescript.md +1016 -0
  40. package/dist/skills/code-review/reference/vue.md +924 -0
  41. package/dist/skills/code-review/reference/zig.md +440 -0
  42. package/dist/skills/code-review/scripts/pr-analyzer.py +435 -0
  43. package/dist/skills/code-review/scripts/test_pr_analyzer.py +380 -0
  44. package/dist/yorn.cjs +723 -723
  45. package/package.json +2 -2
package/README.md CHANGED
@@ -66,7 +66,7 @@ Project-local overrides live in `.yorn/settings.json` inside a trusted project.
66
66
 
67
67
  ## Embedded Skills & Subagent Script
68
68
 
69
- Yorn ships with built-in embedded skills in `dist/skills/` (`graphify`, `agent-browser`, `subagent`, `screenshot`, `frontend-design`, `security-best-practices`, `add-provider`).
69
+ Yorn ships with built-in embedded skills in `dist/skills/` (`graphify`, `agent-browser`, `subagent`, `screenshot`, `frontend-design`, `security-best-practices`, `add-provider`, `code-review`).
70
70
 
71
71
  ### Spawning Subagents via `run_agent.sh`
72
72
 
@@ -1 +1 @@
1
- {"schemaVersion":3,"generatedAt":"2026-08-29T10:27:53.139Z","structureHash":"3057daf694c095271f781bcfe5761e8b23c87ee15db6a23b539b956f99c163cd","files":{"amazon-bedrock.json":"681b69fb339cc8dce9f90d4ecfff4f9d5ee766d5aade5c9159f6de6df727eaab","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"e22c277e3a1ffddc3d2701b72787c9e0bd67b835de6b4cb806677b6b6a89a2f7","azure-openai-responses.json":"37d12c5cbfc29bfd9a802a0516f5d3209320bd4aa8ef9cd7c219af208244afa3","baseten.json":"e4d1ec84e8180a53e21c1511b8d78e497784515c33ba8397382ac3450c8b126e","cerebras.json":"38272a7525d6680c71bb4bb3c4085e871768b400832e2013b0e7fd92f8fd4f05","cloudflare-ai-gateway.json":"08cb27aade0885253e159ceacea6814ff324522b9cbe100a0c760a71723b41c7","cloudflare-workers-ai.json":"0ed67191adec10707a8ce1ed2c99a949dd06ec537de15d6b57e830575d248b86","deepseek.json":"e3106724723fd82d48a3ff685da9908a3a7b7b4fd84cc3cfe97a6a23067b6029","fireworks.json":"bce5d63ea8747157fcc7c540c2255c95c5f945a16d6c379bcc2d02a44790756f","github-copilot.json":"ecf7276f0b7744565ccbf8f5d64a12b3cd7e22f4acac398f3259f489d1c97745","google-vertex.json":"fb7586fc955da7b7d7d11d641954f496fbbb42cf3e4cbba66d7116ea3b37d5ed","google.json":"b5572904165d37ab594eafc3ab7f29774e35747b5dd211144ec01532db9217c1","groq.json":"f1eb899453e70b5e4479fe6eb78869ee99121fa6d4a019a5a05ab42d2ada8992","huggingface.json":"7616a851e53d254e375b760abe2b6148e8961a102bd5c7af31829a0f2dc8e5c5","kimi-coding.json":"ba42a26a69e5cb2122c0b384ba572efae93f42239ad86f26c2b7320a14aa75a1","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"1e6146ff3477883636448c0f44222f0a52b3c4562ef8f4eecf7e941cdd59d12e","moonshotai.json":"d8d5209873058ddccd37c1f026833e2ea3f9476c3dc9628b4a940d407acc0b2e","nvidia.json":"62fa810bece1c90454b481db5a3ff78bc66dc28dab9c65a655397eb1dfe2de73","openai-codex.json":"2712c2924a4a75213dddc743c0e5f08d50a781fe807f16d5afb5fb65b41c64c7","openai.json":"2f32f5796138f03153a0314edf4c8ee27531d62f3477de0da46e51095f5e4782","opencode-go.json":"5fc1e0352e9e2d83c2bcc8cd8c8fafa5e20bf0566606612f91befb42e7f6531d","opencode.json":"b44bf827b591b9c6a500ee0ba348e96f6bd72e7b6ba0a2429ed084ee66130a3a","openrouter.json":"5827a34a3ab679f8db4fa1c0dc0b058d3b3a81a9bc2d9940f005fa3fe90b122a","qwen-token-plan-cn.json":"e62dde34edb603376a1dc60b2a74a9c2605b9e81d81df55cc259796c45aa4793","qwen-token-plan-individual.json":"0e1578a5c0e11d65644bb42d1d6efee5af97a55a4881d0421ab68bd970d4d4ef","qwen-token-plan.json":"fe914313157ff41ab2f71977f0fdcfedb3a8a205d1092e3180f6799e5d7942fd","together.json":"c2b03c476d6b4d4059ed18a80f34d274c754dc84fe2591ae79fe2986512f2a51","vercel-ai-gateway.json":"2487069ae500c07e9417c59eea8f7b651a0fb5b21b0c9d073d0f71d72b34b567","xai.json":"282838b0546d63106c81f1703cdf5ed31ebfe0c5f13a4bec0d590472cbbe03f2","xiaomi-token-plan-ams.json":"7ce8ed244672c45737d286ff3ca9c3a2686a5d4b2f0c5f71ab9348c14b14daf3","xiaomi-token-plan-cn.json":"684892b5fe6fa371d6040d2011c0fa33facd650d2eaf19f5dbee8efb33016200","xiaomi-token-plan-sgp.json":"b19e79b82ac4fdcb080e6d220106797504c885ed70b27fc2b3c1aa4810f32963","xiaomi.json":"810368d3828c8bb9498012a0d48639030c0c216b8c13e79da02daa515aa23448","zai-coding-cn.json":"abf4cbc22507b9d545842072b5e34bce230025fc20f7b1cc67db3782c1dc4b56","zai.json":"089af736a622b0a25e417493819f4e174884afba43235c5a1f17814057875627"}}
1
+ {"schemaVersion":3,"generatedAt":"2026-08-29T10:46:28.941Z","structureHash":"3057daf694c095271f781bcfe5761e8b23c87ee15db6a23b539b956f99c163cd","files":{"amazon-bedrock.json":"681b69fb339cc8dce9f90d4ecfff4f9d5ee766d5aade5c9159f6de6df727eaab","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"e22c277e3a1ffddc3d2701b72787c9e0bd67b835de6b4cb806677b6b6a89a2f7","azure-openai-responses.json":"37d12c5cbfc29bfd9a802a0516f5d3209320bd4aa8ef9cd7c219af208244afa3","baseten.json":"e4d1ec84e8180a53e21c1511b8d78e497784515c33ba8397382ac3450c8b126e","cerebras.json":"38272a7525d6680c71bb4bb3c4085e871768b400832e2013b0e7fd92f8fd4f05","cloudflare-ai-gateway.json":"08cb27aade0885253e159ceacea6814ff324522b9cbe100a0c760a71723b41c7","cloudflare-workers-ai.json":"0ed67191adec10707a8ce1ed2c99a949dd06ec537de15d6b57e830575d248b86","deepseek.json":"e3106724723fd82d48a3ff685da9908a3a7b7b4fd84cc3cfe97a6a23067b6029","fireworks.json":"bce5d63ea8747157fcc7c540c2255c95c5f945a16d6c379bcc2d02a44790756f","github-copilot.json":"ecf7276f0b7744565ccbf8f5d64a12b3cd7e22f4acac398f3259f489d1c97745","google-vertex.json":"fb7586fc955da7b7d7d11d641954f496fbbb42cf3e4cbba66d7116ea3b37d5ed","google.json":"b5572904165d37ab594eafc3ab7f29774e35747b5dd211144ec01532db9217c1","groq.json":"f1eb899453e70b5e4479fe6eb78869ee99121fa6d4a019a5a05ab42d2ada8992","huggingface.json":"7616a851e53d254e375b760abe2b6148e8961a102bd5c7af31829a0f2dc8e5c5","kimi-coding.json":"ba42a26a69e5cb2122c0b384ba572efae93f42239ad86f26c2b7320a14aa75a1","minimax-cn.json":"65d37e55a6d9585855f94b3fb7739308d107fe248ebd9e1001d1c5d4606ad2c4","minimax.json":"c7dc5765995ae77242916430929c7cc9a782589f7e483e13f7e01663190d028e","mistral.json":"e3a109306644bf2f2fa38fece50b2d3ce1dbe3b87b1f1b9e2d70cce7eb5c0ea1","moonshotai-cn.json":"1e6146ff3477883636448c0f44222f0a52b3c4562ef8f4eecf7e941cdd59d12e","moonshotai.json":"d8d5209873058ddccd37c1f026833e2ea3f9476c3dc9628b4a940d407acc0b2e","nvidia.json":"62fa810bece1c90454b481db5a3ff78bc66dc28dab9c65a655397eb1dfe2de73","openai-codex.json":"2712c2924a4a75213dddc743c0e5f08d50a781fe807f16d5afb5fb65b41c64c7","openai.json":"2f32f5796138f03153a0314edf4c8ee27531d62f3477de0da46e51095f5e4782","opencode-go.json":"5fc1e0352e9e2d83c2bcc8cd8c8fafa5e20bf0566606612f91befb42e7f6531d","opencode.json":"b44bf827b591b9c6a500ee0ba348e96f6bd72e7b6ba0a2429ed084ee66130a3a","openrouter.json":"5827a34a3ab679f8db4fa1c0dc0b058d3b3a81a9bc2d9940f005fa3fe90b122a","qwen-token-plan-cn.json":"e62dde34edb603376a1dc60b2a74a9c2605b9e81d81df55cc259796c45aa4793","qwen-token-plan-individual.json":"0e1578a5c0e11d65644bb42d1d6efee5af97a55a4881d0421ab68bd970d4d4ef","qwen-token-plan.json":"fe914313157ff41ab2f71977f0fdcfedb3a8a205d1092e3180f6799e5d7942fd","together.json":"c2b03c476d6b4d4059ed18a80f34d274c754dc84fe2591ae79fe2986512f2a51","vercel-ai-gateway.json":"2487069ae500c07e9417c59eea8f7b651a0fb5b21b0c9d073d0f71d72b34b567","xai.json":"282838b0546d63106c81f1703cdf5ed31ebfe0c5f13a4bec0d590472cbbe03f2","xiaomi-token-plan-ams.json":"7ce8ed244672c45737d286ff3ca9c3a2686a5d4b2f0c5f71ab9348c14b14daf3","xiaomi-token-plan-cn.json":"684892b5fe6fa371d6040d2011c0fa33facd650d2eaf19f5dbee8efb33016200","xiaomi-token-plan-sgp.json":"b19e79b82ac4fdcb080e6d220106797504c885ed70b27fc2b3c1aa4810f32963","xiaomi.json":"810368d3828c8bb9498012a0d48639030c0c216b8c13e79da02daa515aa23448","zai-coding-cn.json":"abf4cbc22507b9d545842072b5e34bce230025fc20f7b1cc67db3782c1dc4b56","zai.json":"089af736a622b0a25e417493819f4e174884afba43235c5a1f17814057875627"}}
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 awesome-skills
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,233 @@
1
+ ---
2
+ name: code-review
3
+ description: |
4
+ Comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5,
5
+ Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C#/.NET, Kotlin, Swift,
6
+ Dart, Flutter, NestJS, C/C++, Zig, CSS/Less/Sass, Qt, and more.
7
+ Covers architecture review, performance review, security audit, code quality anti-patterns,
8
+ and common bugs across all ecosystems.
9
+ Use when: reviewing pull requests, conducting PR reviews, code review, reviewing code changes,
10
+ establishing review standards, mentoring developers, architecture reviews, security audits,
11
+ performance reviews, checking code quality, finding bugs, giving feedback on code.
12
+ allowed-tools:
13
+ - read
14
+ - grep
15
+ - find
16
+ - ls
17
+ - bash
18
+
19
+ ---
20
+
21
+ # Code Review Skill
22
+
23
+ Transform code reviews from gatekeeping to knowledge sharing through constructive feedback, systematic analysis, and collaborative improvement.
24
+
25
+ ## When to Use This Skill
26
+
27
+ - Reviewing pull requests and code changes
28
+ - Establishing code review standards for teams
29
+ - Mentoring junior developers through reviews
30
+ - Conducting architecture reviews
31
+ - Creating review checklists and guidelines
32
+ - Improving team collaboration
33
+ - Reducing code review cycle time
34
+ - Maintaining code quality standards
35
+
36
+ ## Core Principles
37
+
38
+ ### 1. The Review Mindset
39
+
40
+ **Goals of Code Review:**
41
+ - Catch bugs and edge cases
42
+ - Ensure code maintainability
43
+ - Share knowledge across team
44
+ - Enforce coding standards
45
+ - Improve design and architecture
46
+ - Build team culture
47
+
48
+ **Not the Goals:**
49
+ - Show off knowledge
50
+ - Nitpick formatting (use linters)
51
+ - Block progress unnecessarily
52
+ - Rewrite to your preference
53
+
54
+ ### 2. Effective Feedback
55
+
56
+ **Good Feedback is:**
57
+ - Specific and actionable
58
+ - Educational, not judgmental
59
+ - Focused on the code, not the person
60
+ - Balanced (praise good work too)
61
+ - Prioritized (critical vs nice-to-have)
62
+
63
+ ```markdown
64
+ ❌ Bad: "This is wrong."
65
+ ✅ Good: "This could cause a race condition when multiple users
66
+ access simultaneously. Consider using a mutex here."
67
+
68
+ ❌ Bad: "Why didn't you use X pattern?"
69
+ ✅ Good: "Have you considered the Repository pattern? It would
70
+ make this easier to test. Here's an example: [link]"
71
+
72
+ ❌ Bad: "Rename this variable."
73
+ ✅ Good: "[nit] Consider `userCount` instead of `uc` for
74
+ clarity. Not blocking if you prefer to keep it."
75
+ ```
76
+
77
+ ### 3. Review Scope
78
+
79
+ **What to Review:**
80
+ - Logic correctness and edge cases
81
+ - Security vulnerabilities
82
+ - Performance implications
83
+ - Test coverage and quality
84
+ - Error handling
85
+ - Documentation and comments
86
+ - API design and naming
87
+ - Architectural fit
88
+
89
+ **What Not to Review Manually:**
90
+ - Code formatting (use Prettier, Black, etc.)
91
+ - Import organization
92
+ - Linting violations
93
+ - Simple typos
94
+
95
+ ## Review Process
96
+
97
+ ### Phase 1: Context Gathering (2-3 minutes)
98
+
99
+ Before diving into code, understand:
100
+ 1. Read PR description and linked issue
101
+ 2. Check PR size (>400 lines? Ask to split)
102
+ 3. Review CI/CD status (tests passing?)
103
+ 4. Understand the business requirement
104
+ 5. Note any relevant architectural decisions
105
+
106
+ > For large diffs, pipe the diff through [`scripts/pr-analyzer.py`](scripts/pr-analyzer.py) (`git diff main...HEAD | python scripts/pr-analyzer.py`) to triage complexity and get a suggested review approach before reading.
107
+
108
+ ### Phase 2: High-Level Review (5-10 minutes)
109
+
110
+ 1. **Architecture & Design** - Does the solution fit the problem?
111
+ - For significant changes, consult [Architecture Review Guide](reference/architecture-review-guide.md)
112
+ - Check: SOLID principles, coupling/cohesion, anti-patterns
113
+ 2. **Performance Assessment** - Are there performance concerns?
114
+ - For performance-critical code, consult [Performance Review Guide](reference/performance-review-guide.md)
115
+ - Check: Algorithm complexity, N+1 queries, memory usage
116
+ 3. **File Organization** - Are new files in the right places?
117
+ 4. **Testing Strategy** - Are there tests covering edge cases?
118
+
119
+ ### Phase 3: Line-by-Line Review (10-20 minutes)
120
+
121
+ For each file, check:
122
+ - **Logic & Correctness** - Edge cases, off-by-one, null checks, race conditions
123
+ - **Security** - Input validation, injection risks, XSS, sensitive data
124
+ - **Performance** - N+1 queries, unnecessary loops, memory leaks
125
+ - **Maintainability** - Clear names, single responsibility, comments
126
+ - **Reuse** - Before accepting new code, search for existing utilities/helpers that could replace it. Check adjacent files and shared modules for similar patterns. See [Universal Quality Guide](reference/code-quality-universal.md) for anti-patterns like parameter sprawl, leaky abstractions, nested conditionals, stringly-typed code, TOCTOU, and no-op updates.
127
+
128
+ ### Phase 4: Summary & Decision (2-3 minutes)
129
+
130
+ 1. Summarize key concerns
131
+ 2. Highlight what you liked
132
+ 3. Make clear decision:
133
+ - ✅ Approve
134
+ - 💬 Comment (minor suggestions)
135
+ - 🔄 Request Changes (must address)
136
+ 4. Offer to pair if complex
137
+
138
+ ## Review Techniques
139
+
140
+ ### Technique 1: The Checklist Method
141
+
142
+ Use checklists for consistent reviews. See [Security Review Guide](reference/security-review-guide.md) for comprehensive security checklist.
143
+
144
+ ### Technique 2: The Question Approach
145
+
146
+ Instead of stating problems, ask questions:
147
+
148
+ ```markdown
149
+ ❌ "This will fail if the list is empty."
150
+ ✅ "What happens if `items` is an empty array?"
151
+
152
+ ❌ "You need error handling here."
153
+ ✅ "How should this behave if the API call fails?"
154
+ ```
155
+
156
+ ### Technique 3: Suggest, Don't Command
157
+
158
+ Use collaborative language:
159
+
160
+ ```markdown
161
+ ❌ "You must change this to use async/await"
162
+ ✅ "Suggestion: async/await might make this more readable. What do you think?"
163
+
164
+ ❌ "Extract this into a function"
165
+ ✅ "This logic appears in 3 places. Would it make sense to extract it?"
166
+ ```
167
+
168
+ ### Technique 4: Differentiate Severity
169
+
170
+ Use labels to indicate priority:
171
+
172
+ - 🔴 `[blocking]` - Must fix before merge
173
+ - 🟡 `[important]` - Should fix, discuss if disagree
174
+ - 🟢 `[nit]` - Nice to have, not blocking
175
+ - 💡 `[suggestion]` - Alternative approach to consider
176
+ - 📚 `[learning]` - Educational comment, no action needed
177
+ - 🎉 `[praise]` - Good work, keep it up!
178
+
179
+ **Severity levels:** 🔴 / 🟡 / 🟢 are the three severity tiers used as the standard across all guides in this skill — 🔴 blocks the merge, 🟡 should be addressed, 🟢 is optional. The remaining markers (💡 / 📚 / 🎉) are non-blocking annotations.
180
+
181
+ ## Language-Specific Guides
182
+
183
+ 根据审查的代码语言,查阅对应的详细指南:
184
+
185
+ | Language/Framework | Reference File | Key Topics |
186
+ |-------------------|----------------|------------|
187
+ | **React** | [React Guide](reference/react.md) | Hooks, useEffect, React 19 Actions, RSC, Suspense, TanStack Query v5 |
188
+ | **Vue 3** | [Vue Guide](reference/vue.md) | Composition API, 响应性系统, Props/Emits, Watchers, Composables |
189
+ | **Angular 17+** | [Angular Guide](reference/angular.md) | Signals, Standalone, RxJS, Zoneless, 模板优化, 测试, 路由守卫, HttpInterceptor |
190
+ | **Rust** | [Rust Guide](reference/rust.md) | 所有权/借用, Unsafe 审查, 异步代码, 取消安全性, 错误处理 |
191
+ | **TypeScript** | [TypeScript Guide](reference/typescript.md) | 类型安全, async/await, 不可变性, 测试, 模块解析, TS 5.x |
192
+ | **Python** | [Python Guide](reference/python.md) | 可变默认参数, 异常处理, 类属性 |
193
+ | **Django / DRF** | [Django Guide](reference/django.md) | 安全审查, N+1 查询, Serializer 反模式, ViewSet, 异步视图 |
194
+ | **FastAPI** | [FastAPI Guide](reference/fastapi.md) | Depends, Pydantic v2 validation, async correctness, sessions/N+1, auth vs authorization, test-driven verification |
195
+ | **Java** | [Java Guide](reference/java.md) | Java 17/21 新特性, Spring Boot 3, 虚拟线程, Stream/Optional |
196
+ | **Java 8 / Legacy** | [Java 8 Guide](reference/java8.md) | Java 8, Spring Boot 2, javax.*, Stream/Optional, java.time, CompletableFuture |
197
+ | **PHP** | [PHP Guide](reference/php.md) | PHP 8.x type system, PDO, security review, Composer, PHPUnit/PHPStan |
198
+ | **Ruby / Rails** | [Ruby Guide](reference/ruby.md) | Ruby semantics, Rails 8, Active Record, Active Job, security, testing |
199
+ | **C# / .NET** | [C# Guide](reference/csharp.md) | C# 12 特性, 异步编程, EF Core 性能, ASP.NET Core, LINQ |
200
+ | **Go** | [Go Guide](reference/go.md) | 错误处理, goroutine/channel, context, 接口设计 |
201
+ | **Kotlin / Android** | [Kotlin Guide](reference/kotlin.md) | 协程, Flow, Jetpack Compose, 空安全, 内存泄漏, 架构模式 |
202
+ | **Swift / SwiftUI** | [Swift Guide](reference/swift.md) | Optionals, Swift Concurrency, Sendable/actors, SwiftUI property wrappers, value vs reference types, API design |
203
+ | **Dart / Flutter** | [Dart Guide](reference/dart.md) | Widget rebuilds, const constructors, null safety, isolates, async in build, Riverpod/Bloc, platform channels, keys, disposal |
204
+ | **NestJS** | [NestJS Guide](reference/nestjs.md) | 依赖注入, 分层架构, DTO 验证, Guard/Interceptor, 循环依赖 |
205
+ | **Svelte / SvelteKit** | [Svelte Guide](reference/svelte.md) | Runes, Load 函数, Form Actions, Store 迁移, SSR/CSR 边界 |
206
+ | **C** | [C Guide](reference/c.md) | 指针/缓冲区, 内存安全, UB, 安全编码, 可移植性, 测试 |
207
+ | **C++** | [C++ Guide](reference/cpp.md) | RAII, 智能指针, C++20/23, constexpr, 测试 |
208
+ | **Zig** | [Zig Guide](reference/zig.md) | Allocators, error unions, defer/errdefer, comptime, C interop |
209
+ | **CSS/Less/Sass** | [CSS Guide](reference/css-less-sass.md) | 变量规范, !important, 性能优化, 响应式, 兼容性 |
210
+ | **Qt** | [Qt Guide](reference/qt.md) | 对象模型, 信号/槽, Model/View, QML, Qt6 迁移, 测试 |
211
+
212
+ ## Cross-Cutting Guides
213
+
214
+ Language-agnostic patterns applicable to all code reviews:
215
+
216
+ | Topic | Reference File | Key Topics |
217
+ |-------|----------------|------------|
218
+ | **Architecture Review** | [Architecture Review Guide](reference/architecture-review-guide.md) | SOLID, anti-patterns, coupling/cohesion, dependency direction |
219
+ | **Performance Review** | [Performance Review Guide](reference/performance-review-guide.md) | Web Vitals, N+1, algorithm complexity, memory leaks, caching |
220
+ | **Security Review** | [Security Review Guide](reference/security-review-guide.md) | SQLi, XSS, CSRF, SSRF, IDOR, 命令注入, 跨语言示例 |
221
+ | **Universal Quality** | [Universal Quality Guide](reference/code-quality-universal.md) | Reuse audit, parameter sprawl, leaky abstractions, nested conditionals, stringly-typed code, TOCTOU, no-op updates, redundant state |
222
+ | **Common Bugs** | [Common Bugs Checklist](reference/common-bugs-checklist.md) | Language-specific bug patterns, common pitfalls |
223
+ | **SQL Injection Prevention** | [SQL Injection Guide](reference/cross-cutting/sql-injection-prevention.md) | Parameterized queries, ORM safety, 6 languages, dynamic identifiers, detection |
224
+ | **XSS Prevention** | [XSS Prevention Guide](reference/cross-cutting/xss-prevention.md) | Output encoding, CSP, 5 frameworks, input validation vs encoding, detection |
225
+ | **N+1 Queries** | [N+1 Queries Guide](reference/cross-cutting/n-plus-one-queries.md) | Eager loading, batch fetching, DataLoader, 5 languages, detection |
226
+ | **Error Handling** | [Error Handling Guide](reference/cross-cutting/error-handling-principles.md) | Fail fast, error hierarchy, 7 languages, anti-patterns, logging |
227
+ | **Async & Concurrency** | [Concurrency Guide](reference/cross-cutting/async-concurrency-patterns.md) | Goroutines, async/await, actors, structured concurrency, 7 languages |
228
+ | **Review Best Practices** | [Code Review Best Practices](reference/code-review-best-practices.md) | Communication, reviewer mindset, giving feedback, severity labels |
229
+
230
+ ## Additional Resources
231
+
232
+ - [PR Review Template](assets/pr-review-template.md) - PR 审查评论模板
233
+ - [Review Checklist](assets/review-checklist.md) - 快速参考清单
@@ -0,0 +1,137 @@
1
+ # PR Review Template
2
+
3
+ Copy and use this template for your code reviews.
4
+
5
+ ---
6
+
7
+ ## Summary
8
+
9
+ [Brief overview of what was reviewed - 1-2 sentences]
10
+
11
+ **PR Size:** [Small/Medium/Large] (~X lines)
12
+ **Review Time:** [X minutes]
13
+
14
+ ## Strengths
15
+
16
+ - [What was done well]
17
+ - [Good patterns or approaches used]
18
+ - [Improvements from previous code]
19
+
20
+ ## Architecture & Performance
21
+
22
+ **Architecture Assessment**
23
+ - [ ] Separation of concerns — are responsibilities clearly divided?
24
+ - [ ] Module responsibilities — does each module have a single purpose?
25
+ - [ ] Dependency direction — do dependencies flow toward stability?
26
+ - [ ] Consistent with existing patterns and conventions
27
+
28
+ > See [Architecture Review Guide](../reference/architecture-review-guide.md) for detailed SOLID, anti-pattern, and coupling analysis.
29
+
30
+ **Performance Assessment**
31
+ - [ ] Algorithm complexity — any O(n²) or worse on large inputs?
32
+ - [ ] Memory impact — large allocations, leaks, unbounded growth?
33
+ - [ ] I/O impact — excessive API calls, unbatched writes, missing caching?
34
+ - [ ] Database queries — N+1 risks, missing indexes, unoptimized joins?
35
+
36
+ > See [Performance Review Guide](../reference/performance-review-guide.md) for comprehensive Web Vitals, N+1, and caching guidance.
37
+
38
+ ## Required Changes
39
+
40
+ 🔴 **[blocking]** [Issue description]
41
+ > [Code location or example]
42
+ > [Suggested fix or explanation]
43
+
44
+ 🔴 **[blocking]** [Issue description]
45
+ > [Details]
46
+
47
+ ## Important Suggestions
48
+
49
+ 🟡 **[important]** [Issue description]
50
+ > [Why this matters]
51
+ > [Suggested approach]
52
+
53
+ ## Minor Suggestions
54
+
55
+ 🟢 **[nit]** [Minor improvement suggestion]
56
+
57
+ 💡 **[suggestion]** [Alternative approach to consider]
58
+
59
+ ## Learning Notes
60
+
61
+ 📚 [Educational context worth sharing about X]
62
+
63
+ 📚 [Background behind design decision Y]
64
+
65
+ ## Security Considerations
66
+
67
+ - [ ] No hardcoded secrets
68
+ - [ ] Input validation present
69
+ - [ ] Authorization checks in place
70
+ - [ ] No SQL/XSS injection risks
71
+ - [ ] CSRF protection for state-changing operations
72
+ - [ ] Sensitive data not leaked in logs/errors
73
+ - [ ] Dependency vulnerabilities checked (npm audit / pip audit / cargo audit)
74
+
75
+ > See [Security Review Guide](../reference/security-review-guide.md) for comprehensive injection, XSS, CSRF, secrets, and auth checklist.
76
+
77
+ ## Test Coverage
78
+
79
+ - [ ] Unit tests added/updated
80
+ - [ ] Edge cases covered
81
+ - [ ] Error cases tested
82
+
83
+ ## Verdict
84
+
85
+ **[ ] ✅ Approve** - Ready to merge
86
+ **[ ] 💬 Comment** - Minor suggestions, can merge
87
+ **[ ] 🔄 Request Changes** - Must address blocking issues
88
+
89
+ ---
90
+
91
+ ## Quick Copy Templates
92
+
93
+ ### Blocking Issue
94
+ ```
95
+ 🔴 **[blocking]** [Title]
96
+
97
+ [Description of the issue]
98
+
99
+ **Location:** `file.ts:123`
100
+
101
+ **Suggested fix:**
102
+ \`\`\`typescript
103
+ // Your suggested code
104
+ \`\`\`
105
+ ```
106
+
107
+ ### Important Suggestion
108
+ ```
109
+ 🟡 **[important]** [Title]
110
+
111
+ [Why this is important]
112
+
113
+ **Consider:**
114
+ - Option A: [description]
115
+ - Option B: [description]
116
+ ```
117
+
118
+ ### Minor Suggestion
119
+ ```
120
+ 🟢 **[nit]** [Suggestion]
121
+
122
+ Not blocking, but consider [improvement].
123
+ ```
124
+
125
+ ### Praise
126
+ ```
127
+ 🎉 **[praise]** Great work on [specific thing]!
128
+
129
+ [Why this is good]
130
+ ```
131
+
132
+ ### Learning
133
+ ```
134
+ 📚 **[learning]** [Educational note]
135
+
136
+ For context, [X] works this way because [Y]. No action needed — just sharing.
137
+ ```
@@ -0,0 +1,123 @@
1
+ # Code Review Quick Checklist
2
+
3
+ Quick reference checklist for code reviews.
4
+
5
+ ## Pre-Review (2 min)
6
+
7
+ - [ ] Read PR description and linked issue
8
+ - [ ] Check PR size (<400 lines ideal)
9
+ - [ ] Verify CI/CD status (tests passing?)
10
+ - [ ] Understand the business requirement
11
+
12
+ ## Architecture & Design (5 min)
13
+
14
+ - [ ] Solution fits the problem
15
+ - [ ] Consistent with existing patterns
16
+ - [ ] No simpler approach exists
17
+ - [ ] Will it scale?
18
+ - [ ] Changes in right location
19
+
20
+ ## Logic & Correctness (10 min)
21
+
22
+ - [ ] Edge cases handled
23
+ - [ ] Null/undefined checks present
24
+ - [ ] Off-by-one errors checked
25
+ - [ ] Race conditions considered
26
+ - [ ] Error handling complete
27
+ - [ ] Correct data types used
28
+
29
+ ## Security (5 min)
30
+
31
+ - [ ] No hardcoded secrets
32
+ - [ ] Input validated/sanitized
33
+ - [ ] SQL injection prevented
34
+ - [ ] XSS prevented
35
+ - [ ] Authorization checks present
36
+ - [ ] Sensitive data protected
37
+
38
+ ## Performance (3 min)
39
+
40
+ - [ ] No N+1 queries
41
+ - [ ] Expensive operations optimized
42
+ - [ ] Large lists paginated
43
+ - [ ] No memory leaks
44
+ - [ ] Caching considered where appropriate
45
+
46
+ ## Testing (5 min)
47
+
48
+ - [ ] Tests exist for new code
49
+ - [ ] Edge cases tested
50
+ - [ ] Error cases tested
51
+ - [ ] Tests are readable
52
+ - [ ] Tests are deterministic
53
+
54
+ ## Code Quality (3 min)
55
+
56
+ - [ ] Clear variable/function names
57
+ - [ ] No code duplication
58
+ - [ ] Functions do one thing
59
+ - [ ] Complex code commented
60
+ - [ ] No magic numbers
61
+
62
+ ## Documentation (2 min)
63
+
64
+ - [ ] Public APIs documented
65
+ - [ ] README updated if needed
66
+ - [ ] Breaking changes noted
67
+ - [ ] Complex logic explained
68
+
69
+ ---
70
+
71
+ ## Severity Labels
72
+
73
+ | Label | Meaning | Action |
74
+ |-------|---------|--------|
75
+ | 🔴 `[blocking]` | Must fix | Block merge |
76
+ | 🟡 `[important]` | Should fix | Discuss if disagree |
77
+ | 🟢 `[nit]` | Nice to have | Non-blocking |
78
+ | 💡 `[suggestion]` | Alternative | Consider |
79
+ | 📚 `[learning]` | Educational comment | No action needed |
80
+ | 🎉 `[praise]` | Good work | Celebrate! |
81
+
82
+ ---
83
+
84
+ ## Decision Matrix
85
+
86
+ | Situation | Decision |
87
+ |-----------|----------|
88
+ | Critical security issue | 🔴 Block, fix immediately |
89
+ | Breaking change without migration | 🔴 Block |
90
+ | Missing error handling | 🟡 Should fix |
91
+ | No tests for new code | 🟡 Should fix |
92
+ | Style preference | 🟢 Non-blocking |
93
+ | Minor naming improvement | 🟢 Non-blocking |
94
+ | Clever but working code | 💡 Suggest simpler |
95
+
96
+ ---
97
+
98
+ ## Time Budget
99
+
100
+ This checklist is designed for a **lightweight quick review**. For comprehensive reviews covering architecture and performance analysis, use the full four-phase process in [SKILL.md](../SKILL.md) (19–36 minutes). Smaller PRs trend toward the lower end of each phase; larger PRs toward the upper end.
101
+
102
+ | PR Size | Quick Review | Full Review (4-phase) |
103
+ |---------|-------------|----------------------|
104
+ | < 100 lines | 10–15 min | ~19–28 min |
105
+ | 100–400 lines | 20–40 min | ~28–36 min |
106
+ | > 400 lines | Ask to split | Ask to split |
107
+
108
+ ---
109
+
110
+ ## Red Flags
111
+
112
+ Watch for these patterns:
113
+
114
+ - `// TODO` in production code
115
+ - `console.log` left in code
116
+ - Commented out code
117
+ - `any` type in TypeScript
118
+ - Empty catch blocks
119
+ - `unwrap()` in Rust production code
120
+ - Magic numbers/strings
121
+ - Copy-pasted code blocks
122
+ - Missing null checks
123
+ - Hardcoded URLs/credentials