Skip to content

Commit 8f00b01

Browse files
committed
feat: add skill for running repository linters with Black, flake8, mypy, and pyright
1 parent 61df658 commit 8f00b01

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: "run-linters"
3+
title: "Run repository linters"
4+
description: "Run the canonical set of linters used by maintainers: Black, flake8, mypy, and pyright."
5+
author: "CERTCC / Vultron"
6+
tags:
7+
- linting
8+
- ci
9+
- dev-workflow
10+
shell: "zsh"
11+
commands:
12+
- "uv run black vultron/ test/ && uv run flake8 --exit-zero vultron/ test/ && uv run mypy && uv run pyright"
13+
inputs:
14+
- name: repo_root
15+
description: "Repository root where the command will be executed"
16+
default: "."
17+
outputs:
18+
- name: lint_summary
19+
description: "Exit status and summary output from the linters"
20+
---
21+
22+
# Skill: Run repository linters
23+
24+
## Purpose
25+
26+
Run the project's canonical linters in a single, discoverable skill. This
27+
combines code formatting (Black), Python linting (flake8), type checking
28+
(mypy), and static type checking with Pyright into a single, reproducible
29+
invocation for maintainers and automation.
30+
31+
## Inputs
32+
33+
- `repo_root` (string, default `.`): repository root where the command should
34+
be executed.
35+
36+
## Outputs
37+
38+
- `lint_summary` (string): the combined stdout/stderr from the lint commands; the
39+
exit status indicates whether any linters failed.
40+
41+
## Procedure
42+
43+
1. From the repository root (or `repo_root`), run the combined linters:
44+
45+
```bash
46+
uv run black vultron/ test/ && uv run flake8 --exit-zero vultron/ test/ && uv run mypy && uv run pyright
47+
```
48+
49+
2. Inspect each tool's output. `black` will reformat files in-place. `flake8`
50+
runs with `--exit-zero` here (to collect issues without failing the whole
51+
command chain); you may want to run `uv run flake8 vultron/ test/` separately
52+
during development to see non-zero exit behavior.
53+
54+
3. Address issues reported by each tool and repeat until the suite is clean.
55+
56+
## Constraints / Rules
57+
58+
- Run `black` first to ensure formatting does not generate spurious lint
59+
failures.
60+
- `flake8` is invoked with `--exit-zero` in this combined command to allow
61+
collection of issues across all linters; CI may run `flake8` without
62+
`--exit-zero` to fail the build on lint errors.
63+
- `mypy` and `pyright` are both included to provide complementary type
64+
checking; teams may prefer one over the other, but including both helps
65+
surface different classes of type issues.
66+
67+
## Examples
68+
69+
```bash
70+
# Run the combined linters (recommended for local pre-commit checks)
71+
uv run black vultron/ test/ && uv run flake8 --exit-zero vultron/ test/ && uv run mypy && uv run pyright
72+
```
73+
74+
## Rationale
75+
76+
Grouping linters into a single skill provides a reproducible developer
77+
workflow and makes it easier for agents and automation to invoke the same set
78+
of checks maintainers use. Including both `mypy` and `pyright` gives
79+
coverage from two type-checking tools that can catch different issues.
80+

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ the format and examples.
136136
- **pylint** / **flake8** for linting (recommended)
137137
- **markdownlint-cli2** for markdown linting (use the repository's
138138
`mdlint.sh` wrapper; see `.github/skills/format-markdown/SKILL.md`)
139+
- **pyright** for static type checking (recommended alongside `mypy`)
139140

140141
Agents MUST NOT introduce alternative frameworks or package managers without
141142
explicit approval from the maintainers.

0 commit comments

Comments
 (0)