presubmit
Complete the required presubmit. Use before declaring a feature finished, after a large refactor or when asked.
When & Why to Use This Skill
The Presubmit Claude skill automates the execution of comprehensive test suites and static code analysis to ensure software quality. By integrating a robust battery of checks, it allows AI agents to verify code integrity, identify regressions, and maintain high development standards before finalizing features or completing large-scale refactors.
Use Cases
- Feature Completion Validation: Automatically running a full suite of tests to ensure a new feature is fully functional and bug-free before marking the task as finished.
- Refactoring Regression Testing: Executing extensive static checks and unit tests after significant code changes to guarantee that existing functionality remains intact.
- Autonomous Debugging and Fixing: Enabling the AI agent to run presubmit scripts, interpret error logs, and iteratively apply fixes until all quality gates are passed.
- Pre-deployment Quality Gate: Serving as a final local verification step to ensure the codebase meets all project requirements before it is pushed to a CI/CD pipeline.
| name | presubmit |
|---|---|
| description | Complete the required presubmit. Use before declaring a feature finished, after a large refactor or when asked. |
| allowed-tools | [ |
Presubmit
This skill provides the most extensive and robust battery of tests and static checks available.
Utility Scripts
presubmit.sh- Run the real presubmit script, capture output in a temp file
Instructions
The presubmit can take several minutes to complete. The script blocks until complete.
Important: Do not run the real presubmit directly, always use the utility script
${CLAUDE_PLUGIN_ROOT}/scripts/presubmit.sh.
Important: Ensure the cwd is the project root before running the presubmit.
- Run
${CLAUDE_PLUGIN_ROOT}/scripts/presubmit.sh. - Check the output file. (It can take a few minutes for the presubmit to finish.)
- If the output contains errors unrelated to the present context, escalate to the user
- If the output contains errors related to your context, attempt to fix them
- If the error prove too hard to fix, summarize your findings, a more specific repro command and escalate to the user
- Run
${CLAUDE_PLUGIN_ROOT}/scripts/presubmit.shagain and repeat until it passes