automated-review-setup
Skill4 starsChanged 9 months agoMITView on GitHub
Set up automated code quality tools: ESLint, Prettier, pre-commit hooks, and CI linting. Activate whenever the user sets up a new project, asks about code formatting, configures linters, sets up Git hooks, or mentions Husky, lint-staged, CODEOWNERS, or pre-commit hooks. Also activate when discussing consistent code style enforcement.
- Installs packages
In this repository78 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/claude-initial-setup.mdcCursor rule
- parallel-task-executionSkill
- subagent-patternsSkill
- task-coordinationSkill
- agent-communicationSkill
- context-managementSkill
- multi-agent-orchestrationSkill
- deploy-strategiesSkill
- github-actions-guideSkill
- pipeline-patternsSkill
- anthropic-sdk-guideSkill
- prompt-engineeringSkill
- tool-use-patternsSkill
- pr-standardsSkill
- review-checklistSkill
- file-organizationSkill
- immutability-patternsSkill
- naming-conventionsSkill
- branching-strategySkill
- commit-conventionsSkill
- pr-workflowSkill
- migration-patternsSkill
- query-optimizationSkill
- schema-design-guideSkill
- error-tracingSkill
- log-analysisSkill
- systematic-debuggingSkill
- django-admin-customizationSkill
- django-orm-masterySkill
- drf-api-patternsSkill
- docker-compose-guideSkill
- dockerfile-best-practicesSkill
- multi-stage-buildsSkill
- express-error-handlingSkill
- middleware-patternsSkill
- rest-api-nodeSkill
- async-fastapiSkill
- dependency-injection-fastapiSkill
- pydantic-validationSkill
- concurrency-patterns-goSkill
- error-handling-goSkill
- idiomatic-goSkill
- automation-triggersSkill
- hook-recipesSkill
- pre-post-hooksSkill
- junit-testingSkill
- maven-gradle-guideSkill
- spring-boot-patternsSkill
- mcp-resource-patternsSkill
- mcp-server-creationSkill
- mcp-tool-designSkill
- context-optimizationSkill
- knowledge-persistenceSkill
- memory-patternsSkill
- caching-strategiesSkill
- lazy-loading-patternsSkill
- profiling-guideSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 107
Run linters only on staged files for fast feedback.
- Distinctive: line 145
Use the pre-commit framework with Ruff for Python projects.
- Distinctive: line 196
Run quality checks in CI to block merging of non-conforming code.
- Very specific: line 227
Not including a .prettierrc causing inconsistent formatting across editors
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Automated Code Review Setup
Automate code quality enforcement with linters, formatters, pre-commit hooks, and CI checks. Catch issues before human review so reviewers can focus on logic and design.
When to Use
- Setting up a new JavaScript/TypeScript project
- Adding linting or formatting to an existing project
- Configuring Git pre-commit hooks
- Setting up CI/CD quality gates
- Establishing CODEOWNERS for automatic reviewer assignment
Core Patterns
ESLint Configuration
Modern flat config for TypeScript projects.
// eslint.config.js
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintPluginImport from 'eslint-plugin-import';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
// Prevent common bugs
'no-console': 'warn',
'no-debugger': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
}],
// Enforce code quality
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
// Import organization
'import/order': ['error', {
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'],
'newlines-between': 'always',
alphabetize: { order: 'asc' },
}],
},
},
{
ignores: ['dist/', 'node_modules/', 'coverage/'],
}
);Prettier Configuration
Set up Prettier for consistent formatting.
// .prettierrc
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"arrowParens": "avoid",
"endOfLine": "lf"
}// .prettierignore
dist
node_modules
coverage
pnpm-lock.yaml
package-lock.json// package.json scripts
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."
}
}Pre-Commit Hooks with Husky and lint-staged
Run linters only on staged files for fast feedback.
# Install
npm install -D husky lint-staged
npx husky init// package.json
{
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md,yml,yaml}": [
"prettier --write"
],
"*.{css,scss}": [
"prettier --write"
]
}
}# .husky/pre-commit
npx lint-staged# .husky/commit-msg (optional: enforce conventional commits)
npx --no -- commitlint --edit "$1"Python Pre-Commit Hooks
Use the pre-commit framework with Ruff for Python projects.
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=500']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-formatpip install pre-commit && pre-commit installCODEOWNERS
Automatically assign reviewers based on file ownership.
# .github/CODEOWNERS
# Default owners for everything
* @team-lead
# Frontend team owns UI code
/src/components/ @frontend-team
/src/hooks/ @frontend-team
/src/styles/ @frontend-team
# Backend team owns API and database
/src/api/ @backend-team
/src/db/ @backend-team
/src/middleware/ @backend-team
# Security-sensitive files require security review
/src/auth/ @security-team @backend-teamCI Linting Pipeline
Run quality checks in CI to block merging of non-conforming code.
# .github/workflows/quality.yml
name: Code Quality
on:
pull_request:
branches: [main, develop]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npx tsc --noEmit
Anti-Patterns
- Configuring rules as errors during initial adoption (use warnings first, tighten later)
- Running linters on the entire codebase in pre-commit hooks instead of only staged files
- Having linter and formatter conflict (ESLint style rules vs Prettier)
- Skipping hooks with
--no-verifyas a habit instead of fixing the issue - Over-configuring ESLint with hundreds of rules instead of extending a standard config
- Not including a
.prettierrccausing inconsistent formatting across editors - Setting up CODEOWNERS without matching your team structure
Quick Reference
| Tool | Purpose | Config File |
| ESLint | Catch bugs and enforce patterns | eslint.config.js |
| Prettier | Consistent formatting | .prettierrc |
| Husky | Git hook management | .husky/ |
| lint-staged | Run tools on staged files only | package.json or .lintstagedrc |
| commitlint | Enforce commit message format | commitlint.config.js |
| CODEOWNERS | Auto-assign reviewers | .github/CODEOWNERS |
| Ruff | Python linting + formatting | pyproject.toml |
| pre-commit | Python/polyglot hook framework | .pre-commit-config.yaml |
| Setup Order |
| 1. Prettier (formatting baseline) |
| 2. ESLint (bug catching, disable style rules handled by Prettier) |
| 3. Husky + lint-staged (pre-commit enforcement) |
| 4. CI pipeline (final gate) |
| 5. CODEOWNERS (reviewer assignment) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

