Skip to main content
skill CX Codex

setup · tartinerlabs — Claude Code skill: linters, formatters and git hooks

Reads the project manifest, picks the language, and fills in the missing tooling: linter, formatter, git hooks, type checking, secret scanner.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tartinerlabs/skills --skill setup -a claude-code
Open on GitHub

What setup does

The skill looks at the manifest and routes by ecosystem. JS/TS goes through package.json, Python through pyproject.toml or requirements*.txt, Go through go.mod, Rust through Cargo.toml. Only the matching guide loads, not the whole set.

Before installing anything it scans for existing config: biome.json, a .husky/ directory, a commitlint config, a lint-staged key, tsconfig.json. Whatever it finds stays untouched, and the final summary lists what was skipped. Package manager detection walks the lockfiles, but a packageManager or devEngines.packageManager field in package.json outranks them. For pnpm the skill advises pinning an exact version in devEngines rather than a range in .nvmrc.

The stack is opinionated on purpose: Biome instead of ESLint plus Prettier, conventional commits, Husky. You can decline any tool, and a deliberately configured alternative is kept rather than swapped. Secret scanning is set up in every ecosystem — GitLeaks by default, TruffleHog accepted. For a language outside the list, say Ruby, first-class support is not bundled: the skill wires the standard formatter and the scanner into a pre-commit hook the same way.

What it helps with

  • set up linting and formatting in a fresh project
  • add pre-commit hooks without breaking existing ones
  • wire conventional commits through commitlint
  • turn on type checking in a JS/TS project
  • hook a secret scanner into git

Example prompts for the agent

  • set up tooling in this project
  • add a linter and formatter, detect the language yourself
  • install git hooks and a secret scanner

How to install setup

1Skills CLI (Vercel)

npx skills add tartinerlabs/skills --skill setup -a claude-code

2Manually: put the files in place

~/.claude/skills/setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about setup

How do I install setup in Claude?

Run npx skills add tartinerlabs/skills --skill setup -a claude-code. The skill lands at ~/.claude/skills/setup/SKILL.md.

What does setup do?

It detects the project language from its manifest and installs what is missing: linter, formatter, git hooks, type checking, secret scanner. Tools already configured are skipped.

Which languages does it support?

JS/TS is best supported, with separate guides for Python, Go and Rust. For other languages it sets up the standard formatter and the secret scanner, without promising first-class support.

Source text

SKILL.md · MIT
---
name: setup
description: Use when setting up a project, adding linting, formatting, git hooks, or type checking. Detects the language and installs that ecosystem's lint/format/hooks toolchain (JS/TS, Python, Go, Rust).
license: MIT
allowed-tools: Read Glob Write Edit Bash(nub:*) Bash(nubx:*) Bash(pnpm:*) Bash(pnx:*) Bash(npx:*) Bash(bunx:*) Bash(npm:*) Bash(bun:*) Bash(yarn:*) Bash(uv:*) Bash(poetry:*) Bash(pdm:*) Bash(pip:*) Bash(ruff:*) Bash(mypy:*) Bash(go:*) Bash(gofmt:*) Bash(goimports:*) Bash(golangci-lint:*) Bash(cargo:*) Bash(rustfmt:*) Bash(rustup:*) Bash(pre-commit:*) Bash(gitleaks:*) Bash(trufflehog:*)
model: haiku
effort: low
compatibility: Any language project; sets up that ecosystem's lint/format/hooks + a git secret scanner (GitLeaks default; TruffleHog accepted) (JS/TS best-supported, Python, Go and Rust via references/)
metadata:
  short-description: Lint, format, and git hook setup.
---

You are a tooling setup assistant. Detect the project's language, then auto-detect what's missing and install everything that's not already configured for that ecosystem.

## 0. Detect Language and Route

Detect the project's language from its manifest, then follow the matching setup guide:

| Language | Detected by | Setup guide |
|----------|-------------|-------------|
| **JS/TS** | `package.json` | the `rules/*.md` files below (Biome · Husky · commitlint · lint-staged · GitLeaks · TypeScript) |
| **Python** | `pyproject.toml`, `requirements*.txt`, `setup.py`, `setup.cfg` | `references/python.md` (Ruff · mypy · pre-commit · GitLeaks) |
| **Go** | `go.mod` | `references/go.md` (gofmt · golangci-lint · pre-commit · GitLeaks) |
| **Rust** | `Cargo.toml` | `references/rust.md` (rustfmt · Clippy · pre-commit · GitLeaks) |

Load **only** the guide for the detected language. For a language not listed (e.g. Ruby), set up its standard formatter/linter and wire the project's secret scanner into a pre-commit hook, following the same shape; note that first-class support for it is not yet bundled. A secret scanner (GitLeaks default; TruffleHog accepted) is set up in **every** ecosystem — it is cross-language.

The rest of this file (Steps 1-5) is the **JS/TS** path. For Python, Go or Rust, follow the referenced guide, then jump to Step 5 (Supply Chain Hardening) which applies to any ecosystem.

## 1. Detect Package Manager

Detect the package manager from the lockfile, in this order: `nub.lock`, `pnpm-lock.yaml`, `bun.lock`/`bun.lockb`, `yarn.lock`, `package-lock.json`. With no lockfile, ask.

A `devEngines.packageManager` or `packageManager` field in `package.json` outranks any lockfile. For pnpm, prefer `devEngines.packageManager` over `packageManager`: pnpm 11+ and the `pnpm/setup` action read it first, and pnpm records the resolved version in `pnpm-lock.yaml`. Pin an exact version rather than a range, so every machine and CI run uses the same pnpm — resolve the current latest at setup time (`pnpm view pnpm version`) and write it as `{ "name": "pnpm", "version": "<latest>", "onFail": "download" }`. The same goes for the runtime: declare Node in `devEngines.runtime` (pnpm 10.14+ downloads it and records its checksum in the lockfile) rather than `.nvmrc` or `engines.node`, pinned to the current LTS resolved at setup time — `pnpm runtime set node lts` (pnpm 11.4+) writes the field; confirm the saved `version` is exact, not a range. Write that field when declaring pnpm; migrating a legacy `"packageManager": "pnpm@…"` is worthwhile but optional. Keep one declaration, not both — version switchers refuse a project whose two fields disagree. Yarn still needs `packageManager`, the only field it reads. Nub runs in compat-mode over another manager's lockfile, so `nub.lock` alongside `pnpm-lock.yaml` means nub — check the field before concluding from lockfiles alone.

Rule files use two placeholders. Replace `<pm>` with the detected manager and `<pmx>` with that manager's ephemeral package runner:

| Detected PM | `<pm>` | `<pmx>` |
|-------------|--------|---------|
| nub | `nub` | `nubx` |
| pnpm | `pnpm` | `pnx` |
| bun | `bun` | `bunx` |
| npm | `npm` | `npx` |
| yarn (v2+) | `yarn` | `yarn dlx` |
| yarn (v1) | `yarn` | `npx` |

Detect yarn version: `.yarnrc.yml` present → v2+; only `.yarnrc` or neither → v1.

Never write one manager's runner into another manager's project — a `pnx` line in a bun project's git hook fails at commit time, and it bypasses the store integrity and registry config that the project's real manager enforces.

## 2. Detect Existing Tooling

Before installing anything, scan for existing configurations:
- `biome.json` / `biome.jsonc` → Biome already configured
- `.husky/` directory → Husky already configured
- commitlint config listed in `rules/commitlint.md` → commitlint already configured
- `.lintstagedrc*` / `lint-staged` key in `package.json` → lint-staged already configured
- `gitleaks` or `trufflehog` in `.husky/pre-commit` → secret scanner already configured
- `tsconfig.json` → TypeScript already configured
- `.eslintrc*` / `eslint.config.*` → ESLint present (suggest migration to Biome)
- `.prettierrc*` / `prettier.config.*` → Prettier present (suggest migration to Biome)

**Skip tools that are already configured.** Report what was skipped at the end.

## 3. Install Tools

Read each rule file for detailed setup instructions and config files.

> **This stack is opinionated by design.** Tooling choices are subjective — Biome vs ESLint/Prettier, conventional commits vs none, Husky vs another hook manager are all legitimate positions. Each rule file documents its choice under `### Why This Matters` and names the mainstream alternative under `### Alternatives`. Two principles: you may decline any tool, and a deliberately-configured alternative is **kept, not swapped** — Step 2's detection exists so the skill fills genuine gaps rather than overriding working setups. Secret scanning is the one thing recommended for every project (GitLeaks default; TruffleHog accepted); only the scanner is swappable, not whether to scan.

### Auto-install (always set up when missing)

| Tool | Purpose | Rule |
|------|---------|------|
| Biome | Linting + formatting | `rules/biome.md` |
| Husky | Git hooks | `rules/husky.md` |
| commitlint | Conventional commits | `rules/commitlint.md` |
| lint-staged | Pre-commit linting | `rules/lint-staged.md` |
| Secret scanner | Secrets detection | `rules/secret-scanner.md` |
| TypeScript | Type checking | `rules/typescript.md` |

### Opt-in (only when explicitly requested)

| Tool | Purpose | Rule |
|------|---------|------|
| semantic-release | Automated versioning | `rules/semantic-release.md` |

## 4. Output Summary

After all tools are installed, display a summary:

```
## Setup Complete

### Installed
- [list of tools installed]

### Skipped (already configured)
- [list of tools skipped with reason]

### Next Steps
- Run `<pm> run check` to verify Biome is working
- Make a test commit to verify git hooks
```

## 5. Supply Chain Hardening

After tooling setup is complete, check if the `deps` skill is available by looking for `skills/deps/SKILL.md` relative to this skill's directory. If it exists, run `/deps` to harden the ecosystem's dependency supply chain (it detects the language too). If it does not exist, skip this step silently.

Requires git initialised in the project, and a secret scanner installed on the system (`brew install gitleaks` or equivalent) — it is wired into the pre-commit hook in every ecosystem.

© tartinerlabs · MIT · tartinerlabs/skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

setup by other authors comes first.

setup Alireza Rezvani Sets up an autoresearch experiment by collecting its target file, evaluation command, metric, and optimization direction. Use it before starting an optimization loop. 1,480installs setup aws This skill kicks off the connection setup for AWS DevOps Agent and AWS Security Agent. Reach for it when MCP tools go missing or you are wiring the toolkit up for the first time. CX Codex +1 1,500installs setup marketcalls Sets up a Python backtesting environment with VectorBT and OpenAlgo. It configures the virtual environment, installs dependencies, and prepares .env. CX Codex +1 2,000installs setup nimbalyst Creates a project wiki with a populated Home page, starter sections and a writing guide. Useful when a team needs documentation it can actually read and navigate. CX Codex +1 ★ 1,971repo stars ultracite haydenbleasel The ultracite skill sets up linting and formatting for JS/TS projects through Oxlint, Biome or ESLint with one command. CX Codex +1 11,400installs eslint-prettier-config patricio0312rev Sets up ESLint and Prettier in a TypeScript and React project: configs, rules, scripts and a pre-commit hook. CX Codex +1 1,100installs create-hook NeoLabHQ The skill scans your project and suggests hooks for your stack: type checks, formatting, linting, tests. Then it writes the script and tests it. CX Codex +1 1,200installs qlty-check parcadei Runs qlty CLI over your code: linters, auto-fix, formatting and complexity metrics. Handy before a commit or a handoff. CX Codex +1 484installs mcore-linting-and-formatting Philip Petrakian Sets up linting and code formatting for Megatron-LM projects. It helps fix ruff and mypy violations and sort imports before opening a pull request. CX Codex +1 1,800installs biome Claude MPM Team A skill that tells the agent how to run Biome on your project: linting, formatting and import sorting from a single command. CX Codex +1 927installs

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor