Skip to main content

pre-review

Check your branch before opening a PR (lint, test, title validation)

Quellinformationen

Repository
arklexai/arksim
Letzte Quellaktivität
24. März 2026 um 21:30
Erkannte Sprache von SKILL.md
Englisch
Sterne
230
Forks
28

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
pre-review
description
Check your branch before opening a PR (lint, test, title validation)
disable-model-invocation
true
context
fork
agent
Explore
allowed-tools
["Bash","Read","Grep","Glob"]
# Pre-review Run local checks on the current branch before opening a pull request. ## Steps 1. **Gather branch context** ```bash BRANCH=$(git branch --show-current) BASE="main" git log --oneline "$BASE"..HEAD git diff --stat "$BASE"..HEAD ``` 2. **Group changed files by area** - List files changed vs main - Categorize: source (`arksim/`), tests (`tests/`), docs (`docs/`), config, other 3. **Draft and validate title** - Infer type and scope from changes - Propose a title matching: `^(feat|fix|docs|chore|ci|build|refactor|test|perf|style|revert)(\([a-z][a-z0-9_-]*\))?!?: .+$` - Verify max 72 characters - Recommend a scope if omitted 4. **Run ruff check** ```bash ruff check . 2>&1 ``` 5. **Run ruff format check** ```bash ruff format --check . 2>&1 ``` 6. **Run unit tests** ```bash pytest tests/unit/ -x --tb=short 2>&1 ``` 7. **Check code quality in diff** - For new `.py` files in the diff, verify: - `# SPDX-License-Identifier: Apache-2.0` header present - `from __future__ import annotations` present - Type annotations on function signatures - Absolute imports only (no relative imports) 8. **Check changelog** - If source files changed, check for an entry in CHANGELOG.md under `[Unreleased]` ## Output Print a readiness checklist: ``` Pre-review checklist -------------------- [ ] Branch: <branch-name> [x] Ruff check: PASS / FAIL (N issues) [x] Ruff format: PASS / FAIL (N files) [x] Unit tests: PASS / FAIL (N passed, N failed) [x] License headers: PASS / FAIL / N/A [x] Future annotations: PASS / FAIL / N/A [x] Type hints: PASS / WARN / N/A [x] Absolute imports: PASS / FAIL / N/A [x] Changelog updated: YES / NO / N/A [x] Suggested title: <title> Ready to open PR: YES / NO ```
Auf GitHub ansehen