Agent Skills
› NeverSight/learn-skills.dev
› integration-layer
integration-layer
GitHub定义集成层规范,封装 Firebase/DataConnect 等外部依赖。通过仓储适配器、流信号转换及安全策略,确保应用层框架无关性,隔离基础设施细节。
Trigger Scenarios
实现 Firebase 或 Data Connect 集成
编写仓储适配器或 DTO 映射逻辑
处理流式数据与信号转换
配置外部 API 安全策略
Install
npx skills add NeverSight/learn-skills.dev --skill integration-layer -g -y
SKILL.md
Frontmatter
{
"name": "integration-layer",
"description": "Infrastructure and integration patterns for src\/app\/integration, including Firebase\/AngularFire usage, Data Connect codegen, repository adapters, DTO mapping, and streaming boundaries; use when touching persistence, external APIs, or platform SDKs."
}
Integration Layer
Intent
Implement external integrations (Firebase, Data Connect, HTTP, SDKs) behind stable ports so the rest of the app stays framework-agnostic.
Layer Boundaries
- Only integration/infrastructure may import Firebase/AngularFire/DataConnect SDKs.
- Expose interfaces/tokens to Application; never expose platform types.
Repository Adapters
- Implement repository ports with minimal mapping:
- DTO <-> Domain mapping happens here (or in dedicated mappers within integration).
- Keep mapping deterministic; normalize timestamps/IDs.
Streams and Signals
- Integration may return Observables (streaming) or Promises (commands).
- Convert to signals at the Application boundary (store/facade), not in templates.
- Ensure cleanup: avoid manual subscriptions unless lifecycle-bound.
Data Connect
- Treat generated SDK as read-only output.
- After schema changes, regenerate before app code changes.
- Enforce auth directives and least-privilege queries.
Security
- Never trust client input.
- Keep secrets in env/secret manager, not in source.
- Avoid string-concatenated queries; use parameterized APIs.
Version History
- e0220ca Current 2026-07-05 21:26


