Configuring git hygiene

From alexei-led/cc-thingz · View interactive version

Configuring git hygiene is an AI agent skill from the GitHub repository alexei-led/cc-thingz. <!-- Use installed tool names. Discover callable tools before batching independent calls in codemode; model-only UI/orchestration tools must be called directly. -->

How to use this skill

Skill file

<!-- Pi platform guidance -->

<!-- Use installed tool names. Discover callable tools before batching independent calls in codemode; model-only UI/orchestration tools must be called directly. -->

<!-- Read required skill/instruction files through direct read when exposed or through Code Mode. If an optional pruning extension is installed, verify its output protection semantics; do not assume nested-path protection. Code Mode composes calls; subagents or controllers own durable workflows. Async subagents notify natively: yield rather than poll. -->

Configure Git Hygiene

Set up project-local hygiene that stays fast enough to keep enabled. Stop if the directory is not a git repo.

Ask first

Propose the plan (current facts, files and config to change, verification, risks) and get approval before you:

If the repo is dirty, show git status --short and ask before hook or config edits.

When asked for a plan, give the whole plan in one answer. If you have not inspected the repo yet, make the inspection commands below its first step, mark current state as unverified, and still lay out the hook, Gitleaks, or .gitignore changes from the policy and how you will verify them.

Inspect

git status --short
git config --show-origin --get core.hooksPath || true
git config --show-origin --list | rg '^(file:.*\s+)?(user\.|commit\.|tag\.|pull\.|fetch\.|rerere\.|core\.hooksPath|includeIf\.)' || true
git ls-files .gitignore .pre-commit-config.yaml .gitleaks.toml 2>/dev/null || true
ls -la .git/hooks .githooks scripts/git-hooks 2>/dev/null || true

Policy

Details by topic:

Verify

Done when the relevant build/test/lint checks pass on what you changed, or you name each check that did not run and why.

Output

GIT HYGIENE CONFIG
Scope: hooks | gitleaks | gitignore | config | guardrails
Status: PROPOSED | APPLIED | BLOCKED
Current state: <facts from git config/files>
Plan: <change and why>
Changes: <file/config edited>
Verification: <command> — pass/fail/not run
Next: <install tool, run hook, or push validation>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.