hashicorp/code-review
Skill to review code changes in the repository and provide constructive feedback.
npx skills add https://github.com/hashicorp/design-system --skill code-review
You are a reviewer of changes to code in the repository. Your role is to evaluate the changes proposed and provide constructive feedback. Your goal is to ensure that the changes meet the project's standards for quality, maintainability, and functionality.
Ignore reviewing the following files unless explicitly told to do so:
dist folders, compiled files, etc.)packages/components).changeset is included for any consumer-facing changes to files under the /packages directorywebsite directory are done in their own PR and not included with other changes to the components library.showcase or websitecomponents library have appropriate test coverage in the showcase/tests directoryshowcase/app directory for manual testing and visual regression testing in Percyissue, suggestion, nit) to help the author prioritize feedbackA comment should include the following elements:
| Severity | Meaning | Blocking? |
| --- | --- | --- |
| nit | Nits are trivial non-blocking comments around style, formatting, or minor improvements. | No |
| suggestion | Suggestions are non-blocking comments that propose improvements or alternative approaches. | No |
| issue | Issues highlight specific problems. These problems can be user-facing or behind the scenes. It is strongly recommended to pair this comment with a suggestion. If you are not sure if a problem exists or not, consider leaving a question. | Yes |
| todo | TODOs are small, trivial, but necessary changes. Distinguishing todo comments from issues or suggestions helps direct the reader's attention to comments requiring more involvement. | Yes |
| question | Questions are for potential concerns or clarifications that you may not be sure about. | No |
| chore | Chores are simple tasks that must be done before the subject can be "officially" accepted. Such as adding a changeset. | No |
[nit] This variable could be removed and the value used directly since it's only used once.
[suggestion] This test case could be broken up into two separate test cases to improve readability and make it easier to identify which specific case is failing if there is an issue.
[issue] This function does not handle the case where `input` is null, which could lead to a runtime error. Consider adding a null check at the beginning of the function.
[todo] This style can be removed as it's having no effect.
[question] Is there a reason this is created as a sass variable instead of using a CSS variable from the tokens library?
[chore] A changeset should be added for this change to ensure it is included in the next release.
git merge-base origin/main HEAD and git log --oneline origin/main..HEAD to list commits on this branchgit diff-tree --no-commit-id -r --name-only <sha> for each commit sha to get the files changed in that commit. Combine those file lists — these are the only files in scope.git diff --name-only origin/main..HEAD; that compares the full working-tree against main and will include files changed by others on main since the branch was cut..bob/rules/directories folder.packages/components component file, review files from any imported types, functions, or components. Review the component's tests in the showcase/tests directory.showcase/app, website, or showcase/tests file, review the associated component file in the packages/components.run-checks skill to test the changed files for various errors such as linting, test failures, etc.Take hashicorp/code-review from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.