其他

konsistent-config

vercel-labs/konsistent

Create or modify a konsistent.json configuration file that enforces structural conventions in a TypeScript codebase. Use when the user wants to enforce consistent code structure, validate exports/imports across files, ensure directories contain required files, enforce naming patterns, add/remove/update convention rules, configure case map overrides for acronyms or special casing (kebabToPascalMap, kebabToCamelMap), or troubleshoot why konsistent is reporting violations. Triggers on: "konsistent", "konsistent.json", "enforce conventions", "structural consistency", "consistent exports", "consistent structure", "code conventions config", "add convention", "update convention", "fix konsistent errors", "case map", "case override", "acronym casing".

  • 2555 次安装
  • 193 星标
  • 收录于

安装命令

npx skills add https://github.com/vercel-labs/konsistent --skill konsistent-config

SKILL.md

konsistent Configuration

Create or modify a konsistent.json file that enforces structural conventions for the project. The konsistent CLI checks filesystem structure and TypeScript exports/imports — it is not a style linter.

Core Objective

Important reminder: DO NOT write a konsistent.json file that leads to zero errors when running the konsistent check. That would defeat the purpose. The objective is to create a konsistent.json file that identifies violations to patterns used in the codebase, even if they are not being 100% adhered to. Add conventions based on dominant patterns in the codebase, even if other instances violate those patterns.

Treat the existing codebase as evidence from which to infer conventions, not as a specification that every convention must accept. Existing files that do not follow a dominant pattern are expected findings, not proof that the convention is wrong.

A successful configuration can make konsistent exit with violations. The violations are the intended audit output. Only konsistent validate is expected to pass without errors.

Workflow

1. Setting Up The konsistent CLI (only if not set up yet)

Check if the konsistent package is already installed: