angular-component
建置 Angular Signal 元件
現代 Angular 元件需要 signal API、無障礙範本,以及目前的 standalone 模式。此技能可引導 Claude、Codex 和 Claude Code 一致地建立或重構 Angular v20+ 元件。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨上下文、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「angular-component」。 請求建立具備 name、email 和選取行為的 standalone 個人檔案卡片元件。
預期結果:
使用 signal inputs、型別化 output 事件、OnPush change detection、host classes 和無障礙圖片文字的元件計畫與實作大綱。
正在使用「angular-component」。 請求現代化較舊的 Angular 按鈕元件。
預期結果:
重構摘要,將 decorator inputs、HostBinding 和 ngClass 替換為 signal inputs、host metadata、直接類別繫結和鍵盤支援。
正在使用「angular-component」。 請求建立具備 projected tab content 的 tabs 元件。
預期結果:
使用 content queries、作用中 tab signal 狀態、ARIA roles、鍵盤導覽和清楚父子通訊的結構化元件設計。
安全審計
安全Static analysis reported many high and medium indicators, but review found they are false positives in Markdown documentation and TypeScript examples. The files do not define executable scripts, shell commands, credential access, data exfiltration, or prompt injection attempts, so the skill is safe to publish.
低風險問題 (4)
品質評分
你能建構什麼
建立新的 UI 元件
產生具備 signal inputs、outputs、host bindings 和無障礙範本結構的 standalone 元件。
現代化既有元件
將較舊的 Angular 元件模式重構為 signals、原生控制流程,以及適合 OnPush 的狀態。
標準化團隊模式
在內容投影、queries、依賴注入和延遲渲染之間保持元件範例一致。
試試這些提示
Create an Angular v20 standalone user card component with signal inputs for name, avatar URL, and active state. Include accessible markup and host bindings.
Build an Angular standalone toggle component using signal inputs and outputs. Add host bindings for ARIA state, click handling, and keyboard activation.
Refactor this Angular component from decorator inputs and outputs to signal input and output APIs. Use native control flow and avoid ngClass and ngStyle.
Design an Angular tabs component using content queries, projected tab panels, signal state, accessible roles, and current Angular v20 template syntax.
最佳實務
- 請在請求程式碼前提供目標 Angular 版本和既有元件慣例。
- 當元件具備互動性時,請要求無障礙行為。
- 請在你的專案建置與測試設定中審查產生的範例。
避免
- 不要將其用於非 Angular 框架或僅限舊版 Angular 的語法。
- 不要在未描述 inputs、outputs 和使用者互動的情況下請求產生元件。
- 不要跳過針對樣式、測試和依賴項限制的專案專屬審查。