project-checker
v1.0.0localskills install PXYOUoTX5M0 installs
Created Mar 26, 2026
Thanh Danh
@danhthanh418
Skill Content
# Project Checker
Automatically build, test, and review any project. Auto-detects project type and runs appropriate checks.
## Configuration
### Auto-Detection
The skill automatically detects:
- **Package Manager**: npm, yarn, pnpm (from lock files)
- **Test Framework**: vitest, jest, mocha, playwright (from package.json)
- **Linter**: eslint, prettier, tslint (from config files)
- **Build Tool**: next, vite, webpack, turbo (from package.json scripts)
- **TypeScript**: presence of tsconfig.json
### Manual Override
```bash
--test-framework vitest
--package-manager npm
--skip-lint
--skip-tests
```
## Workflow
### 1. Detect Project Type
```bash
# Detect package manager
[ -f pnpm-lock.yaml ] && echo "pnpm"
[ -f yarn.lock ] && echo "yarn"
[ -f package-lock.json ] && echo "npm"
# Detect test framework
[ -f vitest.config.ts ] && echo "vitest"
[ -f jest.config.js ] && echo "jest"
[ -f playwright.config.ts ] && echo "playwright"
# Detect build tool
grep -q '"build":' package.json && grep -q '"dev":' package.json && echo "next"
[ -f vite.config.ts ] && echo "vite"
[ -f turbo.json ] && echo "turborepo"
```
### 2. Run Build
```bash
# Based on detected package manager
npm run build
# or
pnpm build
# or
yarn build
```
Check for any build errors. Report success or failure immediately.
### 3. Run Lint (if not skipped)
```bash
# Based on detected linter
npx eslint . 2>&1 | head -50
# or
npx tslint .
# or
npm run lint
```
Report lint errors if any.
### 4. Run Tests (if not skipped)
```bash
# Based on detected test framework
npx vitest run
# or
npx jest
# or
npx playwright test
# or
npm test
```
Report test results - passed/failed counts.
### 5. Review Changes (if git changes exist)
Check for uncommitted or unpushed changes:
```bash
git status --short
git diff --cached
git diff
```
Review the changes following these guidelines:
- **Bugs**: Logic errors, off-by-one, incorrect conditionals, null/empty/undefined handling
- **Security**: Injection, auth bypass, data exposure
- **Structure**: Does code follow existing patterns? Are there established abstractions?
- **Performance**: Flag if obviously problematic (O(n²), N+1 queries)
- **Behavior Changes**: Note if changes alter existing behavior
### 6. Provide Report
Format the report as:
```
## Project Check Results
### Build: ✅ PASS / ❌ FAIL
[summary]
### Lint: ✅ PASS / ⚠️ WARNINGS / ❌ ERRORS
[count and key issues if any]
### Tests: ✅ PASS (X/Y) / ❌ FAIL (X/Y)
[failed tests if any]
### Code Review:
[for each file changed]
- **File**: filename
- **Issues**: [list issues found with severity: HIGH/MEDIUM/LOW]
- **Notes**: [behavioral changes, if any]
## Summary
[overall assessment]
```
## Severity Guidelines
- **HIGH**: Security vulnerability, data loss, complete breakage
- **MEDIUM**: Feature broken, partial failure
- **LOW**: Code style, minor improvement, silent error swallowing
## Error Handling
If any step fails:
1. Report the failure immediately with error message
2. Do NOT continue to next steps
3. Ask user if they want to fix before continuing
## Common Issues
### Missing Dependencies
```bash
# Reinstall dependencies
npm install
```
### Type Errors
Check tsconfig.json and fix type mismatches.
### Test Failures
Run tests with verbose output to see detailed errors:
```bash
npx vitest run --reporter=verbose
```
## Integration
### GitHub Actions
```yaml
name: Project Check
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- name: Run Project Check
run: |
npm run build
npx eslint .
npx vitest run
```
### Lefthook
```yaml
pre-commit:
commands:
project-check:
run: |
npm run build
npx eslint .
npx vitest run
```