modern-tooling
БесплатноБез исполняемых скриптовНе проверенOpinionated tooling and conventions for modern JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier, monorepos…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Modern Tooling & Standards
This skill provides a comprehensive guide to setting up and maintaining modern JavaScript and TypeScript projects. It covers coding practices, tooling choices, and configuration standards to ensure high code quality and developer productivity.
Coding Practices
Code Organization
- Single Responsibility: Each source file should have a clear, focused scope.
- Modularization: Break large files into smaller, manageable modules.
- Type Separation: Define types and interfaces in dedicated
types.tsfiles ortypes/directories. - Constants: Centralize constants in
constants.tsto avoid magic numbers/strings.
Runtime Environment
- Isomorphic Code: Strive for runtime-agnostic code that works across Node.js, browsers, and workers.
- Environment Indicators: Explicitly mark environment-specific code with comments:
// @env node // @env browser
TypeScript Best Practices
- Explicit Returns: Declare return types for functions to improve readability and catch errors early.
- Type Definitions: Avoid complex inline types; extract them into named
typeorinterfacedefinitions. - Strict Mode: Always enable
strict: trueintsconfig.json.
Testing (Vitest)
- Co-location: Place test files next to source files (e.g.,
foo.ts→foo.test.ts). - BDD Style: Use
describeanditfor structuring tests. - Snapshots: Use
toMatchSnapshotfor complex object verification andtoMatchFileSnapshotfor large text outputs.
Tooling Stack
Package Management (ni)
We recommend using ni (npm i) to automatically detect and use the correct package manager (pnpm, yarn, npm).
| Command | Description | Equivalent (pnpm) |
|---|---|---|
ni |
Install dependencies | pnpm i |
ni <pkg> |
Add dependency | pnpm add <pkg> |
ni -D <pkg> |
Add dev dependency | pnpm add -D <pkg> |
nr <script> |
Run script | pnpm run <script> |
nu |
Upgrade dependencies | pnpm update |
nun <pkg> |
Uninstall dependency | pnpm remove <pkg> |
nci |
Clean install | pnpm i --frozen-lockfile |
TypeScript Configuration
Recommended tsconfig.json base:
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}
Linting & Formatting
We use a unified ESLint configuration that handles both linting and formatting (replacing Prettier).
export default standardConfig();
Workflow: Run nr lint --fix to automatically format code and fix issues.
Git Hooks
Automate checks before commit using simple-git-hooks and lint-staged.
{
"simple-git-hooks": {
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
},
"lint-staged": { "*": "eslint --fix" },
"scripts": {
"prepare": "npx simple-git-hooks"
}
}
Monorepo Management (pnpm)
Use pnpm-workspace.yaml with named catalogs for consistent dependency versions across packages.
| Catalog | Purpose |
|---|---|
prod |
Production dependencies (runtime) |
dev |
Development tools (build, test, lint) |
frontend |
Frontend-specific libraries (React, Vue) |
References
| Topic | Description | Reference |
|---|---|---|
| ESLint Config | Detailed rules and editor setup | eslint-config |
| Project Setup | .gitignore, CI/CD, VS Code settings | setting-up |
| App Development | Patterns for Vue/Nuxt/React apps | app-development |
| Library Development | Bundling, publishing, ESM support | library-development |
| Monorepo | Workspace structure and tooling | monorepo |
Установить modern-tooling в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(ni, nr, nu)Вложенные файлы
FAQ
Что делает скилл modern-tooling?
Opinionated tooling and conventions for modern JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier, monorepos, library publishing, or establishing coding standards.
Как установить скилл modern-tooling?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл modern-tooling запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic