evizi-kit 1.0.0

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 (201) hide show
  1. package/README.md +506 -0
  2. package/kits/agent/.agent/skills/claude-code-subagent-creator/SKILL.md +292 -0
  3. package/kits/agent/.agent/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  4. package/kits/agent/.agent/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  5. package/kits/agent/.agent/skills/skill-creator/LICENSE.txt +202 -0
  6. package/kits/agent/.agent/skills/skill-creator/SKILL.md +485 -0
  7. package/kits/agent/.agent/skills/skill-creator/agents/analyzer.md +274 -0
  8. package/kits/agent/.agent/skills/skill-creator/agents/comparator.md +202 -0
  9. package/kits/agent/.agent/skills/skill-creator/agents/grader.md +223 -0
  10. package/kits/agent/.agent/skills/skill-creator/assets/eval_review.html +146 -0
  11. package/kits/agent/.agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  12. package/kits/agent/.agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  13. package/kits/agent/.agent/skills/skill-creator/references/schemas.md +430 -0
  14. package/kits/agent/.agent/skills/skill-creator/scripts/__init__.py +0 -0
  15. package/kits/agent/.agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  16. package/kits/agent/.agent/skills/skill-creator/scripts/generate_report.py +326 -0
  17. package/kits/agent/.agent/skills/skill-creator/scripts/improve_description.py +247 -0
  18. package/kits/agent/.agent/skills/skill-creator/scripts/package_skill.py +136 -0
  19. package/kits/agent/.agent/skills/skill-creator/scripts/quick_validate.py +103 -0
  20. package/kits/agent/.agent/skills/skill-creator/scripts/run_eval.py +310 -0
  21. package/kits/agent/.agent/skills/skill-creator/scripts/run_loop.py +328 -0
  22. package/kits/agent/.agent/skills/skill-creator/scripts/utils.py +47 -0
  23. package/kits/agent/manifest.json +10 -0
  24. package/kits/claude/.claude/agents/code-pusher.md +46 -0
  25. package/kits/claude/.claude/agents/feature-document-updater.md +37 -0
  26. package/kits/claude/.claude/agents/self-reviewer.md +32 -0
  27. package/kits/claude/.claude/agents/web-auto-agentic-workflow-initializer.md +42 -0
  28. package/kits/claude/.claude/agents/web-auto-assisted-fix-and-runner.md +36 -0
  29. package/kits/claude/.claude/agents/web-auto-chrome-devtools-selector-extractor.md +36 -0
  30. package/kits/claude/.claude/agents/web-auto-coder.md +33 -0
  31. package/kits/claude/.claude/agents/web-auto-fe-selector-extractor.md +31 -0
  32. package/kits/claude/.claude/agents/web-auto-fix-and-runner.md +35 -0
  33. package/kits/claude/.claude/agents/web-auto-lessons-learned-extractor.md +34 -0
  34. package/kits/claude/.claude/agents/web-auto-playwright-mcp-selector-extractor.md +37 -0
  35. package/kits/claude/.claude/agents/web-auto-source-instructions-updater.md +43 -0
  36. package/kits/claude/.claude/agents/web-auto-test-cases-generator.md +29 -0
  37. package/kits/claude/.claude/agents/web-auto-ticket-designer.md +35 -0
  38. package/kits/claude/.claude/agents/web-auto-ticket-playbook-planner.md +36 -0
  39. package/kits/claude/.claude/agents/web-auto.md +382 -0
  40. package/kits/claude/.claude/skills/claude-code-subagent-creator/SKILL.md +292 -0
  41. package/kits/claude/.claude/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  42. package/kits/claude/.claude/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  43. package/kits/claude/.claude/skills/skill-creator/LICENSE.txt +202 -0
  44. package/kits/claude/.claude/skills/skill-creator/SKILL.md +485 -0
  45. package/kits/claude/.claude/skills/skill-creator/agents/analyzer.md +274 -0
  46. package/kits/claude/.claude/skills/skill-creator/agents/comparator.md +202 -0
  47. package/kits/claude/.claude/skills/skill-creator/agents/grader.md +223 -0
  48. package/kits/claude/.claude/skills/skill-creator/assets/eval_review.html +146 -0
  49. package/kits/claude/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  50. package/kits/claude/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  51. package/kits/claude/.claude/skills/skill-creator/references/schemas.md +430 -0
  52. package/kits/claude/.claude/skills/skill-creator/scripts/__init__.py +0 -0
  53. package/kits/claude/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  54. package/kits/claude/.claude/skills/skill-creator/scripts/generate_report.py +326 -0
  55. package/kits/claude/.claude/skills/skill-creator/scripts/improve_description.py +247 -0
  56. package/kits/claude/.claude/skills/skill-creator/scripts/package_skill.py +136 -0
  57. package/kits/claude/.claude/skills/skill-creator/scripts/quick_validate.py +103 -0
  58. package/kits/claude/.claude/skills/skill-creator/scripts/run_eval.py +310 -0
  59. package/kits/claude/.claude/skills/skill-creator/scripts/run_loop.py +328 -0
  60. package/kits/claude/.claude/skills/skill-creator/scripts/utils.py +47 -0
  61. package/kits/claude/manifest.json +10 -0
  62. package/kits/cursor/.cursor/agents/code-pusher.agent.md +43 -0
  63. package/kits/cursor/.cursor/agents/feature-document-updater.agent.md +34 -0
  64. package/kits/cursor/.cursor/agents/self-reviewer.agent.md +29 -0
  65. package/kits/cursor/.cursor/agents/web-auto-agentic-workflow-initializer.agent.md +37 -0
  66. package/kits/cursor/.cursor/agents/web-auto-assisted-fix-and-runner.agent.md +33 -0
  67. package/kits/cursor/.cursor/agents/web-auto-chrome-devtools-selector-extractor.agent.md +31 -0
  68. package/kits/cursor/.cursor/agents/web-auto-coder.agent.md +30 -0
  69. package/kits/cursor/.cursor/agents/web-auto-fe-selector-extractor.agent.md +28 -0
  70. package/kits/cursor/.cursor/agents/web-auto-fix-and-runner.agent.md +32 -0
  71. package/kits/cursor/.cursor/agents/web-auto-lessons-learned-extractor.agent.md +31 -0
  72. package/kits/cursor/.cursor/agents/web-auto-playwright-mcp-selector-extractor.agent.md +32 -0
  73. package/kits/cursor/.cursor/agents/web-auto-source-instructions-updater.agent.md +40 -0
  74. package/kits/cursor/.cursor/agents/web-auto-test-cases-generator.agent.md +26 -0
  75. package/kits/cursor/.cursor/agents/web-auto-ticket-designer.agent.md +32 -0
  76. package/kits/cursor/.cursor/agents/web-auto-ticket-playbook-planner.agent.md +33 -0
  77. package/kits/cursor/.cursor/agents/web-auto.agent.md +379 -0
  78. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/SKILL.md +292 -0
  79. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  80. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  81. package/kits/cursor/.cursor/skills/skill-creator/LICENSE.txt +202 -0
  82. package/kits/cursor/.cursor/skills/skill-creator/SKILL.md +485 -0
  83. package/kits/cursor/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
  84. package/kits/cursor/.cursor/skills/skill-creator/agents/comparator.md +202 -0
  85. package/kits/cursor/.cursor/skills/skill-creator/agents/grader.md +223 -0
  86. package/kits/cursor/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
  87. package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  88. package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  89. package/kits/cursor/.cursor/skills/skill-creator/references/schemas.md +430 -0
  90. package/kits/cursor/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
  91. package/kits/cursor/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  92. package/kits/cursor/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
  93. package/kits/cursor/.cursor/skills/skill-creator/scripts/improve_description.py +247 -0
  94. package/kits/cursor/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
  95. package/kits/cursor/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
  96. package/kits/cursor/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
  97. package/kits/cursor/.cursor/skills/skill-creator/scripts/run_loop.py +328 -0
  98. package/kits/cursor/.cursor/skills/skill-creator/scripts/utils.py +47 -0
  99. package/kits/cursor/manifest.json +10 -0
  100. package/kits/github/.github/agents/code-pusher.agent.md +45 -0
  101. package/kits/github/.github/agents/feature-document-updater.agent.md +36 -0
  102. package/kits/github/.github/agents/self-reviewer.agent.md +31 -0
  103. package/kits/github/.github/agents/web-auto-agentic-workflow-initializer.agent.md +39 -0
  104. package/kits/github/.github/agents/web-auto-assisted-fix-and-runner.agent.md +35 -0
  105. package/kits/github/.github/agents/web-auto-chrome-devtools-selector-extractor.agent.md +33 -0
  106. package/kits/github/.github/agents/web-auto-coder.agent.md +32 -0
  107. package/kits/github/.github/agents/web-auto-fe-selector-extractor.agent.md +30 -0
  108. package/kits/github/.github/agents/web-auto-fix-and-runner.agent.md +34 -0
  109. package/kits/github/.github/agents/web-auto-lessons-learned-extractor.agent.md +33 -0
  110. package/kits/github/.github/agents/web-auto-playwright-mcp-selector-extractor.agent.md +34 -0
  111. package/kits/github/.github/agents/web-auto-source-instructions-updater.agent.md +42 -0
  112. package/kits/github/.github/agents/web-auto-test-cases-generator.agent.md +28 -0
  113. package/kits/github/.github/agents/web-auto-ticket-designer.agent.md +34 -0
  114. package/kits/github/.github/agents/web-auto-ticket-playbook-creator.agent.md +35 -0
  115. package/kits/github/.github/agents/web-auto.agent.md +382 -0
  116. package/kits/github/.github/skills/claude-code-subagent-creator/SKILL.md +310 -0
  117. package/kits/github/.github/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  118. package/kits/github/.github/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +37 -0
  119. package/kits/github/.github/skills/skill-creator/LICENSE.txt +202 -0
  120. package/kits/github/.github/skills/skill-creator/SKILL.md +485 -0
  121. package/kits/github/.github/skills/skill-creator/agents/analyzer.md +274 -0
  122. package/kits/github/.github/skills/skill-creator/agents/comparator.md +202 -0
  123. package/kits/github/.github/skills/skill-creator/agents/grader.md +223 -0
  124. package/kits/github/.github/skills/skill-creator/assets/eval_review.html +146 -0
  125. package/kits/github/.github/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  126. package/kits/github/.github/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  127. package/kits/github/.github/skills/skill-creator/references/schemas.md +430 -0
  128. package/kits/github/.github/skills/skill-creator/scripts/__init__.py +0 -0
  129. package/kits/github/.github/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  130. package/kits/github/.github/skills/skill-creator/scripts/generate_report.py +326 -0
  131. package/kits/github/.github/skills/skill-creator/scripts/improve_description.py +247 -0
  132. package/kits/github/.github/skills/skill-creator/scripts/package_skill.py +136 -0
  133. package/kits/github/.github/skills/skill-creator/scripts/quick_validate.py +103 -0
  134. package/kits/github/.github/skills/skill-creator/scripts/run_eval.py +310 -0
  135. package/kits/github/.github/skills/skill-creator/scripts/run_loop.py +328 -0
  136. package/kits/github/.github/skills/skill-creator/scripts/utils.py +47 -0
  137. package/kits/github/manifest.json +10 -0
  138. package/kits/shared/docs/ai-code-review.md +440 -0
  139. package/kits/shared/docs/increase-unit-test-coverage.md +77 -0
  140. package/kits/shared/docs/pr-review-agent.md +501 -0
  141. package/kits/shared/docs/self-review-agent.md +246 -0
  142. package/kits/shared/docs/web-auto-agentic-workflow.md +506 -0
  143. package/kits/shared/manifest.json +11 -0
  144. package/kits/shared/skills/fix-automation-tests/SKILL.md +280 -0
  145. package/kits/shared/skills/fix-automation-tests/scripts/fetch_pr_changes.py +300 -0
  146. package/kits/shared/skills/fix-automation-tests/templates/impact-report.template.md +42 -0
  147. package/kits/shared/skills/increase-unit-test-coverage/SKILL.md +117 -0
  148. package/kits/shared/skills/increase-unit-test-coverage/scripts/filter_low_coverage.py +447 -0
  149. package/kits/shared/skills/pr-review/SKILL.md +200 -0
  150. package/kits/shared/skills/pr-review/references/automation.md +62 -0
  151. package/kits/shared/skills/pr-review/references/backend.md +95 -0
  152. package/kits/shared/skills/pr-review/references/frontend.md +103 -0
  153. package/kits/shared/skills/pr-review/references/mobile.md +108 -0
  154. package/kits/shared/skills/pr-review/references/output-schema.md +130 -0
  155. package/kits/shared/skills/pr-review/scripts/post-review.py +1395 -0
  156. package/kits/shared/skills/push-code/SKILL.md +176 -0
  157. package/kits/shared/skills/self-review/SKILL.md +234 -0
  158. package/kits/shared/skills/self-review/evals/evals.json +23 -0
  159. package/kits/shared/skills/self-review/references/automation.md +62 -0
  160. package/kits/shared/skills/self-review/references/backend.md +95 -0
  161. package/kits/shared/skills/self-review/references/frontend.md +103 -0
  162. package/kits/shared/skills/self-review/references/mobile.md +108 -0
  163. package/kits/shared/skills/self-review/templates/issues.template.md +72 -0
  164. package/kits/shared/skills/update-feature-document/SKILL.md +156 -0
  165. package/kits/shared/skills/update-feature-document/templates/delta.template.yaml +58 -0
  166. package/kits/shared/skills/update-feature-document/templates/feature.template.md +25 -0
  167. package/kits/shared/skills/web-auto-assisted-fix-and-run/SKILL.md +130 -0
  168. package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-api-error.md +108 -0
  169. package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-selector.md +60 -0
  170. package/kits/shared/skills/web-auto-assisted-fix-and-run/templates/issues-resolution-report-append.template.md +54 -0
  171. package/kits/shared/skills/web-auto-chrome-devtools-mcp-extract-selectors/SKILL.md +284 -0
  172. package/kits/shared/skills/web-auto-coding/SKILL.md +152 -0
  173. package/kits/shared/skills/web-auto-extract-lessons-learned/SKILL.md +168 -0
  174. package/kits/shared/skills/web-auto-extract-lessons-learned/templates/lessons-learned.template.md +115 -0
  175. package/kits/shared/skills/web-auto-fe-extract-selectors/SKILL.md +282 -0
  176. package/kits/shared/skills/web-auto-fe-extract-selectors/evals/evals.json +23 -0
  177. package/kits/shared/skills/web-auto-fix-and-run-test/SKILL.md +183 -0
  178. package/kits/shared/skills/web-auto-fix-and-run-test/templates/issues-resolution-report.template.md +77 -0
  179. package/kits/shared/skills/web-auto-generate-best-practices/SKILL.md +123 -0
  180. package/kits/shared/skills/web-auto-generate-instructions/SKILL.md +200 -0
  181. package/kits/shared/skills/web-auto-generate-instructions/evals/evals.json +23 -0
  182. package/kits/shared/skills/web-auto-generate-instructions/references/analysis-guide.md +145 -0
  183. package/kits/shared/skills/web-auto-generate-instructions/templates/web-auto-instructions.template.md +184 -0
  184. package/kits/shared/skills/web-auto-generate-project-blueprint/SKILL.md +181 -0
  185. package/kits/shared/skills/web-auto-generate-project-blueprint/evals/evals.json +57 -0
  186. package/kits/shared/skills/web-auto-generate-project-blueprint/templates/web-auto-project-blueprint.template.md +161 -0
  187. package/kits/shared/skills/web-auto-playwright-mcp-extract-selectors/SKILL.md +293 -0
  188. package/kits/shared/skills/web-auto-test-cases/SKILL.md +138 -0
  189. package/kits/shared/skills/web-auto-test-cases/evals/evals.json +129 -0
  190. package/kits/shared/skills/web-auto-test-cases/templates/test-cases.template.md +53 -0
  191. package/kits/shared/skills/web-auto-ticket-design/SKILL.md +199 -0
  192. package/kits/shared/skills/web-auto-ticket-design/templates/ticket-design.template.md +138 -0
  193. package/kits/shared/skills/web-auto-ticket-playbook/SKILL.md +218 -0
  194. package/kits/shared/skills/web-auto-ticket-playbook/evals/evals.json +23 -0
  195. package/kits/shared/skills/web-auto-ticket-playbook/templates/ticket-playbook.template.md +148 -0
  196. package/kits/shared/skills/web-auto-update-source-instructions/SKILL.md +156 -0
  197. package/kits/shared/skills/web-auto-update-source-instructions/evals/evals.json +22 -0
  198. package/kits/shared/skills/workspace-ai-nav-creator/SKILL.md +168 -0
  199. package/kits/shared/skills/workspace-ai-nav-creator/templates/agents-md.template.md +112 -0
  200. package/kits/shared/skills/workspace-ai-nav-creator/templates/claude-md.template.md +86 -0
  201. package/package.json +16 -0
@@ -0,0 +1,501 @@
1
+ # PR Review Skill
2
+
3
+ ## 1. Overview
4
+
5
+ The **PR Review Skill** enables AI agents to automatically review pull request code changes and create inline comments directly on Git platforms. When a user requests a PR review, the AI agent invokes this skill to fetch PR code, analyze it against project standards, and post structured feedback.
6
+
7
+ ### Key Capabilities
8
+
9
+ - **Automated PR Review**: Fetch and review pull request code automatically
10
+ - **Multi-Platform Support**: Create inline comments on GitHub, Gitea, GitLab, and Bitbucket
11
+ - **Quality Assurance**: Identify bugs, security issues, and code standard violations
12
+ - **Notification Integration**: Send review results to Google Chat
13
+
14
+ ### How It Works
15
+
16
+ When a user asks the AI agent to review a PR (e.g., "Review PR #42"), the agent:
17
+ 1. Recognizes the request and invokes the `pr-review` skill
18
+ 2. The skill handles the entire PR review workflow
19
+ 3. Returns results to the user
20
+
21
+ ## 2. Components
22
+
23
+ | Component | File | Description |
24
+ |-----------|------|-------------|
25
+ | **PR Review Skill** | `.cursor/skills/pr-review/SKILL.md` or `.github/skills/pr-review/SKILL.md` | Skill definition and workflow for PR review process |
26
+ | **Configuration File** | `.cursor/project.config.json` or `.github/project.config.json` | Project settings, platform config, and notification settings |
27
+ | **Unified Dispatcher** | `scripts/post-review.py` | Single script with all platform logic embedded - transforms standard output and posts to Git platforms |
28
+ | **Frontend Checklist** | `references/frontend.md` | 100+ checks for React, Vue, Angular, etc. |
29
+ | **Backend Checklist** | `references/backend.md` | 70+ checks for API, database, security |
30
+ | **Mobile Checklist** | `references/mobile.md` | 110+ checks for iOS and Android |
31
+ | **Automation Checklist** | `references/automation.md` | 40+ checks for E2E tests |
32
+
33
+ > **Note:** All file paths under `references/` and `scripts/` are relative to the skill directory (`.cursor/skills/pr-review/` or `.github/skills/pr-review/`).
34
+
35
+ ## 3. Setup Guide
36
+
37
+ ### Step 1: Create Configuration File
38
+
39
+ Create `.cursor/project.config.json` (or `.github/project.config.json`) and customize:
40
+
41
+ ```json
42
+ {
43
+ "baseBranch": "main",
44
+ "platform": "github",
45
+ "platformConfig": {
46
+ "github": {
47
+ "apiUrl": "https://api.github.com",
48
+ "owner": "your-org",
49
+ "repo": "your-repo"
50
+ },
51
+ "gitea": {
52
+ "apiUrl": "https://gitea.example.com/api/v1",
53
+ "owner": "your-org",
54
+ "repo": "your-repo"
55
+ },
56
+ "gitlab": {
57
+ "apiUrl": "https://gitlab.com/api/v4",
58
+ "projectId": "your-project-id"
59
+ },
60
+ "bitbucket": {
61
+ "apiUrl": "https://api.bitbucket.org/2.0",
62
+ "workspace": "your-workspace",
63
+ "repoSlug": "your-repo"
64
+ }
65
+ },
66
+ "enableCommentPosting": true,
67
+ "enableNotification": true
68
+ }
69
+ ```
70
+
71
+ **Configuration Options:**
72
+
73
+ - `enableCommentPosting` (boolean, default: `true`) - Controls whether inline comments should be posted to the git platform
74
+ - `enableNotification` (boolean, default: `false`) - Controls whether Google Chat notifications should be sent
75
+
76
+ **Operation Modes:**
77
+
78
+ The script supports flexible operation modes based on your configuration and token availability:
79
+
80
+ 1. **Full Mode** - Posts inline comments + sends notification
81
+ - Config: `enableCommentPosting: true`, `enableNotification: true`
82
+ - Requires: Platform token configured
83
+ - Use case: Production environment with full features
84
+
85
+ 2. **Comment-Only Mode** - Posts inline comments, no notification
86
+ - Config: `enableCommentPosting: true`, `enableNotification: false`
87
+ - Requires: Platform token configured
88
+ - Use case: CI/CD without notification spam
89
+
90
+ 3. **Notification-Only Mode** - Skips inline comments, only sends notification
91
+ - Config: `enableCommentPosting: false`, `enableNotification: true`
92
+ - OR: `enableCommentPosting: true` (but no token), `enableNotification: true`
93
+ - No platform token needed
94
+ - Use case: Testing, environments without git tokens, or notification-only setups
95
+
96
+ ### Step 2: Set Environment Variables
97
+
98
+ The script uses standardized environment variable names. Configure based on your operation mode:
99
+
100
+ **For Comment Posting (Required if `enableCommentPosting: true`):**
101
+
102
+ ```bash
103
+ # GitHub
104
+ export GITHUB_TOKEN="your-github-token"
105
+
106
+ # GitLab
107
+ export GITLAB_TOKEN="your-gitlab-token"
108
+
109
+ # Gitea
110
+ export GITEA_TOKEN="your-gitea-token"
111
+
112
+ # Bitbucket
113
+ export BITBUCKET_TOKEN="your-bitbucket-token"
114
+ export BITBUCKET_USERNAME="your-bitbucket-username"
115
+ ```
116
+
117
+ **For Notifications (Required if `enableNotification: true`):**
118
+
119
+ ```bash
120
+ # Google Chat notifications
121
+ export GOOGLE_CHAT_WEBHOOK_URL="your-webhook-url"
122
+ ```
123
+
124
+ **Token Requirements by Mode:**
125
+
126
+ | Mode | Platform Token | Webhook URL |
127
+ |------|----------------|-------------|
128
+ | Full Mode | ✅ Required | ✅ Required |
129
+ | Comment-Only Mode | ✅ Required | ❌ Not needed |
130
+ | Notification-Only Mode | ❌ Optional | ✅ Required |
131
+
132
+ **Tip:** If you only want notifications without posting comments, you can skip the platform token entirely by setting `enableCommentPosting: false` in your config.
133
+
134
+ ### Step 3: Verify Git Setup
135
+
136
+ ```bash
137
+ git remote -v
138
+ git fetch origin
139
+ ```
140
+
141
+ ## 4. How to Use
142
+
143
+ ### Basic Workflow
144
+
145
+ 1. **User prompts the AI agent** with a PR review request (e.g., "Review PR #42")
146
+ 2. **AI agent recognizes the intent** and invokes the `pr-review` skill with the PR number
147
+ 3. **Skill executes the review workflow:**
148
+ - Fetches the PR code using Git commands
149
+ - Compares PR branch with base branch
150
+ - Detects tech stack and loads domain-specific checklist
151
+ - Analyzes code changes against the checklist
152
+ - Generates standard review output JSON (saves to `review.json` in project root)
153
+ - **Shows preview and asks for confirmation** (if `requireConfirmation: true`)
154
+ - Calls `python post-review.py` (if user confirms or auto-post enabled)
155
+ - Returns to the previous branch (cleanup)
156
+ 4. **post-review.py handles posting:**
157
+ - Reads platform from `project.config.json`
158
+ - Transforms standard review to platform-specific format
159
+ - Posts inline comments to Git platform via API
160
+ - Sends Google Chat notification (if `enableNotification` is true)
161
+ - Cleans up by deleting `review.json` after successful posting
162
+ 5. **AI agent returns results** to the user
163
+
164
+ ### Trigger Examples
165
+
166
+ The AI agent will invoke the `pr-review` skill when it detects prompts like:
167
+
168
+ ```
169
+ Review PR #42
170
+ Please review pull request 123
171
+ Can you check PR number 15?
172
+ Review the changes in pull request #8
173
+ Check this PR for issues: #99
174
+ ```
175
+
176
+ ### Git Commands Executed by Skill
177
+
178
+ The skill executes these Git commands internally:
179
+
180
+ ```bash
181
+ # Fetch the PR branch
182
+ git fetch origin pull/[PR_NUMBER]/head:pr-[PR_NUMBER]
183
+
184
+ # Checkout the PR branch
185
+ git checkout pr-[PR_NUMBER]
186
+
187
+ # Get list of changed files compared to base branch
188
+ git diff ${BASE_BRANCH} --name-only
189
+
190
+ # Get detailed line-by-line differences with 3 lines of context
191
+ git diff ${BASE_BRANCH} --unified=3
192
+
193
+ # After review is complete, return to previous branch
194
+ git checkout -
195
+
196
+ # Optionally delete the PR branch to clean up local workspace
197
+ git branch -D pr-[PR_NUMBER]
198
+ ```
199
+
200
+ Where `${BASE_BRANCH}` is read from `project.config.json` (e.g., `main`).
201
+
202
+ **Note:** The `git checkout -` command returns you to the branch you were working on before the PR review started, ensuring your local workspace is restored to its original state.
203
+
204
+ ## 5. Confirmation Workflow
205
+
206
+ ### Interactive Mode (Default)
207
+
208
+ When `requireConfirmation: true`, the skill shows a summary before posting:
209
+
210
+ ```
211
+ 📊 PR #42 Review Summary
212
+
213
+ Found:
214
+ - 2 Critical Issues ❌
215
+ - 1 Warning ⚠️
216
+ - 0 Suggestions 💡
217
+
218
+ 📝 Full review saved to: review.json
219
+ 📋 Review Status: REQUEST_CHANGES
220
+ 🎯 Platform: GitHub | Files: 5 | Total Comments: 3
221
+
222
+ Do you want to post these 3 comments to GitHub? (yes/no)
223
+ ```
224
+
225
+ **User Options:**
226
+ - `yes` → Posts comments immediately
227
+ - `no` → Saves review.json, doesn't post (user can manually post later)
228
+
229
+ ### Notification-Only Mode Examples
230
+
231
+ When running in notification-only mode (no git token configured or `enableCommentPosting: false`):
232
+
233
+ **Example 1: Testing without posting to PR**
234
+ ```json
235
+ {
236
+ "platform": "github",
237
+ "enableCommentPosting": false,
238
+ "enableNotification": true
239
+ }
240
+ ```
241
+ Result: Review is generated, notification sent to Google Chat, but no comments posted to GitHub PR.
242
+
243
+ **Example 2: Environment without git access**
244
+ ```json
245
+ {
246
+ "platform": "github",
247
+ "enableCommentPosting": true, // Would post if token available
248
+ "enableNotification": true
249
+ }
250
+ ```
251
+ With no `GITHUB_TOKEN` set: Script skips comment posting automatically, sends notification only.
252
+
253
+ **Example 3: Dry run for testing**
254
+ ```bash
255
+ python post-review.py --dry-run
256
+ ```
257
+ Result: Shows transformed output for all platforms, doesn't post anything.
258
+
259
+ ## 6. Standard Review Output Format
260
+
261
+ The PR Review Skill generates a **standard JSON format** that is platform-agnostic. The unified dispatcher script then transforms this standard output to the platform-specific API format.
262
+
263
+ ### Standard Output Schema
264
+
265
+ ```json
266
+ {
267
+ "prNumber": 42,
268
+ "status": "REQUEST_CHANGES",
269
+ "summary": "Found 2 critical issues and 1 warning.",
270
+ "statistics": {
271
+ "filesReviewed": 5,
272
+ "totalComments": 3,
273
+ "criticalCount": 2,
274
+ "warningCount": 1,
275
+ "suggestionCount": 0
276
+ },
277
+ "comments": [
278
+ {
279
+ "path": "src/utils/api.ts",
280
+ "line": 15,
281
+ "category": "Security",
282
+ "severity": "critical",
283
+ "title": "Hardcoded API Key",
284
+ "body": "API keys should never be committed to the repository.",
285
+ "recommendation": "Use environment variables instead",
286
+ "codeSnippet": "const API_KEY = process.env.API_KEY;"
287
+ }
288
+ ],
289
+ "metadata": {
290
+ "reviewedAt": "2026-02-03T15:30:00Z",
291
+ "baseBranch": "main",
292
+ "sourceBranch": "feature/new-feature",
293
+ "commitSha": "abc123def456"
294
+ }
295
+ }
296
+ ```
297
+
298
+ ### Comment Categories & Severity
299
+
300
+ | Category | Severity | Description |
301
+ |----------|----------|-------------|
302
+ | `Security` | critical | Vulnerabilities, secrets, injection risks |
303
+ | `Bug` | critical | Runtime errors, crashes, logic flaws |
304
+ | `Pattern` | warning | Violations of project coding standards |
305
+ | `Type` | warning | Type safety issues |
306
+ | `Performance` | warning | Inefficient code patterns |
307
+ | `Readability` | suggestion | Code clarity improvements |
308
+ | `Naming` | suggestion | Naming convention violations |
309
+
310
+ ### Review Status Values
311
+
312
+ | Status | When to Use |
313
+ |--------|-------------|
314
+ | `APPROVE` | No issues found, code looks good |
315
+ | `REQUEST_CHANGES` | Critical issues or bugs found |
316
+ | `COMMENT` | Only minor suggestions or warnings |
317
+
318
+ ## 7. Platform Transformation
319
+
320
+ The unified dispatcher (`post-review.py`) contains embedded logic for all platforms, transforming the standard review output to each platform's specific API format.
321
+
322
+ ### Architecture
323
+
324
+ ```
325
+ ┌─────────────────────────────────────────────────────────────┐
326
+ │ Standard Review Output (JSON) │
327
+ │ - prNumber, status, summary, statistics, comments[] │
328
+ └─────────────────────────────────────────────────────────────┘
329
+
330
+
331
+ ┌─────────────────────────────────────────────────────────────┐
332
+ │ post-review.py (Unified Dispatcher) │
333
+ │ ┌───────────────────────────────────────────────────────┐ │
334
+ │ │ 1. Reads platform from project.config.json │ │
335
+ │ │ 2. Reads standard environment variables │ │
336
+ │ │ (GITHUB_TOKEN, GITLAB_TOKEN, etc.) │ │
337
+ │ │ 3. Transforms to platform-specific format │ │
338
+ │ │ 4. Posts to API using embedded platform logic │ │
339
+ │ │ 5. Sends Google Chat notification (if enabled) │ │
340
+ │ └───────────────────────────────────────────────────────┘ │
341
+ │ │
342
+ │ Embedded Platform Handlers: │
343
+ │ ┌──────────────┬──────────────┬──────────────┬──────────┐ │
344
+ │ │ GitHub │ Gitea │ GitLab │ Bitbucket│ │
345
+ │ ├──────────────┼──────────────┼──────────────┼──────────┤ │
346
+ │ │ line → line │ line → │ line → │ line → │ │
347
+ │ │ side: RIGHT │ new_position │ position. │ inline.to│ │
348
+ │ │ event: │ event: │ new_line │ content. │ │
349
+ │ │ APPROVE │ APPROVED │ + SHA values │ raw │ │
350
+ │ └──────────────┴──────────────┴──────────────┴──────────┘ │
351
+ └─────────────────────────────────────────────────────────────┘
352
+ ```
353
+
354
+ ### Platform API Differences
355
+
356
+ | Feature | GitHub | Gitea | GitLab | Bitbucket |
357
+ |---------|--------|-------|--------|-----------|
358
+ | **Approval event** | `APPROVE` | `APPROVED` | Separate `/approve` endpoint | Separate `/approve` endpoint |
359
+ | **Line field** | `line` | `new_position` | `position.new_line` | `inline.to` |
360
+ | **Single review** | ✅ Yes | ✅ Yes | ❌ No (separate discussions) | ❌ No (separate comments) |
361
+ | **Requires SHA** | ❌ No | ❌ No | ✅ Yes (base, head, start) | ❌ No |
362
+
363
+ ### Usage
364
+
365
+ ```bash
366
+ # Post review (reads review.json from project root, platform from config)
367
+ python {PR_REVIEW_SKILL_PATH}/scripts/post-review.py
368
+
369
+ # Dry run mode (transform only, do not post)
370
+ python {PR_REVIEW_SKILL_PATH}/scripts/post-review.py --dry-run
371
+ ```
372
+
373
+ Where `{PR_REVIEW_SKILL_PATH}` is the absolute path to the pr-review skill folder (e.g., `.cursor/skills/pr-review` or `.github/skills/pr-review`).
374
+
375
+ **Note:** The script automatically:
376
+ - Reads `review.json` from the project root
377
+ - Detects platform from `project.config.json` (searches `.github/` or `.cursor/`)
378
+ - Uses standard environment variable names (GITHUB_TOKEN, GITLAB_TOKEN, etc.)
379
+ - Posts comments if `enableCommentPosting` is `true` and platform token is available
380
+ - Sends notification if `enableNotification` is `true` in config
381
+ - Supports notification-only mode when no git token is configured
382
+ - Deletes `review.json` file after successful posting or notification (file cleanup)
383
+ - Outputs JSON to stdout, errors to stderr (optimized for AI usage)
384
+
385
+ **Git Cleanup:** After the review workflow completes, the skill automatically returns to your previous branch using `git checkout -`, restoring your workspace to its original state.
386
+
387
+ ## 8. Tech Stack Detection & Checklists
388
+
389
+ The PR review skill automatically detects the project type and applies the appropriate checklist (same as self-review):
390
+
391
+ ### Detection Logic
392
+
393
+ | Tech Stack | File Extensions | Checklist Applied |
394
+ |------------|----------------|-------------------|
395
+ | **Frontend** | `.tsx`, `.jsx`, `.vue`, `.css`, `package.json` | `references/frontend.md` (100+ checks) |
396
+ | **Backend** | `.java`, `.go`, `.py` (API), `.sql` | `references/backend.md` (70+ checks) |
397
+ | **Mobile** | `.swift`, `.kt`, `Podfile`, `AndroidManifest.xml` | `references/mobile.md` (110+ checks) |
398
+ | **Automation** | `.spec.ts`, `Selenium`, `Test.java` | `references/automation.md` (40+ checks) |
399
+
400
+ ### Checklist Highlights
401
+
402
+ **Frontend** - Performance, State Management, Accessibility, Security, SEO, Testing
403
+ **Backend** - API Design, Database, Security (OWASP), Performance, Observability, Testing
404
+ **Mobile** - Threading, Lifecycle, Memory, Security, Networking, Platform-Specific
405
+ **Automation** - Stability, Selectors, Isolation, Error Handling, CI Readiness
406
+
407
+ ### Severity Classification
408
+
409
+ | Severity | Review Status | Description |
410
+ |----------|---------------|-------------|
411
+ | **critical** | `REQUEST_CHANGES` | Bugs, security vulnerabilities, breaking changes |
412
+ | **warning** | `COMMENT` | Code quality, maintainability, performance issues |
413
+ | **suggestion** | `COMMENT` | Best practices, patterns, optimizations |
414
+
415
+ ## 9. Architecture Diagram
416
+
417
+ ```
418
+ ┌─────────────────────────────────────────────────────────────────────────┐
419
+ │ User Request │
420
+ │ "Review PR #42" │
421
+ └─────────────────────────────────────────────────────────────────────────┘
422
+
423
+
424
+ ┌─────────────────────────────────────────────────────────────────────────┐
425
+ │ AI Agent (Cursor/Copilot/Claude/etc) │
426
+ │ ┌───────────────────────────────────────────────────────────────────┐ │
427
+ │ │ 1. Parse user request to extract PR number │ │
428
+ │ │ 2. Recognize intent: PR review request │ │
429
+ │ │ 3. Invoke pr-review skill with PR number parameter │ │
430
+ │ └───────────────────────────────────────────────────────────────────┘ │
431
+ └─────────────────────────────────────────────────────────────────────────┘
432
+
433
+
434
+ ┌─────────────────────────────────────────────────────────────────────────┐
435
+ │ pr-review Skill │
436
+ │ ┌───────────────────────────────────────────────────────────────────┐ │
437
+ │ │ 1. Read configuration from project.config.json │ │
438
+ │ │ 2. Fetch PR code: git fetch origin pull/42/head:pr-42 │ │
439
+ │ │ 3. Checkout PR: git checkout pr-42 │ │
440
+ │ │ 4. Get diff: git diff main --unified=3 │ │
441
+ │ │ 5. Detect tech stack and load domain-specific checklist │ │
442
+ │ │ 6. Analyze code changes against checklist + project standards │ │
443
+ │ │ 7. Generate STANDARD review output JSON (save to review.json) │ │
444
+ │ │ 8. Show preview and ask for confirmation (if required) │ │
445
+ │ │ 9. Call: python post-review.py (if confirmed/auto) │ │
446
+ │ │ 10. Cleanup: git checkout - (return to previous branch) │ │
447
+ │ └───────────────────────────────────────────────────────────────────┘ │
448
+ └─────────────────────────────────────────────────────────────────────────┘
449
+
450
+
451
+ ┌─────────────────────────────────────────────────────────────────────────┐
452
+ │ post-review.py (Unified Dispatcher) │
453
+ │ ┌───────────────────────────────────────────────────────────────────┐ │
454
+ │ │ 1. Read project.config.json │ │
455
+ │ │ 2. Detect platform (github, gitea, gitlab, bitbucket) │ │
456
+ │ │ 3. Read standard env vars (GITHUB_TOKEN, GITLAB_TOKEN, etc.) │ │
457
+ │ │ 4. Transform using embedded platform logic → POST to API │ │
458
+ │ │ 5. Check enableNotification → Send Google Chat notification │ │
459
+ │ │ 6. Cleanup: Delete review.json file after successful posting │ │
460
+ │ └───────────────────────────────────────────────────────────────────┘ │
461
+ │ │
462
+ │ ┌───────────────────────────────────────────────────────────────────┐ │
463
+ │ │ Embedded Platform Handlers: │ │
464
+ │ │ - post_github_review() → GitHub Reviews API │ │
465
+ │ │ - post_gitea_review() → Gitea Reviews API │ │
466
+ │ │ - post_gitlab_review() → GitLab Discussions API │ │
467
+ │ │ - post_bitbucket_review() → Bitbucket Comments API │ │
468
+ │ └───────────────────────────────────────────────────────────────────┘ │
469
+ └─────────────────────────────────────────────────────────────────────────┘
470
+
471
+
472
+ ┌─────────────────────────────────────────────────────────────────────────┐
473
+ │ Return Results to AI Agent │
474
+ │ AI Agent communicates outcome to user │
475
+ └─────────────────────────────────────────────────────────────────────────┘
476
+ ```
477
+
478
+ ## 10. References
479
+
480
+ | Resource | Possible Locations |
481
+ |----------|-------------------|
482
+ | **Skill Definition** | `.cursor/skills/pr-review/SKILL.md` or `.github/skills/pr-review/SKILL.md` |
483
+ | **Configuration File** | `.cursor/project.config.json` or `.github/project.config.json` |
484
+ | **Unified Dispatcher** | `{SKILL_PATH}/scripts/post-review.py` |
485
+ | **Frontend Checklist** | `{SKILL_PATH}/references/frontend.md` |
486
+ | **Backend Checklist** | `{SKILL_PATH}/references/backend.md` |
487
+ | **Mobile Checklist** | `{SKILL_PATH}/references/mobile.md` |
488
+ | **Automation Checklist** | `{SKILL_PATH}/references/automation.md` |
489
+
490
+ > **Note:** `{SKILL_PATH}` refers to `.cursor/skills/pr-review/` or `.github/skills/pr-review/` depending on your project setup.
491
+
492
+ ## 11. Skill Invocation
493
+
494
+ The AI agent automatically invokes this skill when it detects PR review requests in the user's prompt. The skill is registered in the agent's skill registry and can be triggered by patterns like:
495
+
496
+ - "Review PR #[number]"
497
+ - "Check pull request [number]"
498
+ - "Analyze PR [number]"
499
+ - "Review pull request #[number]"
500
+
501
+ No manual skill invocation is required - the AI agent handles skill selection based on user intent.