Agent skill

Setup Pre Commit

by fossasia in fossasia/eventyay-interpretation

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.

Apache-2.0Auto-check passedDevelopment

Install Setup Pre Commit

skills CLI
$ npx skills add fossasia/eventyay-interpretation --skill setup-pre-commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install fossasia/eventyay-interpretation setup-pre-commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/fossasia/eventyay-interpretation.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/setup-pre-commit .claude/skills/setup-pre-commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-pre-commit
GitHub stars
1.6k
Used in
12 other repos
Token cost
~565 tokens
SKILL.md length
212 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
Apache-2.0

At a glance

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.

  • Works in 8 steps: Detect package manager → Install dependencies → Initialize Husky → …
  • User wants to add pre-commit hooks
  • SKILL.md covers What This Sets Up, Steps and Notes
  • Calls npx, npm and prettier

What it does

Setup Pre Commit is an agent skill from fossasia/eventyay-interpretation. 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.

Its SKILL.md is about 570 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting and Type safety. It works with Prettier and npm. The repository describes itself as: A plugin for live interpretation of video streams. The licence is Apache-2.0.

When your agent uses it

  • User wants to add pre-commit hooks
  • Configure lint-staged
  • Add commit-time formatting/typechecking/testing

Example prompts

  • “/setup-pre-commit”

Requirements

  • Node.js

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Detect package manager
  2. Install dependencies
  3. Initialize Husky
  4. Create .husky/pre-commit
  5. Create .lintstagedrc
  6. Create .prettierrc (if missing)
  7. Verify
  8. Commit

What it can do on your machine

Read from SKILL.md and the folder at commit 1ca0139. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • prettier

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Pre Commit loads about 565 tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 212 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~565

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from fossasia/eventyay-interpretation at commit 1ca0139, republished under its Apache-2.0 licence (© fossasia). 212 words, ~565 tokens.

Download SKILL.mdSave it as .claude/skills/setup-pre-commit/SKILL.md (or your agent's skills folder).
name
setup-pre-commit
description
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.

Setup Pre-Commit Hooks

What This Sets Up

  • Husky pre-commit hook
  • lint-staged running Prettier on all staged files
  • Prettier config (if missing)
  • typecheck and test scripts in the pre-commit hook

Steps

1. Detect package manager

Check for package-lock.json (npm), pnpm-lock.yaml (pnpm), yarn.lock (yarn), bun.lockb (bun). Use whichever is present. Default to npm if unclear.

2. Install dependencies

Install as devDependencies:

husky lint-staged prettier
3. Initialize Husky
bash
npx husky init

This creates .husky/ dir and adds prepare: "husky" to package.json.

4. Create .husky/pre-commit

Write this file (no shebang needed for Husky v9+):

npx lint-staged
npm run typecheck
npm run test

Adapt: Replace npm with detected package manager. If repo has no typecheck or test script in package.json, omit those lines and tell the user.

5. Create .lintstagedrc
json
{
  "*": "prettier --ignore-unknown --write"
}
6. Create .prettierrc (if missing)

Only create if no Prettier config exists. Use these defaults:

json
{
  "useTabs": false,
  "tabWidth": 2,
  "printWidth": 80,
  "singleQuote": false,
  "trailingComma": "es5",
  "semi": true,
  "arrowParens": "always"
}
7. Verify
  • .husky/pre-commit exists and is executable
  • .lintstagedrc exists
  • prepare script in package.json is "husky"
  • prettier config exists
  • Run npx lint-staged to verify it works
8. Commit

Stage all changed/created files and commit with message: Add pre-commit hooks (husky + lint-staged + prettier)

This will run through the new pre-commit hooks — a good smoke test that everything works.

Notes

  • Husky v9+ doesn't need shebangs in hook files
  • prettier --ignore-unknown skips files Prettier can't parse (images, etc.)
  • The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests

© fossasia, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/setup-pre-commit of fossasia/eventyay-interpretation.

Open the folder on GitHubat commit 1ca0139

Used in 13 other repositories

We found 17 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 12 other GitHub owners. This page covers the copy in fossasia/eventyay-interpretation, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Setup Pre Commit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Pre Commit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Pre Commit this skillfossasia/eventyay-interpretation1.6k12 repos~565Automated safety check: PassApache-2.0
Hook Commitsdanielvm-git/bigpowers256—~623Automated safety check: PassMIT
Setup Pre Commitvinvcn/mattpocock-skills-zh-CN4.6k—~463Automated safety check: PassMIT
Git PR Workflowandymai/brepjs114—~2.9kAutomated safety check: PassApache-2.0
Setup Pre Commitdevcxl/mattpocock-skills-zh433—~412Automated safety check: PassMIT
Static Code Analysis Typescriptjaktestowac/awesome-copilot-for-testers116—~4.2kAutomated safety check: PassMIT

Similar skills

  • Hook Commits

    danielvm-git/bigpowers

    Set up pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.

    256 GitHub stars~623 tokensUpdated 16 days ago
    DevelopmentAuto-check passed
  • Setup Pre Commit

    vinvcn/mattpocock-skills-zh-CN

    在当前仓库设置 Husky pre-commit hooks,集成 lint-staged (Prettier)、类型检查和测试。适用于用户想添加 pre-commit hooks、设置 Husky、配置 lint-staged,或在提交时运行格式化、类型检查和测试时。

    4.6k GitHub stars~463 tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Git PR Workflow

    andymai/brepjs

    This skill should be used when committing, pushing, branching, or merging in the brepjs repository — when a task involves "pre-commit hook failed" (which tier ran, how to bypass), "commit rejected…

    114 GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Setup Pre Commit

    devcxl/mattpocock-skills-zh

    在当前仓库中设置 Husky pre-commit 钩子,集成 lint-staged(Prettier)、类型检查和测试。当用户想要添加 pre-commit 钩子、设置 Husky、配置 lint-staged、或添加提交时的格式化/类型检查/测试时使用。

    433 GitHub stars~412 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Static Code Analysis Typescript

    jaktestowac/awesome-copilot-for-testers

    Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky…

    116 GitHub stars~4.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • A playbook for fixing ESLint and TypeScript errors in the OpenObserve web frontend, with rule-by-rule guidance and typing conventions.

    22k GitHub stars~5.1k tokensUpdated today
    DevelopmentAuto-check passed

More from fossasia/eventyay-interpretation

All 41 skills in this repo
  • Git Guardrails Claude Code

    fossasia/eventyay-interpretation

    Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute.

    1.6k GitHub starsUsed in 12 repos~578 tokens
    Auto-check passed
  • Codebase Design

    fossasia/eventyay-interpretation

    Shared vocabulary for designing deep modules. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 35 repos~1.5k tokens
    Auto-check passed
  • Diagnosing Bugs

    fossasia/eventyay-interpretation

    Diagnosis loop for hard bugs and performance regressions. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 31 repos~2.1k tokens
    Auto-check passed
  • Domain Modeling

    fossasia/eventyay-interpretation

    Build and sharpen a project's domain model. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 29 repos~821 tokens
    Auto-check passed
  • TDD

    fossasia/eventyay-interpretation

    Test-driven development. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 28 repos~1.1k tokens
    Auto-check passed
  • Improve

    fossasia/eventyay-interpretation

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute.

    1.6k GitHub starsUsed in 10 repos~3.7k tokens
    Auto-check: warnings

Works with

Categories

Questions about Setup Pre Commit

What does Setup Pre Commit do?

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Setup Pre Commit is an agent skill from fossasia/eventyay-interpretation. Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo.

When should I use Setup Pre Commit?

Setup Pre Commit fits situations like: user wants to add pre-commit hooks; configure lint-staged; add commit-time formatting/typechecking/testing.

How do I install Setup Pre Commit in Claude Code?

Run `npx skills add fossasia/eventyay-interpretation --skill setup-pre-commit -a claude-code`. Or copy the skill folder (.agents/skills/setup-pre-commit in fossasia/eventyay-interpretation) into .claude/skills/setup-pre-commit in your project. Claude Code loads it when a task matches its description.

How do I install Setup Pre Commit in Codex?

Run `npx skills add fossasia/eventyay-interpretation --skill setup-pre-commit -a codex`. Or copy the skill folder (.agents/skills/setup-pre-commit in fossasia/eventyay-interpretation) into .agents/skills/setup-pre-commit in your project. Codex loads it when a task matches its description.

Can I use Setup Pre Commit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fossasia/eventyay-interpretation --skill setup-pre-commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-pre-commit, .gemini/skills/setup-pre-commit, .github/skills/setup-pre-commit and .opencode/skills/setup-pre-commit in your project.

What does Setup Pre Commit need to run?

Going by SKILL.md and its folder, Setup Pre Commit needs the command-line tools its instructions call (npx, npm and prettier). Our summary lists: Node.js.

Does Setup Pre Commit access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Setup Pre Commit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Setup Pre Commit use?

Setup Pre Commit is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Pre Commit use?

About 565 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Pre Commit?

Skills that share tags, products or a category with Setup Pre Commit: Hook Commits (danielvm-git/bigpowers, 256 stars), Setup Pre Commit (vinvcn/mattpocock-skills-zh-CN, 4.6k stars), Git PR Workflow (andymai/brepjs, 114 stars) and Setup Pre Commit (devcxl/mattpocock-skills-zh, 433 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Pre Commit?

fossasia (a GitHub organization) maintains it in fossasia/eventyay-interpretation, which has 1,552 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 5, 2026.

Source: fossasia/eventyay-interpretation on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.