一键导入
lint-and-validate
Linting and validation principles for code quality enforcement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Linting and validation principles for code quality enforcement.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.
Auto-evolved skill containing project-specific architectural idioms extracted from the developer's own code decisions. Generated by skill_evolution.js. Commit this file to share your Engineering Culture across the team. Every agent MUST respect these idioms above generic defaults.
Ingests test logs and identifies root causes across multiple failing test files. Provides actionable fix recommendations.
Distilled Fabel-5 cognitive intelligence protocol. Injects epistemic reasoning, coding discipline, design evaluation cascades, and orchestration patterns into any AI model. Load this skill to make any model think, reason, code, and design like Fabel-5. Activates for complex builds, code generation, design tasks, and multi-agent orchestration.
Tribunal Agent Kit thinking and cognitive reasoning rules. Helps agents structure their thoughts and follow protocols.
Encodes Emil Kowalski's philosophy on UI polish, component design, animation decisions, and the invisible details that make software feel great. Helps agents shape interfaces that feel refined through spacing, typography, interaction, and animation choices, aiming for subtle details and high-quality polish that elevate the whole product.
| name | lint-and-validate |
| description | Linting and validation principles for code quality enforcement. |
| allowed-tools | Read, Write, Edit, Glob, Grep |
| version | 1.0.0 |
| last-updated | "2026-03-12T00:00:00.000Z" |
| applies-to-model | gemini-2.5-pro, claude-3-7-sonnet |
| routing | {"domain":"general","tier":"basic"} |
Linting catches problems that code review misses:
await on async functions (silently returns a Promise instead of the value)== instead of === in JS)Run linting in CI. Every PR that merges should pass lint. A lint check that doesn't block the build is decoration.
# Install
npm install -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser prettier
# Run
npx eslint . --ext .ts,.tsx
npx prettier --check .
# Fix auto-fixable issues
npx eslint . --ext .ts,.tsx --fix
npx prettier --write .
Recommended rules to enforce:
// .eslintrc.json
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking"],
"rules": {
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"eqeqeq": ["error", "always"]
}
}
Key rules explained:
| Rule | Why It Matters |
|---|---|
no-floating-promises | Missing await on async call = silent bug |
no-explicit-any | any disables TypeScript's only protection |
eqeqeq | == has coercion surprises; === is always explicit |
await-thenable | Prevents await-ing non-async functions (always a mistake) |
Ruff replaces flake8, black, isort, and pyupgrade in one fast tool:
# Install
pip install ruff
# Check
ruff check .
# Fix auto-fixable
ruff check . --fix
# Format (replaces black)
ruff format .
# Pre-commit config
# .pre-commit-config.yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# pyproject.toml
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "SIM", "ANN"]
# E: pycodestyle, F: pyflakes, I: isort, N: naming, UP: pyupgrade
# B: bugbear (common bugs), SIM: simplify, ANN: annotations
Linting and type checking catch different things. Run both.
TypeScript:
npx tsc --noEmit # type check without emitting files
Python:
mypy src/ --ignore-missing-imports
# or
pyright src/
Required compiler options (TypeScript):
{
"compilerOptions": {
"strict": true, // enables all strict checks
"noImplicitAny": true,
"noUncheckedIndexedAccess": true, // index access can be undefined
"exactOptionalPropertyTypes": true
}
}
Run linting automatically before every commit:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: eslint
name: ESLint
language: node
entry: npx eslint --ext .ts,.tsx
types: [javascript, ts]
- id: tsc
name: TypeScript
language: node
entry: npx tsc --noEmit
pass_filenames: false
| Script | Purpose | Run With |
|---|---|---|
.agent/scripts/lint_runner.js | Runs project linting and reports findings | node .agent/scripts/lint_runner.js <project_path> |
scripts/type_coverage.py | Measures TypeScript type coverage | python scripts/type_coverage.py <project_path> |
When this skill produces or reviews code, structure your output as follows:
━━━ Lint And Validate Report ━━━━━━━━━━━━━━━━━━━━━━━━
Skill: Lint And Validate
Language: [detected language / framework]
Scope: [N files · N functions]
─────────────────────────────────────────────────
✅ Passed: [checks that passed, or "All clean"]
⚠️ Warnings: [non-blocking issues, or "None"]
❌ Blocked: [blocking issues requiring fix, or "None"]
─────────────────────────────────────────────────
VBC status: PENDING → VERIFIED
Evidence: [test output / lint pass / compile success]
VBC (Verification-Before-Completion) is mandatory. Do not mark status as VERIFIED until concrete terminal evidence is provided.
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
// VERIFY or check package.json / requirements.txt.Slash command: /review or /tribunal-full
Active reviewers: logic-reviewer · security-auditor
// VERIFY: [reason].Review these questions before confirming output:
✅ Did I rely ONLY on real, verified tools and methods?
✅ Is this solution appropriately scoped to the user's constraints?
✅ Did I handle potential failure modes and edge cases?
✅ Have I avoided generic boilerplate that doesn't add value?
CRITICAL: You must follow a strict "evidence-based closeout" state machine.
You MUST verify existing code signatures and variables before attempting to modify or call them. No hallucination is permitted.
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
// VERIFY or check package.json / requirements.txt.Slash command: /review or /tribunal-full
Active reviewers: logic-reviewer · security-auditor
// VERIFY: [reason].Review these questions before confirming output:
✅ Did I rely ONLY on real, verified tools and methods?
✅ Is this solution appropriately scoped to the user's constraints?
✅ Did I handle potential failure modes and edge cases?
✅ Have I avoided generic boilerplate that doesn't add value?
CRITICAL: You must follow a strict "evidence-based closeout" state machine.