presetter

Sets up, migrates, and troubleshoots TypeScript projects using Presetter configuration-as-code presets.

4|1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/alvis/.agents --skill presetter-alvis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: presetter
Source: https://github.com/alvis/.agents/tree/main/plugins/coding/skills/presetter
Command: npx skills add https://github.com/alvis/.agents --skill presetter-alvis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? TypeScript projects accumulate copied tool configuration (tsconfig, eslint, vitest) that drifts out of sync across packages and repositories. This Skill manages Presetter, a configuration-as-code layer where a checked-in preset stack generates all tool configs from one durable source, eliminating hand-maintained duplicates and split ownership. ## Core Features & Use Cases - Ownership resolution: Locates the closest presetter.config.* for an exact target and follows only explicit imports and extends, never assuming ancestor composition. - Setup and migration: Adopts Presetter for standalone or monorepo projects, migrates handwritten configs into preset stacks without losing intent, and upgrades legacy Presetter consumers. - Customization and troubleshooting: Composes variables, scripts, assets, and late overrides; diagnoses wrong-target bootstrap, missing assets, shadowed scripts, and recurring generated diffs. - Use Case: A monorepo package's generated tsconfig.json keeps reappearing in git status. The Skill traces the closest config, moves the intent into the preset stack, adds the path to the Presetter-owned ignore asset, and verifies regeneration. ## Quick Start Ask the assistant to set up Presetter for this TypeScript project or to diagnose why a generated config keeps changing.

Frequently Asked Questions about presetter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Presetter in a TypeScript project?

Install presetter and the preset packages matching your project shape, such as preset-esm and preset-node for a Node ESM app. Add a presetter.config.ts extending those presets, add package.json delegate scripts, then run bootstrap and verify build, lint, typecheck, and tests.

How do I migrate existing handwritten config files to Presetter?

Encode every deliberate setting from tracked configs into preset variables, scripts, assets, or overrides before deleting anything. Bootstrap, compare generated output against the preserved baseline, add generated paths to the ignore asset, and only then untrack the old files.

Which preset stack should I use for my project type?

Match the stack to the project shape: esm for a plain ESM library, esm plus node for a Node app, next for a Next application, and monorepo plus node plus esm for a workspace root. Do not redundantly add presets that a top-level preset already composes.

Why does Presetter bootstrap overwrite my handwritten config file?

Bootstrap overwrites every asset path it generates and never merges with files on disk. Restore the tracked file, encode its intent in the preset or an override, verify the regenerated result matches, and only then untrack the original.

Why does my local package.json script override the preset task?

Local package.json scripts intentionally shadow preset tasks at runtime, so a same-named local script wins as the task entry. Run the task with the --template flag to compare against the preset version, and remove the local script if the shadowing was accidental.

Does a root presetter.config.ts automatically apply to all packages?

Only packages without a closer config inherit the root through nearest-config lookup. A package with its own config stands alone unless it explicitly imports the root config and lists it in extends.