Prepare Commit

Format Kotlin/Gradle code with ktfmtFormat and detect temporary comments before commits.

291|148|Updated Apr 2, 2018
One-click install
npx skills add https://github.com/google/ground-android --skill prepare-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Prepare Commit
Source: https://github.com/google/ground-android/tree/main/.agent/skills/prepare_commit
Command: npx skills add https://github.com/google/ground-android --skill prepare-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prepares your codebase for a commit by automatically formatting code and helping identify lingering temporary comments.

Core Features & Use Cases

  • Automates Kotlin/Gradle code formatting via ktfmtFormat to ensure consistent style.
  • Detects and reminds you to remove temporary comments or debugging artifacts before committing.
  • Provides a lightweight, repeatable pre-commit step that can be run locally in any Git workflow.

Quick Start

Run the prepare.py script before committing to ensure code is properly formatted and temporary comments are checked.

Frequently Asked Questions about Prepare Commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format Kotlin code before a Git commit?

Format Kotlin code before a commit by running a script that executes ktfmtFormat, enforcing deterministic code styling to ensure clean commits every time.

How do I detect temporary comments left in code before pushing?

Detect temporary comments before pushing by using an unobtrusive pre-commit script that scans for lingering debugging artifacts and reminds you to remove them.

Does ktfmtFormat work with Gradle Android projects?

ktfmtFormat works with Gradle Android projects, applying deterministic formatting via a script that runs locally in any Git-based workflow during feature branch commits.

What is the best way to automate code formatting for feature branch commits?

Automate code formatting for feature branch commits by integrating a lightweight, repeatable pre-commit step that runs ktfmtFormat and handles formatting errors gracefully.

What happens when ktfmtFormat encounters formatting errors during commit prep?

When ktfmtFormat encounters formatting errors during commit prep, the script handles them gracefully, preventing workflow breakage while identifying code style issues.