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

functional-ts-review功能性 ts 审查

Agent Skill

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

总安装

343

周安装

14

GitHub Stars

16

下载量

111
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/iwasa-kosui/functional-ts-principles --skill functional-ts-review

简介

functional-ts-review 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。

  • 它可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前顶部介绍已提供,底部简介为空,原始 SKILL.md 摘录缺失。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Functional TypeScript Code Review

Review server-side TypeScript code against functional domain modeling principles.

Review Procedure

  1. Read the files under review
  2. Scan through the checklist items below in order
  3. When a violation is found, report it with the relevant principle and the reason it matters
  4. When something is not a violation but has room for improvement, communicate it as a suggestion

Checklist

1. Are classes used for domain models?

If class is used to define domain entities or value objects, suggest migrating to the Discriminated Union + Companion Object pattern.

Using class inheritance required by an external library is a legitimate exception.

2. Is method notation used?

If functions inside type definitions use method notation (save(task: Task): Promise<void>), flag it and suggest function property notation (save: (task: Task) => Promise<void>).

Method notation makes parameter types bivariant, allowing a narrower implementation (e.g., save(task: DoingTask): Promise<void>) to pass type checking at dependency injection sites.

3. Is interface used for domain types?

Declaration merging with interface means that declaring an interface of the same name in another file silently alters the type's shape. Domain types should be defined with type.

interface is required for library type augmentation, which is a legitimate use case.

4. Are there as type assertions?

as bypasses type checking. Verify the following:

  • External data: is it parsed with a validation schema (Zod, Valibot, or ArkType)?
  • as inside Branded Type factory functions: acceptable (the only exception)
  • Everything else: consider whether type inference can resolve it instead

5. Are exceptions thrown in the domain layer?

If throw is used in the domain layer (entities, use cases), suggest migrating to the Result type.

The following are acceptable:

  • throw inside assertNever (unreachable code detection)
  • Unexpected failures in the infrastructure layer

6. Do switch statements have assertNever?

If a switch branching on a Discriminated Union lacks default: return assertNever(x), flag it. Without it, adding a new variant will not produce a compile error.

7. Is there schema validation at external boundaries?

At external boundaries such as API handlers, DB result mapping, and config file loading, check that raw data is not treated as domain types without validation. The project should use a validation library (Zod, Valibot, or ArkType) to parse external data.

8. Do PII fields have Sensitive wrappers?

Check that fields containing personal information (name, email address, phone number, diagnostic information, etc.) are wrapped with Sensitive<T>. Pay particular attention to objects that may appear in logs.

How to Write Findings

Each finding should include:

  1. What the problem is: the specific location in the code
  2. Why it is a problem: the principle and the risk of violating it
  3. How to fix it: a code example showing the corrected version
### Use of method notation

`src/repository/task-repository.ts:15`

`save(task: Task): Promise<void>` uses method notation. With method notation, parameter types become
bivariant, so a narrower implementation such as `save(task: DoingTask): Promise<void>` will pass
type checking.

Suggested fix:
\`\`\`typescript
type TaskRepository = {
  save: (task: Task) => Promise<void>;
};
\`\`\`

Severity

Each checklist item has the following severity:

SeverityItemReason
Highas type assertionsDirect cause of runtime errors
HighUnprotected PIIRisk of compliance violations
HighMissing schema validation at external boundariesDirect cause of runtime errors
MediumClass usageReduced type safety when extended
MediumUse of throwConsistency of error handling
MediumMissing assertNeverOverlooked cases when new variants are added
LowMethod notationIssue only manifests under specific conditions
LowInterface usageDeclaration merging accidents are rare

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.11%
按下载量换算41

Claude

30.71%
按下载量换算34

Cursor

19.48%
按下载量换算22

Gemini CLI

9.43%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills