Skip to main content

grip: Five questions before you push

Quizzes you—not the agent—on the current diff with five questions graded to a Grip Score out of 100;

Source facts

Repository
guilyx/grip
Last source activity
October 25, 2026 at 19:35
Detected SKILL.md language
English
Stars
439
Forks
98

Examples

Creator post: /grip before push asks five questions on the agent-written diff; below the pass mark, no push.

Uses

Use with /grip, “quiz me”, or before pushing code you did not write line by line.

Prerequisites

The grip CLI available to the agent (grip ask / grip grade).

How to use

Run the quiz on staged, unpushed, or a commit range; answer all five questions yourself; the Skill grades answers and reports the score—do not let the agent answer for you.

Limitations

The agent is only the messenger; blank answers score zero; nothing-to-quiz and already-passed diffs stop early.

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
grip
description
Quiz the developer on the current diff with grip before it is committed or pushed. Five questions about the change, graded to a Grip Score out of 100. Use for /grip, "quiz me", "do I have a grip on this", or before pushing code the developer did not write line by line.
disable-model-invocation
true
allowed-tools
Bash(grip *)
# grip You are the messenger, not the student. grip writes the questions and grades the answers; you relay them. The developer answers. Arguments: `$ARGUMENTS` is empty (staged changes, the default), `--unpushed` (every commit not yet on a remote) or `--range BASE..HEAD`. ## Steps 1. Run `grip ask $ARGUMENTS` and read the JSON. - `"status": "nothing-to-quiz"`: say there is nothing to quiz, pass on `message` (it says what exists instead and what to run) and stop. - `"status": "already-passed"`: say this diff already passed recently and stop. - If the command fails because `grip` is missing, tell the developer to install it: `pipx install grip-hook` (or `uv tool install grip-hook`) 2. Show the `summary`, then the five questions, numbered 1 to 5, each with its `focus` in parentheses. Quote them verbatim. Ask the developer to answer all five in one reply, a sentence or two each, and say a blank answer scores zero. 3. Wait for the developer's reply. Do not answer for them, do not hint, do not open the diff or the code to help, and do not paraphrase their answers. If they ask you to answer, decline: the point is to check what they understand. 4. Grade with their answers in order, as a JSON list of five strings: ```bash grip grade --answers - <<'EOF' ["answer 1", "answer 2", "answer 3", "answer 4", "answer 5"] EOF ``` Copy each answer exactly, line breaks included: write them as `\n` inside the JSON string. Never join paragraphs or drop the breaks between them. 5. Show the result as a short table: question number, focus, score out of 20, feedback. Then the Grip Score against the pass mark and the verdict. - Exit code 0: they passed. The diff is remembered, so `git push` goes through. - Exit code 1: they failed. Suggest what to re-read from the feedback and offer to run `/grip` again once they have. The same diff gets the same questions, unless `retry_questions = "new"` is set (`grip ask --fresh` asks for new ones). ## Notes - A passed diff is remembered for `remember_passes_hours` (24 by default). Changing the diff invalidates the pass. - Never read or open files under `.git/grip/`. `grip last` shows the developer their questions, answers and feedback again; nothing else is yours to look at. - Configuration lives in `.grip.toml` at the repository root: `passing_score`, `difficulty`, `provider`, `model`. With `provider = "claude-code"` grip drives the `claude` CLI itself, so no API key is needed. - `grip check --unpushed` exits 0 when the unpushed diff already passed. Run it before `git push` when no hook does it for you.
View on GitHub