Install
openclaw skills install fec-typescript-project-standardUse when creating, configuring, reviewing, or debugging TypeScript project standards across frontend apps, libraries, SDKs, CLIs, monorepo packages, tsconfig, strictness, module/moduleResolution, path aliases, project references, declaration files, package exports, public API types, DTOs, advanced generics, discriminated unions, type guards, type narrowing, or type-level regressions. Prefer framework project skills for React/Vue/Next/Nuxt component architecture; Chinese triggers include TypeScript 项目规范, TS 项目规范, TypeScript 类型安全, 类型建模, 泛型, 判别联合, 类型收窄, tsconfig, 声明文件.
openclaw skills install fec-typescript-project-standard统一 TypeScript 层的工程配置、类型边界和发布产物规则。适用于前端应用、组件库、SDK、CLI、monorepo package 和纯 TypeScript 工具库,但不接管 React、Vue、Next.js、Nuxt 或 Vite 的框架架构职责。
识别 TypeScript 上下文
tsconfig 分层、strictness、路径别名、类型检查脚本和框架生成类型。moduleResolution、shebang 产物和 process.env 类型边界。收敛 tsconfig
strict,不要为通过构建关闭 noImplicitAny、strictNullChecks 或 exactOptionalPropertyTypes 等关键约束。target、lib、module 和 moduleResolution;浏览器应用、Node 脚本、库包不要共用一份含混配置。设计类型边界
固定发布与声明产物
package.json 的 exports、types、files 和实际构建产物一致。tsc --emitDeclarationOnly、构建工具声明插件或 API extractor 产出 .d.ts,并在发布前检查声明文件可被消费方解析。验证 TypeScript 质量
typecheck、build、test、lint 和 package pack dry-run。skipLibCheck、any、无守卫非空断言或宽泛 as 掩盖真实边界问题。输出应包含 TypeScript 上下文判断、关键 tsconfig/package 类型入口建议、类型边界方案、声明文件或 public API 风险、验证命令。完成后项目应能独立 typecheck,公开类型可被消费方解析,类型安全问题有明确收窄或建模方案。