— No reviews yet
0 installs
5 views
0.0% view→install
Install
$ agentstack add skill-andrewsrigom-agent-skills-setup-pre-commit ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Are you the author of Setup Pre Commit? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claimAbout
Setup Pre-Commit
Use this skill when the user wants commit-time checks without overloading the hook.
Scope
- Husky setup
- lint-staged configuration
- Prettier or existing formatter integration
- package-manager-aware hook commands
- choosing what belongs in pre-commit versus CI
Default path
- Detect the package manager and current scripts.
- Install the minimum hook dependencies.
- Initialize Husky if the repo does not already use it.
- Configure
lint-stagedfor staged-file formatting or linting. - Keep the pre-commit hook fast:
- staged formatting or linting first
- lightweight checks second
- heavy suites in CI unless the repo explicitly wants them locally
- Verify the hook against the current scripts instead of inventing missing commands.
When to deviate
- Keep the hook even smaller when the repo already struggles with slow local tooling.
- Add more checks only if the repo already runs them reliably and the team explicitly wants them before commit.
- Skip formatter or lint changes if the repo already has a working hook stack that only needs a small fix.
Guardrails
- Do not add
typecheckortestto the hook if the repo does not already support them cleanly. - Prefer staged-file checks over whole-repo checks in pre-commit.
- Keep the hook deterministic and package-manager-aware.
- Do not introduce a formatter config if the repo already has one.
Avoid
- turning pre-commit into a slow mini-CI pipeline
- inventing scripts the repo does not actually have
- running whole-repo checks when staged-file checks are enough
- overwriting an existing formatter setup without reason
Verification checklist
- the package manager and current scripts were detected first
- hook commands are fast enough for normal commit flow
- checks operate on staged files where possible
- CI-only work stays out of pre-commit unless explicitly desired
- the hook matches the repo's real tooling, not imagined tooling
Output Shape
When answering with this skill, prefer:
- packages to install
- files to create or update
- exact hook content
- what should stay in CI instead
Good Triggers
- pre-commit, Husky, lint-staged, commit hooks, run formatter on commit
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: andrewsrigom
- Source: andrewsrigom/agent-skills
- License: MIT
- Homepage: https://andrewsrigom.github.io/agent-skills/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.