Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

typescript-strictTypeScript strict 开发

Agent Skill

typescript-strict 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

881

周安装

36

GitHub Stars

28

下载量

285
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill typescript-strict

简介

typescript-strict 用于处理 GitHub 仓库、Issue 和 Pull Request 信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中整理代码协作事项。
  • 通过 npx 安装后,结合原始 README 核验具体用法。
  • 安装前需确认权限和维护状态,避免触发不必要的网络或命令操作。
  • 建议根据项目实际需求验证其适用性。

SKILL.md

TypeScript Strict Mode

Modern TypeScript configuration with strict type checking for maximum safety and developer experience. This guide focuses on TypeScript 5.x best practices for 2025.

When to Use This Skill

Use this skill when...Use another approach when...
Setting up a new TypeScript projectDebugging runtime errors (use debugger)
Migrating to stricter type safetyConfiguring build tools (use bundler docs)
Choosing moduleResolution strategyWriting application logic
Enabling noUncheckedIndexedAccessOptimizing bundle size (use bundler skills)

Core Expertise

What is Strict Mode?

  • Type safety: Catch more bugs at compile time
  • Better IDE experience: Improved autocomplete and refactoring
  • Maintainability: Self-documenting code with explicit types
  • Modern defaults: Align with current TypeScript best practices

Key Capabilities

  • Strict null checking
  • Strict function types
  • No implicit any
  • No unchecked indexed access
  • Proper module resolution
  • Modern import/export syntax enforcement

Recommended tsconfig.json (2025)

Minimal Production Setup

{
  "compilerOptions": {
    // Type Checking
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noFallthroughCasesInSwitch": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,

    // Modules
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": false,
    "verbatimModuleSyntax": true,

    // Emit
    "target": "ES2022",
    "lib": ["ES2023", "DOM", "DOM.Iterable"],
    "outDir": "dist",
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "removeComments": false,
    "noEmit": false,

    // Interop
    "isolatedModules": true,
    "allowJs": false,
    "checkJs": false,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist", "build"]
}

Strict Flags Explained

strict: true (Umbrella Flag)

Enables all strict type-checking options:

{
  "strict": true
  // Equivalent to:
  // "noImplicitAny": true,
  // "strictNullChecks": true,
  // "strictFunctionTypes": true,
  // "strictBindCallApply": true,
  // "strictPropertyInitialization": true,
  // "noImplicitThis": true,
  // "alwaysStrict": true
}

Always enable strict: true for new projects.

Additional Strict Flags (Recommended for 2025)

FlagPurpose
noUncheckedIndexedAccessIndex signatures return `T \undefined instead of T`
noImplicitOverrideRequire override keyword for overridden methods
noPropertyAccessFromIndexSignatureForce bracket notation for index signatures
noFallthroughCasesInSwitchPrevent fallthrough in switch statements
exactOptionalPropertyTypesOptional properties cannot be set to undefined explicitly

noUncheckedIndexedAccess (Essential)

// With noUncheckedIndexedAccess
const users: Record<string, User> = {};
const user = users['john'];
// Type: User | undefined (correct - must check before use)

if (user) {
  console.log(user.name); // Type narrowed to User
}

Always enable this flag to prevent runtime errors.

Module Resolution

Choosing a Strategy

StrategyUse ForExtensions Required
BundlerVite, Webpack, Bun projectsNo
NodeNextNode.js libraries and serversYes (.js)

moduleResolution: "Bundler" (Vite/Bun)

{
  "compilerOptions": {
    "module": "ESNext",
    "moduleResolution": "Bundler"
  }
}
  • No file extensions required in imports
  • JSON imports without assertions
  • Package.json exports field support

moduleResolution: "NodeNext" (Node.js)

{
  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext"
  }
}
  • Respects package.json type: "module"
  • Requires explicit .js extensions (even for .ts files)
  • Supports conditional exports

verbatimModuleSyntax (Recommended for 2025)

Prevents TypeScript from rewriting imports/exports.

{
  "compilerOptions": {
    "verbatimModuleSyntax": true
  }
}
// Error: 'User' is a type and must be imported with 'import type'
import { User } from './types';

// Correct
import type { User } from './types';

// Correct (mixed import)
import { fetchUser, type User } from './api';

Replaces deprecated importsNotUsedAsValues and preserveValueImports.

Agentic Optimizations

ContextCommand
Check errorsbunx tsc --noEmit
Check single filebunx tsc --noEmit src/utils.ts
Show configbunx tsc --showConfig
Check module resolution`bunx tsc --showConfig \grep moduleResolution`

Quick Reference

Recommended Flags

FlagValueCategory
stricttrueType Checking
noUncheckedIndexedAccesstrueType Checking
noImplicitOverridetrueType Checking
noPropertyAccessFromIndexSignaturetrueType Checking
noFallthroughCasesInSwitchtrueType Checking
moduleESNext / NodeNextModules
moduleResolutionBundler / NodeNextModules
verbatimModuleSyntaxtrueModules
targetES2022Emit
isolatedModulestrueInterop
skipLibChecktrueInterop

For detailed examples, advanced patterns, and best practices, see REFERENCE.md.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.88%
按下载量换算102

Claude

32.36%
按下载量换算92

Cursor

17.46%
按下载量换算50

Gemini CLI

8.45%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills