repo-toolchain-gates

Configures pinned mise toolchains, lefthook git hooks, and betterleaks secrets gates for repositories.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/Codeseys-Labs/agentic-sdlc --skill repo-toolchain-gates-codeseys-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo-toolchain-gates
Source: https://github.com/Codeseys-Labs/agentic-sdlc/tree/main/plugin/skills/repo-toolchain-gates
Command: npx skills add https://github.com/Codeseys-Labs/agentic-sdlc --skill repo-toolchain-gates-codeseys-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories without a pinned toolchain and enforced gates suffer from locally-green/CI-red failures, skipped lint checks, and undetected committed secrets. This Skill establishes one canonical gate command (mise run check) that every agent and CI run executes against identical tool versions. ## Core Features & Use Cases - Pinned toolchain via mise: Pin every tool (language, linters, lefthook, betterleaks) in [tools] with exact versions matching CI, including tools absent from the mise registry via explicit github:/aqua: backends. - Hook enforcement via lefthook: Wire pre-commit (fast staged-file subset with {staged_files} and stage_fixed) and pre-push (heavier subset) hooks that workers cannot silently skip. - Secrets gate via betterleaks: Scan Git-visible files as a check leaf and pre-push hook with an explicit --config flag that defeats drop-in config neutering; keep full-history scans as a separate pre-publish step. - Worktree wave support: Handle the two propagation facts — shared .git/hooks but per-path mise trust — when running parallel waves in git worktrees. - Use Case: A wave of agents ships code that passes locally but fails CI because golangci-lint drifted from the CI action version; this Skill pins both together and adds a mutation test that fails on any future drift. ## Quick Start Set up this repository so that mise run check is the single enforced gate with pinned tools, lefthook hooks, and a betterleaks secrets scan.

Frequently Asked Questions about repo-toolchain-gates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pin a tool that is not in the mise registry?

Registry membership only supplies a default backend, so name a backend explicitly such as github:owner/repo, which locks per-platform URLs and SHA-256 checksums. Run mise backends first, prefer github: over the deprecated ubi:, and never fabricate a version number.

Why does CI fail when local lint passes?

This happens when the linter version in your local toolchain drifts from the version the CI action installs. Pin the linter in mise [tools] to the exact CI version with a comment naming the CI file, and bump both together.

Do git hooks work in git worktrees?

Yes, .git/hooks is shared, so one lefthook install in the main repo fires hooks in every worktree. However mise trust is per-absolute-path, so a fresh worktree needs mise trust <path> or a process-scoped mise --no-config --cd invocation.

How do I add a secrets scan to pre-push hooks and CI?

Wire a betterleaks wrapper as a lefthook pre-push command and a mise [tasks.secrets] leaf inside the check aggregate. Always pass --config explicitly, because a drop-in .gitleaks.toml with useDefault=false silently neuters the scan while exiting 0.

Can lefthook hooks be bypassed by developers?

Yes, via --no-verify or LEFTHOOK=0, so hooks are a guardrail rather than a security boundary. CI must re-run the same gate tasks to enforce the checks independently of local hook execution.

Why does my secrets gate pass even with a planted test credential?

The surrounding keyword decides whether the rule fires: aws_access_key_id is allowlisted upstream and reports clean, while access_key or AWS_KEY with the same token exits 1. Always confirm the fixture fails before trusting any green scan result.