Token导航 LogoToken导航

Agent Skill · 研究检索

typescript-backend-project-setup(TypeScript backend project 设置)

typescript-backend-project-setup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

typescript-backend-project-setup 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,510。

总安装 449周安装 18GitHub Stars 305下载 145核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:typescript-backend-project-setup(TypeScript backend project 设置)
来源仓库:https://github.com/ntcoding/claude-skillz
仓库路径:skills/typescript-backend-project-setup
安装命令:
npx skills add https://github.com/ntcoding/claude-skillz --skill typescript-backend-project-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ntcoding/claude-skillz --skill typescript-backend-project-setup

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

使用 NX monorepo 架构搭建类型安全的 TypeScript 后端工程。提供严格 linting、100% 测试覆盖率与智能缓存机制。内置 AI 防护层阻止危险命令误执行。typescript-backend-project-setup 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

适用于大型团队协作与微服务拆分项目初始化。需预先安装 NX CLI 并理解 workspace 目录结构约定。

来源仓库内路径:skills/typescript-backend-project-setup

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ntcoding/claude-skillz --skill typescript-back…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

typescript-backend-project-setup 怎么安装?

在终端执行 npx skills add https://github.com/ntcoding/claude-skillz --skill typescript-backend-projec…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

typescript-backend-project-setup 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

typescript-backend-project-setup 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

typescript-backend-project-setup 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

typescript-backend-project-setup 用的人多吗?

公开数据是累计安装 449 次,近一周安装 18 次,下载 145 次,GitHub 305 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

typescript-backend-project-setup 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
typescript-backend-project-setup

TypeScript backend project 设置 · 本页

449305需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

NX Monorepo TypeScript Backend Project Setup

🚨 DO NOT USE PLAN MODE. This skill IS the plan. Follow the steps exactly as written.
⚠️ Check NX docs for latest conventions: https://nx.dev/docs/getting-started/start-new-project NX evolves quickly. Verify these instructions against current NX best practices before use.

Set up NX monorepo for TypeScript backend projects with maximum type safety, strict linting, 100% test coverage, and AI-optimized project structure.

Contents

  1. Phase 1: Define Project Context - Gather requirements
  2. Phase 2: Create NX Workspace - Run NX generator
  3. Phase 3: Install Dependencies - Add plugins and tools
  4. Phase 4: Create Initial Projects - Generate packages and apps
  5. Phase 5: Add Claude Code Integration - Copy AI guardrails and docs
  6. Phase 6: Enforce Strict Standards - Patch configs
  7. Phase 7: Establish Coding Conventions - Add skill content
  8. Phase 8: Activate Git Hooks - Enable pre-commit checks
  9. Phase 9: Verify Setup - Confirm everything works
  10. Phase 10: Document Architecture - Optional interview

When This Activates

  • User requests: "set up typescript backend project", "create backend project", "initialize typescript backend", "create monorepo"
  • Working in an empty or near-empty project folder
  • User asks for backend project scaffolding or boilerplate

Template Location

This skill uses a template located at: typescript-backend-project-setup/template/

The template contains only files NX cannot create: Claude Code integration, documentation structure, and git hooks.

Before starting, ask the user for the full path to the claude-skillz repository so you can locate the template.

Setup Procedure

Phase 1: Define Project Context

Ask the user:

  1. Workspace name - What should this monorepo be called? (lowercase, hyphens ok)
  2. Domain description - Brief description of what this project does
  3. Claude-skillz path - What is the full path to the claude-skillz repository on your system?
  4. Target directory - Where should the project be created? (defaults to current directory)
  5. Initial packages - List any publishable packages to create (e.g., "query, builder, cli")
  6. Initial apps - List any applications to create (e.g., "api, docs")

Phase 2: Create NX Workspace

Priority: Commands > Installs > Patch files (last resort)

Run the NX workspace generator:

npx create-nx-workspace@latest [workspace-name] --preset=ts --pm=pnpm --nxCloud=skip --interactive=false

This creates:

  • nx.json - NX configuration
  • tsconfig.base.json - Base TypeScript config
  • package.json - Root package with NX scripts
  • pnpm-workspace.yaml - Workspace definition
  • .gitignore - Standard ignores

Patch.gitignore - Add test-output:

Add test-output to .gitignore (vitest coverage output):

test-output

Checkpoint: Verify nx report shows NX version.

Phase 3: Install Dependencies

Add testing and code quality tools:

# Add NX plugins
nx add @nx/vitest
nx add @nx/eslint
nx add @nx/node  # Required for creating applications

# Install testing dependencies
pnpm add -D vitest @vitest/coverage-v8

# Install ESLint dependencies (required for strict config)
pnpm add -D typescript-eslint @nx/eslint-plugin eslint-plugin-functional

# Install git hooks
pnpm add -D husky lint-staged

Adding @nx/vitest. Provides integrated test runner with coverage reporting.

Adding @nx/eslint. Provides consistent linting across all projects.

Adding @nx/node. Required for creating Node.js applications.

Adding husky and lint-staged. Provides pre-commit verification gate.

Phase 4: Create Initial Projects

If user specified packages in Phase 1, create them:

# For each package (publishable library with vitest)
nx g @nx/js:library packages/[pkg-name] --publishable --importPath=@[workspace-name]/[pkg-name] --bundler=tsc --unitTestRunner=vitest

If user specified apps in Phase 1, create them:

# For each app (node application - vitest NOT supported, use none)
nx g @nx/node:application apps/[app-name] --unitTestRunner=none

🚨 IMPORTANT:

  • @nx/js:library supports --unitTestRunner=vitest
  • @nx/node:application only supports --unitTestRunner=jest|none (NOT vitest)

After creating projects, run nx sync to update TypeScript project references.

Phase 5: Add Claude Code Integration

Copy template files (only what NX can't create):

Claude Code Integration:

cp -r [claude-skillz-path]/typescript-backend-project-setup/template/CLAUDE.md [target-directory]/
cp -r [claude-skillz-path]/typescript-backend-project-setup/template/AGENTS.md [target-directory]/
cp -r [claude-skillz-path]/typescript-backend-project-setup/template/.claude [target-directory]/

Adding CLAUDE.md. Provides AI context, commands, and project conventions.

Adding .claude/settings.json. Provides permission guardrails and hook configuration.

Adding .claude/hooks/block-dangerous-commands.sh. Prevents destructive git operations (--force, --hard, --no-verify).

Documentation Structure:

cp -r [claude-skillz-path]/typescript-backend-project-setup/template/docs [target-directory]/
cp [claude-skillz-path]/typescript-backend-project-setup/template/repository-setup-checklist.md [target-directory]/

Adding docs/conventions/. Provides coding standards and workflow documentation.

Adding docs/architecture/. Provides system design and domain terminology templates.

Adding docs/project/. Provides project vision and planning templates.

Git Hooks:

cp -r [claude-skillz-path]/typescript-backend-project-setup/template/.husky [target-directory]/

Adding .husky/pre-commit. Provides pre-commit verification (lint, typecheck, test).

Custom ESLint Rules:

cp -r [claude-skillz-path]/typescript-backend-project-setup/template/.eslint-rules [target-directory]/

Adding .eslint-rules/no-generic-names.js. Custom rule that bans generic names (utils, helpers, service, manager) in filenames and class names.

Make scripts executable:

chmod +x [target-directory]/.claude/hooks/block-dangerous-commands.sh

Replace placeholders in copied files:

PlaceholderReplace With
{{WORKSPACE_NAME}}User's workspace name
{{WORKSPACE_DESCRIPTION}}User's domain description
{{DOMAIN_NAME}}User's workspace name (used as context name in glossary)
{{DOMAIN_DESCRIPTION}}User's domain description

Files with placeholders:

  • CLAUDE.md
  • docs/conventions/codebase-structure.md
  • docs/architecture/domain-terminology/contextive/definitions.glossary.yml
  • docs/project/project-overview.md

Phase 6: Enforce Strict Standards

These patches add our strict standards to NX-generated configs.

Patch nx.json - Add lint dependency to build/test:

Add to targetDefaults.build.dependsOn:

"dependsOn": ["lint", "^build"]

Add to targetDefaults.test:

"dependsOn": ["lint"]

This ensures AI gets immediate lint feedback on any change.

Patch tsconfig.base.json - Add strict TypeScript flags:

Add these to compilerOptions:

{
  "noUncheckedIndexedAccess": true,
  "noImplicitOverride": true,
  "noFallthroughCasesInSwitch": true,
  "noPropertyAccessFromIndexSignature": true,
  "noUnusedLocals": true,
  "noUnusedParameters": true,
  "noImplicitReturns": true,
  "exactOptionalPropertyTypes": true,
  "verbatimModuleSyntax": true
}

Patch eslint.config.mjs - Add strict rules:

IMPORTANT: Completely overwrite eslint.config.mjs with this exact content (do not merge, do not patch - replace the entire file):

import nx from '@nx/eslint-plugin';
import tseslint from 'typescript-eslint';
import noGenericNames from './.eslint-rules/no-generic-names.js';

const customRules = {
  plugins: {
    custom: {
      rules: {
        'no-generic-names': noGenericNames,
      },
    },
  },
};

export default tseslint.config(
  ...nx.configs['flat/base'],
  ...nx.configs['flat/typescript'],
  ...nx.configs['flat/javascript'],
  {
    ignores: ['**/dist', '**/out-tsc', '**/node_modules', '**/.nx', '*.config.ts', '*.config.mjs', '*.config.js', 'vitest.workspace.ts'],
  },
  customRules,
  {
    files: ['**/*.ts', '**/*.tsx'],
    rules: {
      // Custom rule: no generic names
      'custom/no-generic-names': 'error',

      // No comments - forces self-documenting code
      'no-warning-comments': 'off',
      'multiline-comment-style': 'off',
      'capitalized-comments': 'off',
      'no-inline-comments': 'error',
      'spaced-comment': 'off',

      // Ban let - use const only
      'no-restricted-syntax': [
        'error',
        {
          selector: 'VariableDeclaration[kind="let"]',
          message: 'Use const. Avoid mutation.',
        },
      ],
      'prefer-const': 'error',
      'no-var': 'error',

      // No any types
      '@typescript-eslint/no-explicit-any': 'error',
      '@typescript-eslint/no-unsafe-assignment': 'error',
      '@typescript-eslint/no-unsafe-member-access': 'error',
      '@typescript-eslint/no-unsafe-call': 'error',
      '@typescript-eslint/no-unsafe-return': 'error',

      // No type assertions - fix the types instead
      '@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],

      // Ban generic folder imports (not lib - that's NX convention)
      'no-restricted-imports': [
        'error',
        {
          patterns: [
            { group: ['*/utils/*', '*/utils'], message: 'No utils folders. Use domain-specific names.' },
            { group: ['*/helpers/*', '*/helpers'], message: 'No helpers folders. Use domain-specific names.' },
            { group: ['*/common/*', '*/common'], message: 'No common folders. Use domain-specific names.' },
            { group: ['*/shared/*', '*/shared'], message: 'No shared folders. Use domain-specific names.' },
            { group: ['*/core/*', '*/core'], message: 'No core folders. Use domain-specific names.' },
          ],
        },
      ],

      // Complexity limits
      'max-lines': ['error', { max: 400, skipBlankLines: true, skipComments: true }],
      'max-depth': ['error', 3],
      'complexity': ['error', 12],

      // Naming conventions
      '@typescript-eslint/naming-convention': [
        'error',
        {
          selector: 'variable',
          format: ['camelCase'],
        },
        {
          selector: 'variable',
          modifiers: ['const'],
          format: ['camelCase', 'UPPER_CASE'],
        },
        {
          selector: 'function',
          format: ['camelCase'],
        },
        {
          selector: 'parameter',
          format: ['camelCase'],
          leadingUnderscore: 'allow',
        },
        {
          selector: 'typeLike',
          format: ['PascalCase'],
        },
        {
          selector: 'enumMember',
          format: ['PascalCase'],
        },
        {
          selector: 'objectLiteralProperty',
          format: null,
        },
      ],
    },
  },
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      parserOptions: {
        projectService: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
  }
);

This enforces:

  • No generic names - Custom rule bans utils, helpers, service, manager, etc. in filenames and class names
  • No let - Only const allowed via no-restricted-syntax
  • No type assertions - Fix the types, don't cast
  • No generic folders - Bans imports from utils/, helpers/, common/, shared/, core/
  • Complexity limits - Max 400 lines, max depth 3, cyclomatic complexity 12
  • No inline comments - Forces self-documenting code
  • No any types - Anywhere
  • Naming conventions - camelCase for variables/functions, PascalCase for types

Patch package.json - Add scripts and lint-staged:

Add these to the root package.json:

{
  "scripts": {
    "build": "nx run-many -t build",
    "test": "nx run-many -t test",
    "lint": "nx run-many -t lint",
    "typecheck": "nx run-many -t typecheck",
    "verify": "nx run-many -t lint,typecheck && nx run-many -t test --coverage",
    "prepare": "husky"
  },
  "lint-staged": {
    "*.ts": ["eslint --fix"]
  }
}

Patch vitest.config.mts files - Add 100% coverage thresholds:

For EACH project created in Phase 4 that has a vitest.config.mts, add thresholds to the coverage block:

coverage: {
  reportsDirectory: './test-output/vitest/coverage',
  provider: 'v8' as const,
  thresholds: {
    lines: 100,
    statements: 100,
    functions: 100,
    branches: 100,
  },
},

This enforces 100% test coverage - tests will FAIL if coverage drops below 100%.

Phase 7: Establish Coding Conventions

Copy content from claude-skillz skills to the docs:

Testing conventions:

  • Read: [claude-skillz-path]/writing-tests/SKILL.md
  • Write to: docs/conventions/testing.md

Adding docs/conventions/testing.md. Provides test naming, assertion patterns, and edge case checklists.

Software design conventions:

  • Read: [claude-skillz-path]/software-design-principles/SKILL.md
  • Write to: docs/conventions/software-design.md

Adding docs/conventions/software-design.md. Provides object calisthenics, fail-fast, and dependency inversion patterns.

Phase 8: Activate Git Hooks

Initialize husky, then overwrite the default pre-commit with our version:

cd [target-directory]
npx husky init
# husky init creates a default pre-commit - overwrite it with ours:
cp [claude-skillz-path]/typescript-backend-project-setup/template/.husky/pre-commit .husky/pre-commit

Phase 9: Verify Setup

# Check NX is working
nx report

# View empty workspace
nx graph

Review the repository-setup-checklist.md and ensure all items are checked.

Checkpoint: All verification commands pass. Ready for first commit.

Phase 10: Document Architecture (Optional)

Offer to interview the user to fill in placeholder content:

Architecture Overview (docs/architecture/overview.md):

  • "What systems does this interact with?"
  • "Who are the primary users?"
  • "What are the main technical components?"

Domain Terminology (docs/architecture/domain-terminology/contextive/definitions.glossary.yml):

  • "What are the key terms in this domain?"
  • "How would you define [term] to a new team member?"

Project Overview (docs/project/project-overview.md):

  • "What problem are you solving?"
  • "Who are the users and what do they need?"
  • "What are your non-negotiable principles?"
  • "What are the project phases?"

Summary

This skill creates an NX monorepo using a command-first approach:

  1. create-nx-workspace for foundation
  2. nx add for plugins
  3. pnpm add for dependencies
  4. Copy template files (only what NX can't create)
  5. Patch configs (last resort)
  6. Verify setup

The result provides:

  • Maximum type safety - strict tsconfig, TypeScript project references
  • Strict linting - no comments, naming conventions, no mutation
  • 100% test coverage - with sensible excludes
  • NX orchestration - caching, affected commands, dependency graph
  • AI guardrails - protected configs, blocked dangerous commands
  • Scalable structure - apps and packages pattern with workspace:* dependencies

For adding projects after setup, see docs/conventions/codebase-structure.md.


Verification Mode

Trigger: "verify typescript setup", "check project setup", "audit monorepo config"

Use this to verify an existing repo has all required configurations.

Step 1: Discover all projects

find . -name "package.json" -not -path "*/node_modules/*" -not -path "*/.nx/*"

Step 2: ESLint Config Verification

Read eslint.config.mjs and verify it contains:

  • Import of .eslint-rules/no-generic-names.js
  • Rule custom/no-generic-names: 'error'
  • Rule no-restricted-syntax with VariableDeclaration[kind="let"] selector
  • Rule @typescript-eslint/consistent-type-assertions with assertionStyle: 'never'
  • Rule no-restricted-imports with patterns for utils, helpers, common, shared, core
  • Rules max-lines: 400, max-depth: 3, complexity: 12

If any missing: List what's missing and offer to fix.

Step 3: Vitest Config Verification

For EACH project discovered in Step 1:

  1. Check if vitest.config.mts exists in that project directory
  2. If exists, read it and verify coverage.thresholds contains:

- lines: 100 - statements: 100 - functions: 100 - branches: 100

If any project missing thresholds: List which projects are non-compliant and offer to fix.

Step 4: Git Hooks Verification

  • .husky/pre-commit contains lint-staged and verify
  • package.json has lint-staged config

Step 5: Gitignore Verification

  • .gitignore contains test-output on its own line

Step 6: Report

Output a summary:

✓ ESLint: All rules configured
✗ Vitest: 2/6 projects missing coverage thresholds
  - apps/eclair
  - apps/docs
✓ Git Hooks: Configured
✓ Gitignore: test-output ignored

If failures: Offer to fix all issues automatically.

平台分布

Codex

35.14%
按下载量换算51

Claude

29.02%
按下载量换算42

Cursor

19.38%
按下载量换算28

Gemini CLI

9.8%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills