with one click
code-review
// Use this skill when the user asks for a code review. It automates checks and analysis.
// Use this skill when the user asks for a code review. It automates checks and analysis.
| name | code-review |
| description | Use this skill when the user asks for a code review. It automates checks and analysis. |
This skill provides a comprehensive code review process for the current branch. It verifies the code builds and passes tests across platforms, checks for performance regressions, and reviews the diff for bugs, improvements, and adherence to project standards.
git branch --show-current. If the output is main,
inform the user that the current branch is main and reviews on main are
not supported yet.git fetch origin main. This ensures origin/main is
up-to-date for accurate comparison.git merge-base origin/main HEAD. Store this for later use.make build-all (covers Linux, Darwin, and Windows cross-compile,
regardless of host OS).make clean.make fmt. If any files are modified, stop and report the error.make vet. If any issues are found, stop and report the error.make test to execute Go tests (unit + spec).make test-wasi to verify the WASI Preview 1 implementation.make bench-compare TARGET=. to compare
performance against the main branch (the default base). NOTE: This
can take several minutes as it runs the benchmark suite twice.git diff origin/main..HEAD -- go.mod go.sum.go mod tidy.git diff --name-only go.mod go.sum.go mod tidy needs to be
run.go.mod or go.sum:
Find New Files: Run
git diff --name-status origin/main..HEAD | grep '^A' to list all newly
added files.
Check Headers: For each new source file (.go, .py, .yml, etc.),
verify it contains the proper license header:
// Copyright [Year] Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Use the appropriate comment syntax for the file type (e.g., # for Python
and YAML).
Report Missing Headers: List any files missing the license header.
Get the Diff: Run git diff origin/main..HEAD to see all changes.
Review for Issues: Analyze the diff and check for:
Bugs & Correctness:
Security & Sandboxing: Treat untrusted Wasm and host inputs as hostile. The bullets below are a floor, not a ceiling — hunt for classes of flaw they don't name.
Performance (especially in hot paths like the VM loop):
Simplicity & Readability:
Documentation:
README.md and other documentation is updated if new features,
flags, or configuration options were added.Modern Go Features:
Project Standards:
.rules.Compile Findings: Create a structured report with:
Present a summary to the user containing: