技能 backend-architect
📦

backend-architect

中風險 ⚙️ 外部命令

在資深指導下審查後端架構

後端服務可能逐漸演變成高度耦合、職責不清,以及測試脆弱的狀態。此技能會引導 Claude、Codex 和 Claude Code 進行架構審查、重構與實作決策。

支援: Claude Codex Code(CC)
📊 73 尚可
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

Agent 可讀資源

當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。

測試它

正在使用「backend-architect」。 審查新增使用者建立 use case 的 pull request。

預期結果:

  • P1:此 use case 相依於具體 repository,而不是 port。
  • P1:密碼雜湊應保留在 domain port 背後。
  • P2:為 repository adapter 新增整合測試,並為 domain validation 新增單元測試。

正在使用「backend-architect」。 設計付款功能的後端配置。

預期結果:

結果應將付款 domain models 與 infrastructure adapters 分離,定義 payment gateway ports,並為成功與失敗路徑新增 use case tests。

正在使用「backend-architect」。 找出大型 service class 中的重構機會。

預期結果:

  • 為會改變狀態的 commands 抽取獨立 use cases。
  • 將驗證規則移入 value objects,以保護 domain invariants。
  • 在替換 infrastructure dependencies 前先引入 ports。

安全審計

中風險
v6 • 6/28/2026

Static analysis reported many high-risk weak-cryptography and Ruby backtick findings, but reviewed examples show markdown diagrams, prose, paths, and architecture terminology rather than executable cryptographic code or shell execution. No prompt injection, data exfiltration, network behavior, credential harvesting, or malicious intent was found. The remaining risk is medium because the skill allows Bash and recommends command-based review workflows.

20
已掃描檔案
3,470
分析行數
4
發現
6
審計總數
中風險問題 (1)
Bash Tooling Can Execute Project Commands
The skill declares Bash as an allowed tool and recommends git diff, grep, and project linters or formatters. This is legitimate for backend code review, but it gives the assistant command execution capability in a user workspace.
低風險問題 (2)
Static Weak-Cryptography Matches Are False Positives
The high-severity weak-cryptography matches occur in DDD, SOLID, architecture terms, markdown diagrams, and checklist prose. I found no evidence of weak cryptographic APIs or recommendations to use weak algorithms.
Markdown Backticks Misclassified as Ruby Shell Execution
The external-command scanner matched markdown code fences and inline architecture examples. These sections document folder structures and refactoring examples, not Ruby shell backtick execution.

風險因素

⚙️ 外部命令 (2)

偵測到的模式

Bash Tooling Can Execute Project Commands
審計單位: codex 檢視審計紀錄 →

品質評分

55
架構
100
可維護性
87
內容
74
社群
56
安全
83
規範符合度

你可以打造什麼

設計新的後端功能

在開始實作前,規劃 bounded contexts、ports、adapters、use cases 與測試策略。

審查 Pull Request

檢查近期變更是否有 SOLID 違規、分層洩漏、程式碼異味與缺少測試的情況。

重構舊有服務

拆解大型服務、將邏輯移入 domain models,並引入更清楚的抽象。

試試這些提示

審查我的後端變更
審查目前的後端變更,涵蓋架構、SOLID 原則、程式碼異味與缺少的測試。將問題優先分級為 P0、P1 或 P2。
設計功能結構
使用六角形架構為此功能設計後端結構。識別 domain models、use cases、ports、adapters 與測試涵蓋範圍。
規劃重構
分析此服務是否有 god class、feature envy、primitive obsession、long method 與 shotgun surgery 風險。提出分階段重構計畫。
稽核架構邊界
稽核這些後端 contexts 之間的模組邊界與相依方向。找出分層違規、耦合風險與缺少的抽象。

最佳實務

  • 從商業 use case 開始,接著定義 domain models、ports 與 adapters。
  • 要求提供含檔案位置、影響範圍與建議修正方式的優先排序 findings。
  • 只執行必要的儲存庫命令,並在套用變更前審查結果。

避免

  • 將此技能當作一般 shell 自動化工具,而不是架構審查器。
  • 在識別最小且有用的重構步驟前,就要求大範圍重寫。
  • 在服務並不需要時,機械式套用 DDD 或六角形架構。

常見問題

什麼樣的專案適合此技能?
它適合需要架構審查、重構或功能設計指導的後端服務。
它可以撰寫生產環境程式碼嗎?
它可以引導實作並建議變更,但使用者應審查所有產生的程式碼。
它需要特定語言嗎?
不需要。此指導以模式為基礎,可調整套用於常見的後端語言。
為什麼它需要 Bash?
它使用可透過 Bash 執行的工作流程,用於 git diff、grep、linters 和 formatters 等命令。
它適合發布嗎?
可以,但需標示中度警告,因為可透過 Bash 執行命令。
使用者應提供什麼?
提供功能目標、相關檔案、近期變更,以及任何架構限制。