Token导航 LogoToken导航

Agent Skill · 研究检索

typescript-strict(TypeScript strict 开发)

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

typescript-strict 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 50,488。

总安装 612周安装 26GitHub Stars 公开资料未说明下载 214核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add sakataka/tetris-game2 --skill "typescript-strict"

这个 Skill 是做什么的

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

typescript-strict 专注于启用严格模式的 TypeScript 开发支持。适合追求零隐式 any、精确类型推导的高标准项目。通过 npx skills add sakataka/tetris-game2 --skill "typescript-strict" 命令安装。

需在 tsconfig.json 中开启 strict 选项,注意可能增加的迁移成本。建议分阶段启用,优先处理核心模块再逐步覆盖全量代码。

来源仓库内路径:skills/typescript-strict

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add sakataka/tetris-game2 --skill "typescript-strict";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

typescript-strict 怎么安装?

在终端执行 npx skills add sakataka/tetris-game2 --skill "typescript-strict"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

typescript-strict 支持哪些 AI 工具?

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

typescript-strict 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

typescript-strict 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

typescript-strict 用的人多吗?

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

typescript-strict 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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-strict

TypeScript strict 开发 · 本页

612—权限未标注MIT未收录

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

SKILL.md 原文

TypeScript Strict Mode Enforcer

Ensure strict TypeScript practices and type safety across the Tetris codebase.

Core Principles

  1. No any Types: Use unknown and type guards instead
  2. No Type Assertions: Use type guards and narrowing
  3. No Non-null Assertions (!): Use optional chaining and type guards
  4. Result<T, E> Pattern: For game logic error handling
  5. Exhaustive Type Checking: Handle all union type cases

Type Safety Patterns

1. Replace any with unknown

// ❌ Prohibited
function process(data: any) {
  return data.value
}

// ✅ Required
function process(data: unknown) {
  if (isValidData(data)) {
    return data.value  // Type-safe after guard
  }
  return null
}

function isValidData(data: unknown): data is ValidData {
  return (
    typeof data === 'object' &&
    data !== null &&
    'value' in data
  )
}

2. Avoid Type Assertions

// ❌ Prohibited
const element = document.getElementById('game') as HTMLCanvasElement

// ✅ Required
const element = document.getElementById('game')
if (element instanceof HTMLCanvasElement) {
  // Type-safe usage
}

3. Use Optional Chaining

// ❌ Prohibited
const score = gameState!.score!.value

// ✅ Required
const score = gameState?.score?.value ?? 0

4. Result<T, E> Pattern for Game Logic

type Result<T, E> = { ok: true; value: T } | { ok: false; error: E }

// ✅ Recommended for game logic
export const rotatePiece = (
  piece: Piece,
  board: Board
): Result<Piece, RotationError> => {
  const rotated = calculateRotation(piece)

  if (hasCollision(rotated, board)) {
    return { ok: false, error: 'COLLISION' }
  }

  return { ok: true, value: rotated }
}

// Usage
const result = rotatePiece(currentPiece, board)
if (result.ok) {
  setPiece(result.value)
} else {
  handleError(result.error)
}

5. Exhaustive Type Checking

type Direction = 'UP' | 'DOWN' | 'LEFT' | 'RIGHT'

function move(direction: Direction): void {
  switch (direction) {
    case 'UP':
      return moveUp()
    case 'DOWN':
      return moveDown()
    case 'LEFT':
      return moveLeft()
    case 'RIGHT':
      return moveRight()
    default:
      // Exhaustiveness check
      const _exhaustive: never = direction
      throw new Error(`Unhandled direction: ${_exhaustive}`)
  }
}

Type Guard Patterns

Basic Type Guards

// String type guard
function isString(value: unknown): value is string {
  return typeof value === 'string'
}

// Object type guard
function isGameState(value: unknown): value is GameState {
  return (
    typeof value === 'object' &&
    value !== null &&
    'board' in value &&
    'currentPiece' in value &&
    'score' in value
  )
}

// Array type guard
function isStringArray(value: unknown): value is string[] {
  return Array.isArray(value) && value.every((item) => typeof item === 'string')
}

Advanced Type Guards

// Discriminated union type guard
type Shape =
  | { type: 'circle'; radius: number }
  | { type: 'square'; side: number }
  | { type: 'rectangle'; width: number; height: number }

function isCircle(shape: Shape): shape is Extract<Shape, { type: 'circle' }> {
  return shape.type === 'circle'
}

// Usage
if (isCircle(shape)) {
  console.log(shape.radius)  // Type-safe
}

Error Handling Patterns

1. Result Type for Errors

type ParseError = 'INVALID_FORMAT' | 'MISSING_FIELD' | 'TYPE_MISMATCH'

function parseConfig(data: unknown): Result<Config, ParseError> {
  if (!isObject(data)) {
    return { ok: false, error: 'INVALID_FORMAT' }
  }

  if (!('boardSize' in data)) {
    return { ok: false, error: 'MISSING_FIELD' }
  }

  if (typeof data.boardSize !== 'number') {
    return { ok: false, error: 'TYPE_MISMATCH' }
  }

  return { ok: true, value: data as Config }
}

2. Never Type for Unreachable Code

function assertNever(value: never): never {
  throw new Error(`Unexpected value: ${value}`)
}

// Usage in exhaustive checks
type PieceType = 'I' | 'O' | 'T' | 'S' | 'Z' | 'J' | 'L'

function getPieceColor(type: PieceType): string {
  switch (type) {
    case 'I': return 'cyan'
    case 'O': return 'yellow'
    case 'T': return 'purple'
    case 'S': return 'green'
    case 'Z': return 'red'
    case 'J': return 'blue'
    case 'L': return 'orange'
    default:
      return assertNever(type)  // Compile error if case missed
  }
}

Type Safety Checklist

  • No any types (use unknown + type guards)
  • No type assertions (as)
  • No non-null assertions (!)
  • Result<T, E> for game logic errors
  • Proper type guards for narrowing
  • Exhaustive union type handling
  • Optional chaining (?.) for nullable values

Type Checking

# Run TypeScript type checker
bun run typecheck

# Watch mode during development
bun x tsc --noEmit --watch

When This Skill Activates

  • "Fix type errors"
  • "Improve type safety"
  • "Handle this error properly"
  • "Make this type-safe"
  • "Add type guards"
  • "Remove type assertions"

平台分布

trae

25.92%
按下载量换算55

Claude Code

24.33%
按下载量换算52

windsurf

18.02%
按下载量换算39

OpenCode

12.76%
按下载量换算27

Cursor

7.75%
按下载量换算17

Codex

3.04%
按下载量换算7

安全审计

暂无安全审计结果可展示。

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

继续浏览同类 Skills