ワンクリックで
ldl-code-check
// Review code changes in current branch for adherence to team guidelines and conventions
// Review code changes in current branch for adherence to team guidelines and conventions
Commit changes and create a draft pull request. Trigger on "create a pull request", "create a PR", "open a PR", "make a PR".
Run pre-commit checks, commit changes, and push to remote branch
| name | ldl:code-check |
| description | Review code changes in current branch for adherence to team guidelines and conventions |
| disable-model-invocation | false |
| allowed-tools | Bash(git:*), Read, Grep, Glob |
| argument-hint | [base-branch] |
Review all code changes in the current branch to ensure they follow the team's coding standards, conventions, and organizational guidelines.
Scope: This skill focuses on architectural patterns, code organization, and conventions that require human judgment. Basic formatting (quotes, indentation, line length, trailing commas) should be checked with yarn lint and yarn prettier:write.
When this skill is invoked:
yarn lint to catch formatting and linting issuesmain)/code-check develop), use that branch as the basegit diff --name-only <base-branch>...HEAD to get list of changed filesgit diff <base-branch>...HEAD to see the actual changesnode_modules/, dist/, and other non-source directoriesCheck each modified file for compliance with these guidelines:
Note: This skill focuses on architectural patterns and conventions that require human judgment. Run yarn lint and yarn prettier:write for automated style checks (quotes, indentation, line length, etc.).
any type (should be rare and well-justified)process.exit() calls (consumers handle exit, not this library)/types directory@ts-ignore (use proper types or @ts-expect-error with explanation)package.json exports fieldapi/ returning HubSpotPromise<T>config/lib/utils/ (not exported)errors/ using HubSpotHttpError, HubSpotConfigError, or FileSystemErrorlang/en.json using i18n() with {{ variable }} interpolationtypes/ directory__tests__/ directories<source-file>.test.tserrors/, never returns error objectsHubSpotHttpError for API failuresHubSpotConfigError for config issuesFileSystemError for FS operations__tests__/ directoriesexpect().toThrow())afterEach() using vi.restoreAllMocks()vi.mock() at module level for dependency mockingpackage.json exports fieldmain branchProvide a structured report with these sections:
# Code Style Review for Branch: <branch-name>
**Base:** <base-branch>
**Files Changed:** <count>
## Summary
_Brief overview of changes and overall code quality assessment (2-3 sentences)_
## Linter Results
**Status:** Pass / Fail
_If failed, include the relevant linter errors in the Critical Issues section below_
## Issues Found
### Critical Issues
_Issues that MUST be fixed before merging:_
- Linter/build failures
- Using `process.exit()`
- Using `any` without justification
- No default exports
- Missing exports in `package.json`
- Test file that doesn't build
- [ ] **<file-path>:<line>** - <description>
### Pattern Violations
_Issues that violate codebase conventions and should be fixed before merging:_
- Type definitions in wrong place (not in `/types`)
- Internal utils exported (should stay in `utils/`)
- Strings not in `lang/en.json`
- Wrong error class used
- Missing tests for new functionality
- Try/catch in tests
- [ ] **<file-path>:<line>** - <description>
### Suggestions
_Optional improvements that would enhance code quality:_
- Variable naming could be more descriptive
- Early return opportunities
- Refactoring for readability
- **<file-path>:<line>** - <description>
## Guideline Adherence
- [x] Custom errors from `errors/`
- [x] Types in `/types`
- [x] Exports in `package.json`
- [x] No `process.exit()`
- [x] Tests use Vitest
- ...
## Files Reviewed
- `<file-path>` - <brief assessment>
## Next Steps
**Before merging:**
1. Fix all Critical Issues (blocking)
2. Fix all Pattern Violations (maintain codebase standards)
3. Consider addressing Suggestions for code quality
_Additional specific recommendations based on the issues found_
yarn lint runs first, include those results to avoid duplicate concernsCRITICAL: You MUST end your response with one of these exact status lines:
STATUS: PASSED - No issues found
or
STATUS: FAILED - [brief summary of critical issues]
This status line is used by automated workflows. Do not modify this format.
Determining Status:
After presenting the review report and status line, if any issues were found, ask the user:
"Would you like me to fix any of these issues? If so, please tell me which specific items you'd like me to address."
Wait for the user to specify which issues to fix before making any changes.