Prek
SkillDev toolsYour AI can run the Carbon project's required pre-submit style and lint checks on code changes before they are submitted. This skill contains the instructions for running prek, Carbon's checker for these checks. Since every change to the Carbon project must pass them, your AI can handle this required step for you.
Available today. Use it from your connected AI after setup.
No other account needed.
After adding this skill, ask your AI to run the required checks on the change you plan to submit. Make this part of your workflow before finishing any change, since Carbon requires these checks to pass first.
Then ask your AI: use the Prek skill
What your AI can do with it
- Run the pre-submit checks Carbon requires before a change is submitted
- Run the Carbon project's style checks on your code changes
- Run lint checks so issues are caught before submission
- Verify a change meets Carbon's requirements before it goes in
What this skill tells your AI
The instructions your AI receives, as published by carbon-language/carbon-lang in .agents/skills/prek/SKILL.md and read by ahel’s review.
prek is the Carbon pre-submit, style, and lint checker. Running it is
mandatory before submitting any changes.
Running prek
To run prek on all files:
prek run -a
To validate a specific list of files:
prek run --files <files>
Running prek in a Jujutsu (jj) workspace
If you are working in a Jujutsu workspace, running prek directly will fail
because it expects a standard Git repository structure. Instead, use the helper
script:
./scripts/jj_prek.sh
This script runs prek on all files that have changed between trunk and your
current Jujutsu @ change.
Prek dependency errors
[!TIP] If
prekfails with an error about resolving dependencies or security policy, you may be running in a restricted environment where the special-purposegpkgtool is required. Prefix the command withgpkg, for example:gpkg prek run -aorgpkg ./scripts/jj_prek.sh.
Signals
- GitHub stars
- 34k
- Forks
- 2k
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
prek-carbon-language- Source
- github.com/carbon-language/carbon-lang