lint-and-validate
Skill này làm gì
Công cụ này kiểm tra xem code của bạn có được viết gọn gàng và đúng đắn, theo các quy tắc của dự án hay không. Nó giúp tìm lỗi trước khi chúng gây ra vấn đề.
Khi nào nên dùng
- ✓Khi bạn vừa thay đổi code xong.
- ✓Khi bạn chuẩn bị hoàn thành tác vụ hoặc giao việc.
- ✓Khi dự án có quy tắc về định dạng và kiểm tra kiểu dữ liệu.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/lint-and-validate/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra xem code Python của tôi có gọn gàng và không có lỗi kiểu dữ liệu không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ chạy các lệnh riêng của dự án để kiểm tra chất lượng code và tính đúng đắn của kiểu dữ liệu. Nó báo cáo kiểm tra nào đã đạt, kiểm tra nào thất bại và kiểm tra nào không thể chạy.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Lint and Validate
When to Use
Use after behavior or configuration changes when a repository has relevant lint or type checks. Read the repository's instructions and package scripts first. Run focused checks during development and the required checks before completion.
Procedure
- Identify the changed languages, configured commands, and installed tools. Inspect package scripts before executing them: a script named
lintcan modify files or run arbitrary project code. - Run the project's read-only lint/type-check commands. For Node projects, prefer declared scripts such as
npm run lintandnpm run typecheck. Do not usenpxto silently fetch an absent checker. - For Python, use configured, already installed tools such as
ruff check .ormypy .. Do not assume everypyproject.tomlconfigures both. Never add--fixwithout inspecting the proposed changes and the task's authorization. - Fix relevant failures without deleting user work, weakening rules, or raising timeouts just to pass. If a required tool is unavailable, report the exact check that did not run.
- Report commands, exit results, scope and remaining limitations. Passing lint does not prove the absence of runtime or security defects.
Example
After correcting a TypeScript behavior, inspect package.json, run the configured focused regression test, then npm run lint and npm run typecheck if those scripts exist. If TypeScript is declared but not installed, report the missing local checker; do not substitute a downloaded package or call the result a pass.
Bundled helpers
python scripts/lint_runner.py /absolute/project: runs a conservative set of candidate checks. Node fallback checkers must exist in localnode_modules/.bin; Python candidates must be installed. Inspect the project scripts first. A missing command or failing check exits 1; no configured checks or invalid project metadata exits 2. Exit 0 means the invoked checks passed, not that every needed check was discovered. Python detection is heuristic and may suggest unconfigured Ruff/MyPy commands.python scripts/type_coverage.py /absolute/project: read-only annotation inventory, despite its retained compatibility filename. Samples at most 30 files per language, skips links and build/dependency directories, and bounds file reads. Python uses AST nodes to avoid double-counting functions. TypeScript reports lexical: anyoccurrences, including possible comments and strings. No quality percentage or pass/fail threshold is inferred. Exit 2 means no applicable files; parse/read errors exit 1.
Limitations
The runner executes trusted project commands, which may mutate files or access the network. It does not install dependencies, detect every monorepo configuration, or replace the project's CI contract. The inventory is a bounded source sample, not semantic type coverage; inferred types, generics, decorator behavior and correctness require the actual type checker. Do not label unrun checks as successful.
Câu hỏi thường gặp
'Lint' và 'kiểm tra kiểu' là gì?
Đây là các kiểm tra tự động giúp tìm lỗi chính tả, lỗi định dạng và sự không nhất quán trong code, làm code dễ đọc và dễ bảo trì hơn.
Công cụ có tự sửa lỗi không?
Không, công cụ chỉ xác định lỗi. Bạn sẽ cần tự sửa sau khi xem các gợi ý.
Nếu một kiểm tra không chạy được thì nghĩa là gì?
Nghĩa là công cụ không thể thực hiện kiểm tra cụ thể đó, có thể vì công cụ cần thiết chưa được cài đặt hoặc chưa được cấu hình đúng cho dự án.
Chi tiết
Mô tả gốc của tác giả
Run configured lint and type checks, distinguish failures from checks that did not run, and report concrete validation results.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5068
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.