360 Secure SkillHub
360 安全技能中心

Code Check

该 Skill 用于运行代码质量与安全检查并按优先级修复问题:先执行项目检查命令,分析输出,依次修复构建错误、测试失败、Lint 错误和警告,每次修复后重跑检查直到通过。覆盖 Lint、类型检查、测试、安全、格式化和构建,支持 JS/TS、Python、Rust、Go、Swift,并约定不提交代码、不修改版本号。

openlark
openlark
热度 16.02
最近更新 2026-06-07 06:57:07
分类:开发依赖:代码执行 / 读写文件应用场景:代码审查 / 调试排错 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add code-check
Metadata
name
code-check
description
Run project quality checks and security reviews, fixing all errors by priority until all pass.

Code Quality & Security Checks

Run comprehensive project checks and fix all issues by priority.

Use Cases

Use when users need "check code", "run check", "fix lint errors", or "code quality check".

Core Task

Run the project check command and resolve all errors. Loop: check → fix → re-check until all pass.

Important Rules

  • Do not commit any code
  • Do not change version numbers
  • Only fix issues identified by checks

Check Types

Type Description JS/TS Python Rust Go
Lint Code style & syntax ESLint flake8 clippy golint
Type Check Type errors tsc mypy cargo check go vet
Tests Failing cases jest/vitest pytest cargo test go test
Security Vulnerability detection npm audit bandit cargo audit govulncheck
Formatting Style consistency prettier black rustfmt gofmt
Build Compilation errors tsc --noEmit — cargo check go build

Workflow

  1. Run the check command
  2. Analyze output for errors and warnings
  3. Fix by priority:
    • 🔴 Build-breaking errors (highest priority)
    • 🔴 Test failures
    • 🟡 Linting errors
    • 🟢 Warnings
  4. Re-run checks after each fix
  5. Continue until all checks pass

Multi-Project Types

  • JavaScript/TypeScript: npm run check or yarn check
  • Python: black → isort → flake8 → mypy
  • Rust: cargo check → cargo clippy
  • Go: go vet → golint
  • Swift: swift-format → swiftlint

If the project has no check script, execute the above commands individually.