agentleFS
christofferbergjchristofferbergj/agent-skills/skills/engineering/setup-pre-commit/SKILL.md

setup-pre-commit

Skill1 starsChanged 21 days agoMITView on GitHub

Set up commit-time formatting, type checking, and tests using the repository's existing tools. Use when adding pre-commit hooks, configuring Husky or lint-staged, or changing commit checks.

124 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use migrate-to-shoehorn, writing-beats and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • simo97Skill

    migrate-to-shoehorn

    Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

    Also in 73 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 63 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 63 projects that use this

  • simo97Skill

    edit-article

    The user will invoke this skill to help them edit an article.

    Also in 38 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 39 projects that use this

  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 6 projects that use this

  • +3 more from simo97
  • +1 more from Lesani

The file

Files
SKILL.md

Set up commit checks

  1. Inspect the package manager, runtime versions, existing hooks, formatter, linter, and umbrella check commands. Invoke /linting-alignment when tool ownership is unclear. Complete when the current toolchain and requested hook boundary are known.
  2. Reuse the repository's formatter and existing hook manager. Add Husky and lint-staged only when they fit the project and are missing; install development dependencies through its package manager. Preserve existing prepare scripts and hooks. When the repo has no hook manager, staged-file runner, or formatter, follow the default Husky setup for the missing parts. Complete when one owner exists for each check and unrelated configuration is unchanged.
  3. Wire staged-file checks and the appropriate existing type/test checks using the project's commands. A repo using Oxfmt, Biome, or another formatter keeps it; Prettier is not an installation prerequisite. Avoid testing only staged fragments when the check requires the full project. Complete when the hook runs the requested checks without duplicating the toolchain.
  4. Validate syntax and exercise the hook against a harmless isolated or already-authorized change. Preserve the initial staging state and report absent checks rather than inventing scripts. Commit only the scoped result when authorized. Complete when the hook has observed evidence and each changed configuration has a known owner.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.