Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

typescript-strictTypeScript strict 开发

Agent Skill

typescript-strict 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,211

周安装

172

GitHub Stars

公开资料未说明

下载量

1,348
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install typescript-strict

简介

typescript-strict 强化 TypeScript 严格类型开发流程,支持增量启用与安全重构。

  • 适用于需要高类型安全性的 OpenClaw 项目,提升代码可维护性与错误预防能力。
  • 可配置编译器标志、定义类型边界并推荐实用程序类型,减少运行时异常。
  • 安装命令为 openclaw skills install typescript-strict,需确认 tsconfig 配置兼容性。
  • 建议在逐步启用 strict 模式时配合自动化测试,确保类型变更不影响现有逻辑。

SKILL.md

name
typescript-strict
description
Deep TypeScript strictness workflow—incremental enablement, compiler flags, typing boundaries, narrowing, generics, utility types, and safe refactors. Use when adopting strict mode, reducing any, or hardening large TS codebases.

TypeScript Strict Mode (Deep Workflow)

Strictness is a gradient, not a single switch. The goal is fewer runtime surprises without blocking delivery—via incremental migration and clear typing boundaries at IO edges.

When to Offer This Workflow

Trigger conditions:

  • Enabling strict, strictNullChecks, noImplicitAny, or noUncheckedIndexedAccess
  • Legacy codebase full of any and @ts-ignore
  • Runtime bugs that types would have caught (undefined, wrong shapes)
  • Library authoring needing accurate .d.ts exports

Initial offer:

Use six stages: (1) baseline & goals, (2) compiler flags roadmap, (3) boundary typing, (4) narrowing & exhaustiveness, (5) generics & patterns, (6) verify & guardrails). Confirm TS version, build tool (tsc, esbuild, etc.), and monorepo layout.


Stage 1: Baseline & Goals

Goal: Know current pain and target strictness with metrics.

Actions

  • Capture tsc --noEmit error count and top files by errors
  • Identify critical packages vs leaf apps for sequencing
  • Define non-goals (e.g., “no perfect types for untyped third-party JSON this quarter”)

Exit condition: Baseline error count + priority directories.


Stage 2: Compiler Flags Roadmap

Goal: Enable flags incrementally—fix clusters, not the whole repo at once.

Typical order (adapt)

  1. strictNullChecks (often highest value)
  2. noImplicitAny on new files + ratchet old
  3. strictFunctionTypes, strictBindCallApply
  4. noUncheckedIndexedAccess (verbose—plan for undefined unions)
  5. exactOptionalPropertyTypes (sharp edges—later)

Techniques

  • // @ts-expect-error with ticket over blind @ts-ignore
  • Path-specific tsconfig extends for stricter packages
  • CI gate: no new any in changed lines (eslint @typescript-eslint/no-explicit-any)

Exit condition: Flag timeline with owners per package.


Stage 3: Boundary Typing (IO Edges)

Goal: Validate external data once; internal code trusts narrowed types.

Patterns

  • zod / io-ts / valibot for runtime parse at API boundary
  • satisfies for config objects—keeps literal types
  • Avoid casting from unknown without validation

APIs

  • Generated types from OpenAPI/graphql-codegen when possible
  • Branded types for IDs (type UserId = string & { __brand: 'UserId' }) to prevent mix-ups

Exit condition: New IO code has parse → typed pipeline documented.


Stage 4: Narrowing & Exhaustiveness

Goal: Control flow analysis works for you—discriminated unions, never checks.

Practices

  • Discriminated unions for states: { status: 'loading' } | { status: 'ok', data: T }
  • switch with assertNever(x) for compile-time exhaustiveness
  • Optional chaining vs explicit undefined handling—be consistent in module

Nullability

  • Prefer undefined vs null one convention per codebase section

Exit condition: Representative modules refactored with fewer optional footguns.


Stage 5: Generics & Patterns

Goal: Reuse without any soup—constraints and defaults.

Guidance

  • extends constraints; avoid unconstrained generics unless truly generic
  • Conditional types sparingly—readability over cleverness in app code
  • ReturnType / Parameters for inference glue
  • Avoid mutable array inference surprises—explicit element types when needed

Performance

  • Huge mapped types can slow tscsplit types or simplify

Exit condition: Style guide section for generics in shared libraries.


Stage 6: Verify & Guardrails

Goal: Strictness sticksregressions caught in CI.

CI

  • tsc --noEmit required green for affected projects
  • Type-aware ESLint rules; pre-commit optional
  • dtslint or tsd for library typings tests when authoring packages

Refactor safety

  • Small PRs per module; runtime tests still required—types don’t replace tests

Final Review Checklist

  • [ ] Baseline metrics and roadmap for flags
  • [ ] IO boundaries validated with schemas or codegen
  • [ ] Discriminated unions / exhaustiveness for key state machines
  • [ ] Generics style documented for shared code
  • [ ] CI enforces typecheck on merge

Tips for Effective Guidance

  • Prefer unknown over any—forces narrowing at use site.
  • When user fights noUncheckedIndexedAccess, show helper getters or Record patterns.
  • Monorepo: align TypeScript version across packages—version skew causes phantom errors.

Handling Deviations

  • AllowJS mixed codebase: typed wrappers for critical paths first.
  • Third-party untyped libs: local d.ts or wrapper module with narrow exports.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

94.28%
按下载量换算1,271

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills