Agent skill

Mg Integrity Check

by modelguide in modelguide/modelguide

Use before committing significant code changes to verify project integrity.

MITAuto-check: notesDevelopment

Install Mg Integrity Check

skills CLI
$ npx skills add modelguide/modelguide --skill mg-integrity-check -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install modelguide/modelguide mg-integrity-check --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/modelguide/modelguide.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mg-integrity-check .claude/skills/mg-integrity-check && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mg-integrity-check
GitHub stars
108
Token cost
~2.4k tokens
SKILL.md length
1,017 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Use before committing significant code changes to verify project integrity.

  • Works in 4 steps: Sensitive files — .env, .env.*,… → Scratch / generated — node_modules/,… → Large binaries — images, videos,… → …
  • Phrases include pre-commit check
  • SKILL.md covers Step 0: Gather Changed Files, Check 1: File Naming, Check 2: File Location and Check 3: Import Aliases, plus 12 more sections
  • Calls git, bunx and bun

What it does

Mg Integrity Check is an agent skill from modelguide/modelguide. Use before committing significant code changes to verify project integrity. Checks code style, project structure, naming conventions, and change management rules from CONTRIBUTING.md. Trigger phrases include "pre-commit check", "integrity check", "check before commit", "review my changes", "verify changes".

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: Open-source voice agent orchestration framework - build production voice AI pipelines without vendor lock-in. The licence is MIT.

When your agent uses it

  • Phrases include pre-commit check
  • Integrity check
  • Check before commit
  • Review my changes

Example prompts

  • “pre-commit check”
  • “integrity check”
  • “check before commit”
  • “/mg-integrity-check”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Sensitive files — .env, .env.*, credentials.json, *.pem, *.key
  2. Scratch / generated — node_modules/, .DS_Store, *.log, *.tmp
  3. Large binaries — images, videos, archives (> 500 KB)
  4. Cross-concern files — e.g., API schema changes staged alongside a UI-only branch (infer branch intent from branch name and majority of…

What it can do on your machine

Read from SKILL.md and the folder at commit 554caa0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • bunx
    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and bunx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mg Integrity Check loads about 2.4k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 1,017 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:111
    - No `.env` files being committed (should be gitignored)
  • NoteMentions a .env fileSKILL.md:172
    1. **Sensitive files** — `.env`, `.env.*`, `credentials.json`, `*.pem`, `*.key`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from modelguide/modelguide at commit 554caa0, republished under its MIT licence (© modelguide). 1,017 words, ~2,351 tokens.

Download SKILL.mdSave it as .claude/skills/mg-integrity-check/SKILL.md (or your agent's skills folder).
name
mg-integrity-check
description
Use before committing significant code changes to verify project integrity. Checks code style, project structure, naming conventions, and change management rules from CONTRIBUTING.md. Trigger phrases include "pre-commit check", "integrity check", "check before commit", "review my changes", "verify changes".

Pre-Commit Integrity Check

Run this checklist against the current staged or changed files before committing. Report each check as PASS, FAIL, or SKIP (not applicable). At the end, summarize all findings.

Step 0: Gather Changed Files

Run git diff --name-only HEAD (unstaged) and git diff --cached --name-only (staged) to get the full list of changed files. Categorize them:

  • API files — paths starting with modelguide-api/
  • UI files — paths starting with modelguide-ui/
  • Docs files — paths starting with docs/
  • DB schema files — paths matching modelguide-api/src/db/schema/*.ts
  • Migration files — paths matching modelguide-api/drizzle/*.sql
  • Connector files — paths matching modelguide-api/src/features/connectors/catalog/*/
  • Env files — modelguide-api/src/env.ts
  • API route files — paths matching modelguide-api/src/features/*/routes.ts or *.routes.ts
  • UI route files — paths matching modelguide-ui/src/routes/**/*.tsx
  • Test files — paths matching modelguide-api/tests/** or modelguide-ui/src/**/*.test.*

Check 1: File Naming

For every changed file, verify:

  • File name is kebab-case (e.g., agent-form.tsx, auth.routes.ts)
  • No PascalCase or camelCase file names (exception: SKILL.md, CLAUDE.md, README.md, CONTRIBUTING.md)
  • UI Route files follow TanStack Router convention: name.tsx or name.$param.tsx

Check 2: File Location

For every changed source file, verify it lives in the correct directory:

  • API feature code → modelguide-api/src/features/<feature>/
  • API shared utilities → modelguide-api/src/lib/
  • API DB schema → modelguide-api/src/db/schema/
  • UI feature components → modelguide-ui/src/features/<feature>/
  • UI shared primitives → modelguide-ui/src/components/ui/
  • UI layout components → modelguide-ui/src/components/layout/
  • UI routes → modelguide-ui/src/routes/
  • UI stores → modelguide-ui/src/stores/
  • UI schemas → modelguide-ui/src/schemas/

Flag any source file that lives outside these directories (e.g., code directly in src/ root).

Check 3: Import Aliases

Read changed API files and verify:

  • Imports use path aliases: @features/*, @lib/*, @db/*, @/*
  • No deep relative imports like ../../lib/ or ../../../db/ (one level ./ within the same feature is fine)

Read changed UI files and verify:

  • Imports use ~/ alias (e.g., ~/lib/api, ~/components/ui/button)
  • No deep relative imports

Check 4: API Route Conventions

If any new route files are added or modified:

  • Routes use @hono/zod-openapi for request/response validation
  • Route is registered in modelguide-api/src/app.ts
  • Handler has Zod schemas for request params, body, and response

Check 5: UI Patterns

If UI component files are changed:

  • Component variants use CVA (cva() from class-variance-authority)
  • Data fetching uses TanStack Query (useQuery, useMutation)
  • Client state uses Zustand (not React Context for global state)
  • Form validation uses Zod schemas

These are guidelines — only flag if a new component introduces a different pattern (e.g., raw fetch() instead of TanStack Query, or inline styles instead of CVA).

Check 6: Database Changes

If any files in modelguide-api/src/db/schema/ are modified:

  • Check that a corresponding migration file exists in modelguide-api/drizzle/

  • If no new migration is staged, warn: "Schema changed but no migration found. Run bunx drizzle-kit generate --name <descriptive-name>"

  • If the change is significant (new table, new pattern, security model change), check for an ADR in docs/decisions/

  • Read modelguide-api/drizzle/meta/_journal.json and verify that when timestamps are monotonically increasing. For each entry after the first, confirm its when value is strictly greater than the previous entry's. If any migration has a timestamp less than or equal to the previous entry, FAIL with: "Migration {tag} has out-of-order timestamp (when: {value} ≤ previous: {prevValue}). Re-generate with bunx drizzle-kit generate --name <name> after rebasing."

Check 7: Environment Variables

If modelguide-api/src/env.ts is modified (variables added, renamed, or removed):

  • Check that railway/DEPLOY.md is also modified in this changeset
  • If not, warn: "Env vars changed but railway/DEPLOY.md not updated (steps 3 and 8 list production vars)"

Check 8: Test Coverage

For new files added in this changeset:

  • New API route → should have corresponding test in modelguide-api/tests/unit/ or tests/integration/
  • New connector handler → should have test in modelguide-api/tests/unit/connectors/
  • New UI feature component → should have test file

Only flag missing tests for new files. Don't flag modifications to existing files that already have tests.

Check 9: Connector Module Integrity

If any connector files are changed (paths matching catalog/*/):

  • The connector directory has all 3 files: client.ts, handlers.ts, index.ts
  • Handlers use the with{Name}() HOF wrapper (grep for the pattern)
  • No raw throw in handler functions (errors should be returned via the wrapper)
  • Mutation tools have defaultRequiresConfirmation: true in the manifest
  • The connector is imported in modelguide-api/src/features/connectors/catalog/registry.ts
Show full SKILL.md (378 more words)Show less

Check 10: Security

Across all changed files:

  • No hardcoded secrets, API keys, or credentials (grep for patterns like sk_, mgk_, Bearer , passwords)
  • No .env files being committed (should be gitignored)
  • Connector config fields storing secrets use type: "secret" in configSchema

Check 11: Package Manager

Verify the correct package manager is used per sub-project:

  • modelguide-api/ — uses Bun. If modelguide-api/package-lock.json appears in the changeset, FAIL: "API uses Bun — package-lock.json should not exist. Use bun install (produces bun.lock)."
  • modelguide-ui/ — uses npm. package-lock.json is expected. If modelguide-ui/bun.lock appears in the changeset, WARN: "UI uses npm — unexpected bun.lock."
  • Root — if a root lockfile is added, it must be bun.lock. If package-lock.json appears at the repo root, FAIL: "Root uses Bun — package-lock.json should not exist at repo root."

Check 12: Commit Message Format

Skip this check if on the default branch.

Get the default branch name and check every commit since diverging:

bash
DEFAULT=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}')
git log "origin/$DEFAULT..HEAD" --pretty=format:"%h %s"

Each commit subject must match:

<type>(<scope>): <summary>
FieldValid values
typefeat, fix, chore, refactor, docs, test, perf, ci
scopeagents, connectors, sessions, auth, mcp, ui, db, analytics, secrets, feedback, sops, simulations

Additional rules:

  • First line must be ≤ 72 characters
  • Summary must be imperative mood, lowercase start

Fail on commits that do not match the format. List each offending commit hash and subject line.

Check 13: Branch Naming

Skip this check if on the default branch.

Current branch must match:

<type>/<short-kebab-description>

Where <type> is one of: feat, fix, chore, refactor, docs, test, perf, ci.

Examples: feat/add-agent-search, fix/session-timeout, chore/update-deps.

Fail if the branch name does not match the pattern.

Check 14: Staging Hygiene

Skip this check if nothing is staged (git diff --cached --name-only is empty).

If files are staged, check for potentially unrelated or dangerous files:

  1. Sensitive files — .env, .env.*, credentials.json, *.pem, *.key
  2. Scratch / generated — node_modules/, .DS_Store, *.log, *.tmp
  3. Large binaries — images, videos, archives (> 500 KB)
  4. Cross-concern files — e.g., API schema changes staged alongside a UI-only branch (infer branch intent from branch name and majority of changed files)

Warn on any suspicious staged files. This is advisory — the user may have a good reason.

Report Format

After running all checks, output a summary:

## Integrity Check Results

Files checked: N

| # | Check | Result | Details |
|---|-------|--------|---------|
| 1 | File naming | PASS | |
| 2 | File location | PASS | |
| 3 | Import aliases | FAIL | `modelguide-api/src/features/agents/foo.ts` uses relative import `../../lib/crypto` |
| ... | ... | ... | ... |
| 11 | Package manager | PASS | |
| 12 | Commit message format | PASS | |
| 13 | Branch naming | PASS | |
| 14 | Staging hygiene | PASS | |

### Issues to Fix (N)
- [FAIL] Check 3: ...

### Warnings (N)
- [WARN] Check 6: Schema changed but no migration found

### All Clear
✓ No blocking issues found. Ready to commit.

Report FAIL for violations that should be fixed before committing. Report WARN for advisory items the developer should consider. SKIP checks that don't apply to the current changeset.

© modelguide, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/mg-integrity-check of modelguide/modelguide.

Open the folder on GitHubat commit 554caa0

Compare with similar skills

Mg Integrity Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mg Integrity Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mg Integrity Check this skillmodelguide/modelguide108—~2.4kAutomated safety check: NotesMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Android UI Visual Reviewpermissionlesstech/bitchat-android7.7k—~2.6kAutomated safety check: PassGPL-3.0
Constraint-Driven Developmentaddyosmani/agent-skills102k2 repos~5.2kAutomated safety check: PassMIT

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Android UI Visual Review

    permissionlesstech/bitchat-android

    Analyze an Android pull request, branch, commit, or patch for user-visible changes and produce reproducible before/after screenshots from isolated builds.

    7.7k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Constraint-Driven Development

    addyosmani/agent-skills

    Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.

    102k GitHub starsUsed in 2 repos~5.2k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from modelguide/modelguide

  • Mg CLI

    modelguide/modelguide

    Generate YAML configuration files and run CLI commands to onboard organizations into ModelGuide.

    108 GitHub stars~3.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Connector

    modelguide/modelguide

    A skill your agent uses when the user asks to add a connector, create a connector, implement a connector for a service, add a tool to a connector, update a connector tool, or asks about connector…

    108 GitHub stars~4.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Local DB Restore

    modelguide/modelguide

    Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"

    108 GitHub stars~645 tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Railway DB Backup

    modelguide/modelguide

    Backup a PostgreSQL database from a Railway environment. An agent skill from modelguide/modelguide.

    108 GitHub stars~534 tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Railway DB Restore

    modelguide/modelguide

    Restore a PostgreSQL database backup to a Railway environment.

    108 GitHub stars~562 tokensUpdated 3 mo ago
    Auto-check passed
  • Mg Railway Deploy All

    modelguide/modelguide

    Deploy all ModelGuide services (API, UI, LB) to a Railway environment.

    108 GitHub stars~667 tokensUpdated 3 mo ago
    Auto-check passed

Questions about Mg Integrity Check

What does Mg Integrity Check do?

Use before committing significant code changes to verify project integrity. Mg Integrity Check is an agent skill from modelguide/modelguide. Use before committing significant code changes to verify project integrity.

When should I use Mg Integrity Check?

Mg Integrity Check fits situations like: phrases include pre-commit check; integrity check; check before commit; review my changes.

How do I install Mg Integrity Check in Claude Code?

Run `npx skills add modelguide/modelguide --skill mg-integrity-check -a claude-code`. Or copy the skill folder (.claude/skills/mg-integrity-check in modelguide/modelguide) into .claude/skills/mg-integrity-check in your project. Claude Code loads it when a task matches its description.

How do I install Mg Integrity Check in Codex?

Run `npx skills add modelguide/modelguide --skill mg-integrity-check -a codex`. Or copy the skill folder (.claude/skills/mg-integrity-check in modelguide/modelguide) into .agents/skills/mg-integrity-check in your project. Codex loads it when a task matches its description.

Can I use Mg Integrity Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modelguide/modelguide --skill mg-integrity-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mg-integrity-check, .gemini/skills/mg-integrity-check, .github/skills/mg-integrity-check and .opencode/skills/mg-integrity-check in your project.

What does Mg Integrity Check need to run?

Going by SKILL.md and its folder, Mg Integrity Check needs the command-line tools its instructions call (git, bunx and bun).

Does Mg Integrity Check access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mg Integrity Check safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Mg Integrity Check use?

Mg Integrity Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mg Integrity Check use?

About 2.4k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mg Integrity Check?

Skills that share tags, products or a category with Mg Integrity Check: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Mailspring App Screenshots (Foundry376/Mailspring, 18k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars) and Android UI Visual Review (permissionlesstech/bitchat-android, 7.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mg Integrity Check?

modelguide (a GitHub organization) maintains it in modelguide/modelguide, which has 108 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on June 20, 2026.

Source: modelguide/modelguide on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.