---
name: grix-pre-push-checks
description: Select and run the smallest sufficient validation set for Grix changes before push, review handoff, or completion. Use after changing backend Go code, Flutter frontend or admin code, Python voicebridge code, Kubernetes manifests, repository scripts, documentation, decision notes, or repository-local skills.
title: grix-pre-push-checks
canonical_url: https://skilld.dev/gh/askie/grix/grix-pre-push-checks
last_updated: 2026-10-29T10:46:39.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/askie/grix/grix-pre-push-checks/agents/openai.yaml).
>
> If the user asked to install this Skill, run `npx skilld install askie/grix/grix-pre-push-checks`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/grix-pre-push-checks`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/askie/grix/grix-pre-push-checks) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/grix-pre-push-checks`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/grix-pre-push-checks --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/grix-pre-push-checks --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Grix Pre-push Checks

Choose checks from the changed paths. Start with a focused check and broaden only when the change crosses packages, services, clients, or contracts.

## Determine the change set

1. Read the repository `AGENTS.md` and `CONTRIBUTING.md`.
2. Use the user-specified or pull request base when available; otherwise compare with the merge base of `origin/main` and include local staged, unstaged, and relevant untracked files.
3. Group changed files by subsystem and select checks below. A cross-component contract change requires checks for every affected producer and consumer.

## Select checks

- `backend/**`: From `backend`, run `go test` for the changed package first. For cross-package changes, run `AIBOT_TEST_NATS_URL=nats://127.0.0.1:1 go test ./...`; add `go vet ./...` and `go build ./...` when shared contracts or command entrypoints change.
- `frontend/**`: From `frontend`, run the closest `flutter test <test-file-or-directory>`. For shared state, navigation, protocol, or multi-feature changes, add `flutter analyze --no-fatal-infos` and `flutter test --timeout 90s`.
- `admin/**`: From `admin`, run the closest `flutter test <test-file-or-directory>`. Add `flutter analyze --no-fatal-infos` and the full `flutter test` when shared code or multiple features change.
- `voicebridge/**`: From `voicebridge`, run the changed module's `python -m unittest <test_module> -v`. For shared bridge behavior, run the non-network unit-test set documented in `voicebridge/README.md`.
- `k8s/**`: Render each affected base with `kubectl kustomize <directory>` when `kubectl` is available. Inspect the output for secrets, selectors, probes, ports, image references, and missing configuration. Never apply manifests as a validation step.
- `.agents/skills/**`: Run the skill creator's `quick_validate.py` against each changed skill directory and inspect its metadata for accurate triggering.
- Documentation and decision notes only: check links, paths, commands, and consistency with current code. Do not run application-wide tests solely for prose changes.
- Repository scripts or workflows: run the narrow script test or syntax check that exercises the changed path. Do not invoke publishing, deployment, release, upload, or credentialed jobs.

If a security-sensitive change is present and `gitleaks` is installed, run `gitleaks detect --source .`. Treat findings as blocking until they are removed or proven to match a committed narrow exception.

## Safety and completion

- Do not run production, destructive, paid, real-provider, release, deployment, or credentialed checks without explicit user authorization.
- Do not broaden to all repository tests when focused evidence is sufficient.
- Treat a failed required check as blocking. Investigate the failure or clearly report why it could not be resolved.
- Report commands run, pass/fail results, and relevant checks skipped with reasons. Do not claim validation that was not executed.
