# Lint

> Lint is an Agent Skill for testing & quality published in the tw93/MiaoYan repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Run SwiftLint and swift-format checks on MiaoYan. There is no auto-fix hook; run `swiftlint --fix` or `swift-format format --in-place` manually when fixes are needed.

- Skill name: `lint`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/tw93/MiaoYan/blob/HEAD/.agents/skills/lint/SKILL.md
- Repository: tw93/MiaoYan (8,434 GitHub stars when collected)

## SKILL.md

# Lint Skill

Use this skill to check or fix code style in MiaoYan.

## SwiftLint

```bash
# Check (report only)
swiftlint lint

# Strict mode (treat warnings as errors)
swiftlint lint --strict

# Auto-fix safe violations
swiftlint --fix

# Check specific file
swiftlint lint --path Controllers/ViewController.swift
```

Config: `.swiftlint.yml` at project root.

## swift-format

```bash
# Check formatting (no changes)
swift-format lint --recursive .

# Apply formatting
swift-format format --recursive --in-place .
```

Config: `.swift-format` at project root (line length: 240).

## Run Both

```bash
swiftlint lint --strict && swift-format lint --recursive .
```

## Safety Rules

1. **ALWAYS** run lint check before proposing a commit
2. **NEVER** auto-apply `--fix` or `--in-place` without user confirmation

---

Source: https://www.openparable.com/skill/testing-quality/lint (OpenParable). Cite the canonical URL above.
