git-guardrails
Git guardrails
Installs a shared hook that blocks destructive git operations. Requires jq on the agent’s PATH when the hook runs.
What gets blocked
git push(including--force)git reset --hard,git clean -f/git clean -fdgit branch -Dgit checkout ./git restore .
Quick start
- Scope: ask project-only vs global (paths differ per product).
- Copy the hook bundle from this skill’s scripts/ to the client’s hooks directory, keeping
block-dangerous-git.shandlib/git-guardrails-core.shtogether (the main script sources the core file). - Run
chmod +xonblock-dangerous-git.sh. - Merge the hook snippet from REFERENCE.md into the right settings file—do not wipe unrelated keys.
- Verify with the echo tests in REFERENCE.md.
More from danielvm-git/skills
triage-issue
Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.
11design-an-interface
Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".
11ubiquitous-language
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
11write-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
11setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
11tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
10