cm-reporting-integration
1
总安装量
1
周安装量
#53977
全站排名
安装命令
npx skills add https://github.com/cirscn/cm-reporting --skill cm-reporting-integration
Agent 安装分布
codex
1
Skill 文档
CM Reporting Integration
Use this skill to deliver production-grade cm-reporting integrations, not only demos.
Fast Routing
Route requests first, then load the minimum references.
- New host integration from zero â read
references/integration-snippets.md. - API/contract clarification â read
references/contracts.md. - Template/version/file lookup â read
references/template-matrix.md. - Runtime/export/restore failures â read
references/troubleshooting.md. - Template file path lookup automation â run
scripts/resolve-template-path.mjs.
Non-Negotiable Constraints
Apply these rules in every solution:
- Keep
templateTypeandversionIdstrictly matched across render, restore, and export. - Import
cm-reporting/styles.cssexactly once in host runtime. - Provide official template
.xlsxasArrayBufferwhen calling Excel export APIs. - Treat Snapshot as full-state contract (
schemaVersion/templateType/versionId/data). - Return integrations callback result in
{ items: [...] } | null | undefinedshape only. - Respect package license (
PolyForm-Noncommercial-1.0.0) in usage recommendations.
Standard Delivery Workflow
Follow this order unless user asks otherwise.
- Confirm host environment and peer dependency ranges.
- Choose template delivery strategy (static/CDN/internal service).
- Implement baseline
CMReportingmounting with required props. - Add host orchestration via
CMReportingRef(get/set/export/validate). - Add Snapshot persistence and recovery path.
- Add Excel export action with tested template fetch path.
- Add integrations callbacks if host needs external pickers.
- Add legacy adapter flow only when interoperability is required.
- Run final acceptance checklist from references before handoff.
Output Requirements
When producing integration code or guidance, always include:
- Explicit dependency and peer dependency install commands.
- Concrete
templateType+versionIdexamples. - Snapshot save + restore behavior definition.
- Excel export data flow (template source â ArrayBuffer â Blob download).
- Failure fallback behavior (cancel flow, null return, retry boundaries).
Anti-Patterns to Avoid
- Do not generate workbook from scratch for export.
- Do not assume template files exist without mapping verification.
- Do not mix incompatible template/version pairs.
- Do not return raw arrays from integrations callbacks; wrap in
{ items }. - Do not advise manual mutation of package internals or private APIs.
References
Load only what the request needs:
references/integration-snippets.md: full quickstart + production recipes.references/contracts.md: public API and callback contract tables.references/template-matrix.md: complete template/version/file mapping.references/troubleshooting.md: symptom-to-action playbook.