一键导入
quality-check
Runs ./gradlew check to identify code quality issues (ktlint, detekt, Spotless, tests) and automatically fixes all problems found.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Runs ./gradlew check to identify code quality issues (ktlint, detekt, Spotless, tests) and automatically fixes all problems found.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Performs comprehensive Pull Request reviews for this project, focusing on Clean Architecture, Jetpack Compose, Security, and Fintech standards.
Generates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for a specific feature using the Hybrid Network Architecture and MVI Pattern.
Converts raw JSON structures into clean, production-ready Moshi DTOs for the Android_Digital_Wallet project.
| name | Quality Check |
| description | Runs ./gradlew check to identify code quality issues (ktlint, detekt, Spotless, tests) and automatically fixes all problems found. |
[!IMPORTANT] Resource Cleanup: After completing quality checks, ALWAYS run
cleanup-java(alias forpkill -9 java) as the FINAL STEP to stop all background Java/Gradle daemon threads and release system resources.
[!IMPORTANT] Role: You are a Senior Android Developer responsible for maintaining code quality standards. Your task is to run quality checks and fix all identified issues.
| Tool | Purpose |
|---|---|
| ktlint | Kotlin code style enforcement |
| detekt | Static code analysis |
| Spotless | Code formatting |
| Unit Tests | JUnit 4, MockK, Robolectric |
[!TIP] The
./gradlew checktask is configured inquality.gradle.ktsto automatically run:
spotlessApply- Auto-fixes formatting issuesspotlessCheck- Verifies formattingdetekt- Static code analysis
./gradlew check
This single command will:
If the check fails, parse the output and categorize issues by type:
| Issue Type | Tool | Action Required |
|---|---|---|
| Formatting | Spotless | ✅ Auto-fixed by ./gradlew check |
| Code Smells | detekt | Manual fix based on rule violations |
| Test Failures | JUnit | Debug and fix failing tests |
| Compilation | Kotlin | Fix syntax/type errors |
For issues that cannot be auto-fixed:
After fixing, re-run:
./gradlew check
[!IMPORTANT] Build the project to ensure all changes compile and work correctly.
./gradlew assembleDebug
This verifies:
[!CAUTION] ALWAYS run this as the FINAL STEP to stop all background Java/Gradle daemon threads and release system resources for your PC.
# Stop all Java/Gradle daemon processes
cleanup-java
# Or directly: pkill -9 java
| Rule | Description | Fix Strategy |
|---|---|---|
LongMethod | Method exceeds line limit | Extract to smaller functions |
ComplexCondition | Complex boolean expressions | Extract to named variables |
MagicNumber | Hardcoded numbers | Extract to named constants |
TooManyFunctions | Class has too many functions | Split into multiple classes |
UnusedPrivateMember | Unused private field/function | Remove or use |
MaxLineLength | Line exceeds character limit | Break line or refactor |
FunctionNaming | Composable naming violation | Use PascalCase for Composables |
No explicit input required. The skill operates on the current project state.
Your response MUST be structured as follows:
### 🔧 Gradle Check Results
**Status**: ✅ PASSED / ❌ FAILED
### 📊 Issues Found
| Type | Count | Module | Status |
|------|-------|--------|--------|
| ktlint | X | :module | Fixed/Pending |
| detekt | X | :module | Fixed/Pending |
| Spotless | X | :module | Fixed/Pending |
| Tests | X | :module | Fixed/Pending |
### 🛠️ Fixes Applied
1. **[File:Line]**: [Description of fix]
### ⚠️ Manual Intervention Required
- **[File:Line]**: [Issue description] → [Suggested fix]
### ✅ Final Status
(Choose one: 🟢 All Checks Passing / 🟡 Partial Fix / 🔴 Needs Manual Fix)
Use the @quality_check skill to fix all code quality issues.
Or step-by-step:
1. Run @quality_check
2. Fix all detekt violations in :features:home module
[!WARNING] Memory Management: Gradle daemons can consume significant memory. Always run
cleanup-javaafter extended development sessions or before major check runs.
[!TIP] Quick Format: Use
./gradlew spotlessApplyfor fast formatting fixes before running full check.
[!NOTE] CI Alignment: This skill mirrors CI pipeline checks. Passing locally ensures PR checks will pass.