스킬 blueprinteventbus-integration
📡

blueprinteventbus-integration

안전 🌐 네트워크 접근📁 파일 시스템 액세스⚙️ 외부 명령어

實作事件驅動架構

大型應用程式中的模組通常會變得緊密耦合,使得更新困難且容易出錯。本技能提供模式和程式碼範例,實作 BlueprintEventBus 以透過事件實現鬆散耦合。

지원: Claude Codex Code(CC)
📊 69 적절함
1

스킬 ZIP 다운로드

2

Claude에서 업로드

설정 → 기능 → 스킬 → 스킬 업로드로 이동

3

토글을 켜고 사용 시작

테스트해 보기

"blueprinteventbus-integration" 사용 중입니다. Help me publish a task.assigned event when a user assigns a task to another team member.

예상 결과:

  • Type the event payload: { type: 'task.assigned', blueprintId, actor, data: { task, assignee, assigneeType } }
  • Inject BlueprintEventBus and call publish()
  • Subscription triggers notifications
  • Event metadata tracks assignment history

"blueprinteventbus-integration" 사용 중입니다. How do I listen for all events in a specific Blueprint?

예상 결과:

  • Use subscribeToBlueprintEvents(blueprintId) method
  • Filter combined with takeUntilDestroyed() for cleanup
  • Handle all event types with subscribeAll() pattern
  • Update UI reactively when any event occurs

"blueprinteventbus-integration" 사용 중입니다. Create an event for when a file is uploaded to the Blueprint

예상 결과:

  • Event type follows [module].[action] pattern: file.uploaded
  • Payload includes blueprintId, actor, and file data
  • Metadata captures file size and mime type
  • Subscribers can trigger processing or notifications

보안 감사

안전
v3 • 1/16/2026

Documentation-only skill containing TypeScript code examples for Angular event-driven patterns. All 99 static findings are false positives triggered by pattern-matching errors: (1) Hash strings in JSON metadata (content_hash, tree_hash) flagged as weak cryptographic algorithms, (2) GitHub source_url flagged as hardcoded URL vulnerability, (3) TypeScript template literal backticks flagged as shell backtick execution, (4) Domain event names like task.assigned flagged as C2/reconnaissance keywords, and (5) Angular lifecycle hooks flagged as system reconnaissance. This is pure documentation with no executable code, network calls, file system access, or security-sensitive patterns.

2
스캔된 파일
730
분석된 줄 수
3
발견 사항
3
총 감사 수
감사자: claude 감사 이력 보기 →

품질 점수

38
아키텍처
100
유지보수성
87
콘텐츠
21
커뮤니티
100
보안
87
사양 준수

만들 수 있는 것

新增事件驅動模式

在 Angular 服務中實作 BlueprintEventBus,以實現模組間的解耦通訊。

標準化事件命名

建立跨團隊的 [模組].[動作] 命名慣例,以確保事件結構的一致性。

連接 UI 和後端

使用事件在後端操作完成時觸發通知並更新 UI。

이 프롬프트를 사용해 보세요

基本事件設定
顯示如何在 Angular 服務中注入 BlueprintEventBus,並發布具有 blueprintId 和 actor 欄位的 task.created 事件。
訂閱並過濾
撰寫 Angular 元件程式碼,訂閱任務事件,但只對來自特定 Blueprint 的事件做出反應,使用 input() 和 takeUntilDestroyed()。
審核記錄系統
建立 AuditLogService,在全域訂閱所有事件,並將具有完整事件中繼資料的事件記錄到儲存庫中。
工作流程自動化
實作 TaskWorkflowService,監聽 task.completed 事件,並自動更新相依任務及通知相關人員。

모범 사례

  • 始終在事件中包含 blueprintId 以啟用 Blueprint 特定的過濾
  • 使用 takeUntilDestroyed() 防止元件中的記憶體洩漏
  • 在成功操作後發布事件以維持一致性

피하기

  • 不要使用 EventBus 進行簡單的父子元件通訊;請改用 @Output
  • 避免造成無限迴圈的事件循環鏈
  • 不要將事件用於同步的請求-回應模式;請直接使用服務

자주 묻는 질문

此技能支援哪些 Angular 版本?
此技能支援 Angular 16+,其中包含 inject() 函式和 takeUntilDestroyed() API 用於生命週期管理。
事件類型的命名限制是什麼?
事件類型遵循 [模組].[動作] 模式。使用小寫字母、句點和動作動詞,如 created、updated、deleted。
我可以將此用於非 Angular 框架嗎?
這些模式適用於任何基於 RxJS 的系統,但程式碼範例需要 Angular 特定功能,如 inject() 和 DestroyRef。
我的事件資料是否會被儲存或傳送到任何地方?
不行。此技能僅提供模式。您的實作控制事件資料的儲存位置或傳送位置。
為什麼我的事件訂閱無法運作?
常見問題包括:缺少 takeUntilDestroyed() 導致清理問題、在事件發布後才訂閱,或缺少 blueprintId 過濾。
這與 Angular Signal 有何不同?
EventBus 處理跨模組通訊。Signal 用於元件或服務內的反映性狀態。請兩者一起使用。

개발자 세부 정보

파일 구조

📄 SKILL.md