Skip to content

Commit 36d4917

Browse files
docs(skills): add executable code-review SKILL.md for reviewers
1 parent c1ad752 commit 36d4917

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Skill: Code review for TheAlgorithms/Python
2+
3+
Review a pull request against the rules already written in
4+
[`CONTRIBUTING.md`](../../../CONTRIBUTING.md). The goal is a review that any
5+
reviewer (human or AI) can run the same way every time and that produces a clear,
6+
kind, actionable verdict.
7+
8+
## How to run this skill
9+
10+
Read the PR diff, then work through the four `CONTRIBUTING.md` sections in order
11+
and emit the fixed output shape below. Cite the exact rule you are applying and
12+
suggest the fix — never just "rejected".
13+
14+
### 1. Before contributing / Is this an algorithm?
15+
16+
- [ ] The change adds, fixes, or documents **one algorithm** — not multiple, and
17+
not both code and doctest changes in the same PR.
18+
- [ ] It is a genuine algorithm or data structure (see the *What is an Algorithm?*
19+
section), not a script, snippet, or exercise dump.
20+
- [ ] It is **not already in the repository** (search the existing directories).
21+
- [ ] **No earlier open PR** already does the same thing — link it if one exists.
22+
- [ ] Properly attributed — no plagiarism; prior sources credited.
23+
24+
### 2. Coding Style
25+
26+
- [ ] File and directory names are lowercase, use underscores, and land inside an
27+
existing directory.
28+
- [ ] Public functions/classes have **type hints**.
29+
- [ ] Public functions have **doctests that actually pass**.
30+
- [ ] Descriptive variable and function names (no single letters where a word helps).
31+
- [ ] Code is formatted and lint-clean (`ruff`, `pre-commit`).
32+
33+
### 3. Other Requirements for Submissions
34+
35+
- [ ] At least one **Wikipedia (or equivalent) URL** documenting the algorithm.
36+
- [ ] Docstring explains what the function does and its parameters/returns.
37+
- [ ] No unnecessary third-party dependencies.
38+
39+
### 4. Verdict — fixed output shape
40+
41+
Emit exactly these headings so reviews are comparable and easy to automate:
42+
43+
```
44+
### Is this an algorithm? — <yes/no + one-line why>
45+
### Duplicate / prior-art check — <#NNNN | none found>
46+
### Coding style — <pass | issues: …>
47+
### Other requirements (doctests, type hints, descriptive names, Wikipedia URL) — <pass | issues: …>
48+
### Verdict — <approve | request changes | close> + one-line reason
49+
```
50+
51+
## Tone
52+
53+
Be specific and kind. Point at the exact `CONTRIBUTING.md` rule and offer the fix
54+
rather than a bare rejection — first-time and Hacktoberfest contributors are more
55+
likely to come back and improve the PR when the path forward is clear.
56+
57+
## Map findings to labels
58+
59+
Where a finding matches an existing label, name it so the review lines up with the
60+
maintenance/cleanup tooling:
61+
62+
- missing/failing doctests → `require tests`
63+
- missing type hints → `require type hints`
64+
- non-descriptive names → `require descriptive names`
65+
- CI red → `tests are failing`
66+
- otherwise ready for a maintainer → `awaiting reviews`

0 commit comments

Comments
 (0)