Integrate File Viewer
Drop-in CogniteFileViewer integration for Flows apps, handling react-pdf install, Vite config, and worker setup.
- CCM score
- 64 of 100
- skills.sh installs
- 1.9K
- GitHub stars
- 6
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the full wiring path: copy 9 library files into
src/cognite-file-viewer/, installreact-pdf@^9.1.1, and configure Vite - Includes a PDF, image, text, and Office-document preview component with zoom, pan, rotation, and annotation overlay support
- Enforces a defined container height, and prefers
instanceIdsources so the diagram annotation overlay is enabled - Designed for Cognite Flows apps that need to preview CDF files without hand-wiring react-pdf or file resolution
Install
$ npx -y skills add cognitedata/builder-skills --skill integrate-file-viewer -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Integrate CogniteFileViewer
Add CogniteFileViewer to this Flows app to preview CDF files (PDF, image, text).
Dependencies
The file-viewer library files (copied in Step 2) require this npm package:
| Package | Version |
|---|---|
react-pdf | ^9.1.1 |
pdfjs-dist ships as a dependency of react-pdf at the correct version — do not install it separately.
react and @cognite/sdk are assumed to already be present in Flows apps.
Your job
Complete these steps in order. Read each file before modifying it.
Step 1 — Understand the app
Read these files before touching anything:
package.json— detect package manager (packageManagerfield or lock file) and existing depsvite.config.ts— understand current Vite setup- The component where the viewer should be added
Step 2 — Copy the file-viewer source files
The file-viewer library lives in the code/ directory next to this skill file. Read and copy
all files from there into src/cognite-file-viewer/ inside the app:
Details
- Repository
- github.com/cognitedata/builder-skills
- Categories
- Frontend & UI Code, Office Files & Slides
- First seen
- Jun 3, 2026
Questions
What does the integrate-file-viewer skill do?
integrate-file-viewer adds CogniteFileViewer to a Flows app so it can preview CDF files such as PDFs, images and text. It handles installing react-pdf, the Vite config, PDF.js worker setup and component usage, so you do not wire up react-pdf or file resolution by hand.
How do I install the integrate-file-viewer skill?
Run npx -y skills add cognitedata/builder-skills --skill integrate-file-viewer -y in your project. Once installed, integrate-file-viewer guides the agent through copying the file-viewer source files and adding the react-pdf dependency.
Which file types can the integrate-file-viewer skill preview?
integrate-file-viewer supports PDFs with page navigation and diagram annotation overlays, Office documents converted to PDF through the CDF Document Preview API, images such as JPEG, PNG and SVG, and plain text files. Other types fall back to an unsupported renderer.
Where does integrate-file-viewer stand in the Frontend and UI Code category?
integrate-file-viewer is listed under Frontend and UI Code on Claude Marketplaces. Skills such as vercel-react-best-practices and web-design-guidelines also appear in that category, and this skill covers CDF file previews rather than general frontend practice.
More from cognitedata/builder-skills
All 25- Setup Python Tools1.9K
- Graph Viewer1.9K
- Setup Flows Auth1.9K
- Performance1.9K
- Create Client Tool1.9K
- Pull Changes Resolve Conflicts1.9K
- Use Topbar1.9K
- Migrate App To Flows1.7K
- Integrate Fusion Agent1.7K
- Flows Code Review1.6K
- Flows Design Review1.1K
- Flows App Brief1.1K
- Flows External App Submit1.1K
- Skill Creator2.5K
- Code Quality2K
- Test Coverage1.9K
- Dependencies Audit1.9K
- Reveal 3d1.9K
- Design1.9K
- Integrate Todo List1.9K
- Correctness And Error Handling1.9K
- Dm Limits And Best Practices1.9K
- Integrate Atlas Chat1.9K
- Security1.9K
Similar to Integrate File Viewer
More Frontend & UI Codereveal-3dSkillcognitedata/builder-skills1.9K installsDrop-in 3D viewer for Flows apps, rendering CDF CAD, point clouds, 360 images, and scenes via @cognite/reveal-widget.
graph-viewerSkillcognitedata/builder-skills1.9K installsCopies a reusable CDF graph viewer into a Flows app for visualizing data model relationships and instances.
view-pdfSkillanthropics/knowledge-work-plugins6.5K installsInteractive PDF viewer that opens documents for visual annotation, form filling, and signature placement with live feedback.
Figma Context McpMCP serverglips16.3K starsRead access to Figma files: layout, text, visuals, components, and exported images.
react-pdfSkillmolefrog/skills767 installsGenerate PDFs with @react-pdf/renderer, covering fonts, layout, SVG, images, and page numbering for reports and invoices.