# Lint And Validate

> 自动质量控制、Lint 与静态分析流程。每次代码修改后使用，确保语法正确与项目规范一致。触发关键词：lint、format、check、validate、types、static analysis。

- **Type:** Skill
- **Install:** `agentstack add skill-misonl-ling-lint-and-validate`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MisonL](https://agentstack.voostack.com/s/misonl)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MisonL](https://github.com/MisonL)
- **Source:** https://github.com/MisonL/Ling/tree/main/.agents/skills/lint-and-validate
- **Website:** https://www.npmjs.com/package/@mison/ling

## Install

```sh
agentstack add skill-misonl-ling-lint-and-validate
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 代码检查与校验技能

> **强制要求：** 每次代码变更后必须运行相应校验工具。在代码无错误前，不得将任务视为完成。

### 按技术栈执行流程

#### Node.js / TypeScript
1. **Lint/Fix：** `npm run lint` 或 `npx eslint "path" --fix`
2. **Types：** `npx tsc --noEmit`
3. **Security：** `npm audit --audit-level=high`

#### Python
1. **Linter（Ruff）：** `ruff check "path" --fix`（快速且现代）
2. **Security（Bandit）：** `bandit -r "path" -ll`
3. **Types（MyPy）：** `mypy "path"`

## 质量闭环
1. **编写/修改代码**
2. **执行审计：** `npm run lint && npx tsc --noEmit`
3. **分析报告：** 检查 “FINAL AUDIT REPORT” 段落。
4. **修复并重复：** “FINAL AUDIT” 失败时禁止提交代码。

## 错误处理
- 若 `lint` 失败：立即修复风格或语法问题。
- 若 `tsc` 失败：先修复类型不匹配，再继续流程。
- 若未配置工具：检查项目根目录中是否有 `.eslintrc`、`tsconfig.json`、`pyproject.toml`，并建议补齐配置。

---
**严格规则：** 未通过上述检查的代码，不得提交，也不得标记为“完成”。

---

## 脚本

| 脚本 | 用途 | 执行命令 |
| --- | --- | --- |
| `scripts/lint_runner.py` | 统一 lint 检查 | `python scripts/lint_runner.py ` |
| `scripts/type_coverage.py` | 类型覆盖率分析 | `python scripts/type_coverage.py ` |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MisonL](https://github.com/MisonL)
- **Source:** [MisonL/Ling](https://github.com/MisonL/Ling)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/@mison/ling

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-misonl-ling-lint-and-validate
- Seller: https://agentstack.voostack.com/s/misonl
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
