Community程式設計與開發github.com

lobehub/typescript

LobeHub TypeScript 風格與型別安全指南。適用於編輯 TS/TSX/MTS、修復型別、選擇 interface 或 type、避免 any/object、使用 import type、非同步流程或 ts-expect-error。

typescript 是什麼?

此技能提供了 LobeHub 團隊採用的 TypeScript 風格與型別安全指南。它專為開發者在處理 TypeScript 檔案(如 .ts、.tsx、.mts)時,提供一致且嚴謹的程式碼規範。技能涵蓋的關鍵情境包括:修復型別錯誤、在 interface 與 type 之間做出正確選擇、避免使用 any 或 object 作為型別、強制使用 import type 進行型別匯入、處理非同步流程(async/await)以及正確使用 ts-expect-error 來抑制型別檢查。透過遵循這份指南,開發者可以寫出更具可讀性、可維護性且型別安全的 TypeScript 程式碼。此技能適用於任何支援 TypeScript 的開發環境,如 VS Code、Cursor 或 Claude Code,並建議在編輯 TypeScript 檔案時自動或手動啟用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lobehub/lobe-chat/tree/main/skills/typescript

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

typescript 是做什麼的?

LobeHub TypeScript 風格與型別安全指南。適用於編輯 TS/TSX/MTS、修復型別、選擇 interface 或 type、避免 any/object、使用 import type、非同步流程或 ts-expect-error。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相關技能