Claude Code custom commands for Android development workflow
npm install claude-code-android-commandCustom Claude Code commands for Android development workflow with Gradle and Spotless.
Run this command in your Android project root:
``bash`
npx claude-code-android-command
That's it! The .claude/commands folder will be automatically created in your project.
Steps:
1. Run ./gradlew spotlessCheck to verify code formatting./gradlew spotlessApply
2. If spotlessCheck fails, run to fix formatting automaticallygit status
3. Run and git diff to see changes
4. Commit all changes with a descriptive message
Usage:
``
/commit
Steps:
1. Run ./gradlew spotlessCheck to verify code formatting./gradlew spotlessApply
2. If spotlessCheck fails, run to fix formatting automaticallygit status
3. Run and git diff to see changes
4. Commit all changes with a descriptive message
5. Push to remote
Usage:
``
/cp
Steps:
1. Check current branch with git branch --show-currentmain
2. If on branch, create a new feature branch with a descriptive name./gradlew spotlessCheck
3. Run to verify code formatting./gradlew spotlessApply
4. If spotlessCheck fails, run to fix formatting automaticallygit status
5. Run and git diff to see changes-u
6. Commit all changes with a descriptive message
7. Push to remote with flag to set upstreammain
8. Create a pull request to branch using gh pr create
Usage:
``
/pr
If you prefer manual installation:
`bash`
git clone https://github.com/Nghicv/claude-code-android-command.git
cp -r claude-code-android-command/.claude .
rm -rf claude-code-android-command
- Node.js (for npx installation)
- Gradle with Spotless plugin configured in your Android project
- Git
- GitHub CLI (gh) for /pr command
``
your-project/
└── .claude/
└── commands/
├── commit.md
├── cp.md
└── pr.md
These commands become available as project-specific skills in Claude Code.
- ✅ Optimized for Android projects using Spotless for code formatting
- ✅ All commands include automatic formatting fixes before committing
- ✅ Safe to run multiple times (existing files will be overwritten)
- ✅ Works with any Android project structure
After installation, in Claude Code:
`
User: /commit
Claude: [Runs spotlessCheck, applies formatting if needed, shows diff, and commits]
User: /pr
Claude: [Checks branch, formats code, commits, pushes, and creates PR with description]
``
MIT
https://github.com/Nghicv/claude-code-android-command