typescript-rules-63a332 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited typescript-rules-63a332 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
データフローでの型安全性 入力層(unknown) → 型ガード → ビジネス層(型保証) → 出力層(シリアライズ)
Backend固有の型シナリオ:
unknownで受け、型ガードで検証unknown、バリデーション後に型確定window as unknown as LegacyWindowのように段階的アサーションPartial<T>やvi.fn<[Args], Return>()活用クラス使用の判断基準
// 関数とinterface
interface UserService { create(data: UserData): User }
const userService: UserService = { create: (data) => {...} }関数設計
// オブジェクト引数
function createUser({ name, email, role }: CreateUserParams) {}依存性注入
// 依存性を引数で受け取る
function createService(repository: Repository) { return {...} }非同期処理
async/awaitを使用try-catchでハンドリングPromise<Result>)フォーマット規則
PascalCase、変数・関数はcamelCasesrc/)クリーンコード原則
console.log()は削除絶対ルール: エラーの握りつぶし禁止。すべてのエラーは必ずログ出力と適切な処理を行う。
Fail-Fast原則: エラー時は速やかに失敗させ、不正な状態での処理継続を防ぐ
// 禁止: 無条件フォールバック
catch (error) {
return defaultValue // エラーを隠蔽
}
// 必須: 明示的な失敗
catch (error) {
logger.error('処理失敗', error)
throw error // 上位層で適切に処理
}Result型パターン: エラーを型で表現し、明示的に処理
type Result<T, E> = { ok: true; value: T } | { ok: false; error: E }
// 使用例:エラーの可能性を型で表現
function parseUser(data: unknown): Result<User, ValidationError> {
if (!isValid(data)) return { ok: false, error: new ValidationError() }
return { ok: true, value: data as User }
}カスタムエラークラス
export class AppError extends Error {
constructor(message: string, public readonly code: string, public readonly statusCode = 500) {
super(message)
this.name = this.constructor.name
}
}
// 用途別: ValidationError(400), BusinessRuleError(400), DatabaseError(500), ExternalServiceError(502)層別エラー処理
構造化ログと機密情報保護 機密情報(password, token, apiKey, secret, creditCard)は絶対にログに含めない
非同期エラーハンドリング
unhandledRejection, uncaughtException~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.