with one click
pre-pr
// Run mandatory pre-PR quality checks for .NET projects before creating a pull request. Use before creating any PR, or when the user says "prepare for PR", "pre-PR checks", or "quality gate".
// Run mandatory pre-PR quality checks for .NET projects before creating a pull request. Use before creating any PR, or when the user says "prepare for PR", "pre-PR checks", or "quality gate".
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | pre-pr |
| description | Run mandatory pre-PR quality checks for .NET projects before creating a pull request. Use before creating any PR, or when the user says "prepare for PR", "pre-PR checks", or "quality gate". |
| disable-model-invocation | true |
| argument-hint | [solution or project path] |
Check that required tools are available:
which roslynator
which quickdup
If roslynator is not found:
dotnet tool install -g roslynator.dotnet.cli
If quickdup is not found:
curl -sSL https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.sh | bashgo install github.com/asynkron/Asynkron.QuickDup/cmd/quickdup@latestThis is a mandatory quality gate to run before creating any pull request in a .NET project. It ensures code is analyzed, compiles cleanly, tests pass, duplication is checked, and code is formatted — in that order.
Do NOT skip any steps. Do NOT create a PR if any step fails. Iterate until all checks pass.
If $ARGUMENTS is provided, use it as the project/solution path. Otherwise, look for a .sln or .csproj in the current directory.
Also determine the source directory for quickdup scanning (typically src/ or the project root).
Run static analysis and auto-fix code issues:
roslynator fix $PROJECT_PATH
Then verify compilation:
dotnet build $PROJECT_PATH
If build fails: Fix the issues and rerun roslynator before proceeding.
dotnet test $PROJECT_PATH
Handle failures:
quickdup -path $SOURCE_DIR -ext .cs -select 0..20 -min 2 -exclude ".g.,.generated."
If new duplications are found:
/quickdup for refactoring patterns)dotnet format $PROJECT_PATH
Confirm all checks passed:
Only after ALL checks pass, create the pull request.