Agent skill

pre-commit-manager

Manage pre-commit hooks with preference memory and template-based configuration. Use when installing, configuring, enabling/disabling, or checking status of pre-commit hooks. Supports templates for python, javascript, typescript, go, rust, and generic projects.

Stars 45
Forks 28

Install this agent skill to your Project

npx add-skill https://github.com/rysweet/amplihack/tree/main/.claude/skills/pre-commit-manager

SKILL.md

Pre-Commit Manager Skill

Manage pre-commit hooks with preference memory and template-based configuration.

Operations

1. Install

Install pre-commit hooks in current repository.

Usage:

Install pre-commit hooks now

What it does:

  • Checks if .pre-commit-config.yaml exists
  • Verifies pre-commit binary is available
  • Runs pre-commit install
  • Reports success/failure

2. Configure

Generate .pre-commit-config.yaml from templates.

Usage:

Configure pre-commit with python template
Configure pre-commit with javascript template
Configure pre-commit with generic template

Templates:

  • python - Python projects (black, ruff, mypy)
  • javascript - JS/TS projects (prettier, eslint)
  • typescript - TypeScript projects
  • generic - Language-agnostic (trailing whitespace, file size, detect-secrets)

3. Enable

Set preference to "always" auto-install.

Usage:

Enable pre-commit auto-install

4. Disable

Set preference to "never" auto-install.

Usage:

Disable pre-commit auto-install

5. Status

Show current pre-commit status.

Usage:

Show pre-commit status
Check pre-commit status

Shows:

  • Git repository status
  • Config file existence
  • Hooks installation status
  • Current preference setting
  • Pre-commit binary availability

6. Baseline

Generate .secrets.baseline for detect-secrets.

Usage:

Generate secrets baseline
Create detect-secrets baseline

Implementation

This skill interfaces with:

  • .claude/tools/amplihack/hooks/precommit_prefs.py - Preference management
  • .claude/tools/amplihack/hooks/precommit_installer.py - Hook installation
  • Templates in templates/ directory

Security

  • Path traversal prevention
  • Template whitelist validation
  • No shell=True in subprocess calls
  • Subprocess timeouts enforced

Reference

Based on: https://gist.github.com/MangaD/6a85ee73dd19c833270524269159ed6e#4-installing-and-setting-up-pre-commit

Expand your agent's capabilities with these related and highly-rated skills.

rysweet/amplihack

chemist-analyst

Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.

45 28
Explore
rysweet/amplihack

learning-path-builder

Creates personalized learning paths for technologies, frameworks, or concepts. Use for user-interactive session only for onboarding new technologies, hackathon skill-building, or personal development planning. Not for use in automated development or investigation. Sequences resources (docs, tutorials, exercises) based on current skill level and learning goals. Adapts to learning style: hands-on, theory-first, project-based.

45 28
Explore
rysweet/amplihack

gh-work-report

Generates comprehensive GitHub activity reports across all authenticated accounts. Gathers repos, PRs, features, and themes for configurable time periods (1/5/7/30/90 days). Produces shareable markdown with tables, mermaid charts, and executive summaries. Can create a private repo with GitHub Actions automation and GitHub Pages aggregation site. Use when: "github report", "work report", "activity summary", "what did I work on", "gh-work-report", "show my github activity".

45 28
Explore
rysweet/amplihack

pr-review-assistant

Philosophy-aware PR reviews checking alignment with amplihack principles. Use when reviewing PRs to ensure ruthless simplicity, modular design, and zero-BS implementation. Suggests simplifications, identifies over-engineering, verifies brick module structure. Posts detailed, constructive review comments with specific file:line references.

45 28
Explore
rysweet/amplihack

code-smell-detector

Identifies anti-patterns specific to amplihack philosophy. Use when reviewing code for quality issues or refactoring. Detects: over-abstraction, complex inheritance, large functions (>50 lines), tight coupling, missing __all__ exports. Provides specific fixes and explanations for each smell.

45 28
Explore
rysweet/amplihack

biologist-analyst

Analyzes living systems and biological phenomena through biological lens using evolution, molecular biology, ecology, and systems biology frameworks. Provides insights on mechanisms, adaptations, interactions, and life processes. Use when: Biological systems, health issues, evolutionary questions, ecological problems, biotechnology. Evaluates: Function, structure, heredity, evolution, interactions, molecular mechanisms.

45 28
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results