Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cognitedata/builder-skills --skill integrate-file-viewergit clone --depth 1 https://github.com/cognitedata/builder-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cognitedata/builder-skills/integrate-file-viewer)<a href="https://agentmods.dev/skills/cognitedata/builder-skills/integrate-file-viewer"><img src="https://agentmods.dev/badge/skills/cognitedata/builder-skills/integrate-file-viewer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cognitedata/builder-skills/integrate-file-viewer"><img src="https://agentmods.dev/badge/skills/cognitedata/builder-skills/integrate-file-viewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 67 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 283 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00090 | $0.02539 |
| Opus 5 | $0.00045 | $0.01269 |
| Sonnet 5 | $0.00018 | $0.00508 |
| Haiku 4.5 | $0.00009 | $0.00254 |
Grade A, and why
integrate-file-viewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
code/types.tscode/mimeTypes.tscode/fileResolution.tscode/useViewport.tscode/useFileResolver.tscode/useDocumentAnnotations.tscode/DocumentAnnotationOverlay.tsxcode/CogniteFileViewer.tsxcode/index.ts
The PDF.js worker is configured inside
CogniteFileViewer.tsx— no separate consumer setup is needed.
Step 3 — Install dependencies
Install react-pdf (see Dependencies above) using the app's package manager:
- pnpm →
pnpm add react-pdf@^9.1.1 - npm →
npm install react-pdf@^9.1.1 - yarn →
yarn add react-pdf@^9.1.1
pnpm users: pnpm's strict linking may prevent the browser from resolving
pdfjs-dist. Either addpdfjs-distas a direct dependency (pnpm add pdfjs-dist), or addpublic-hoist-pattern[]=pdfjs-distto.npmrc.
Step 4 — Configure Vite
Add optimizeDeps.exclude: ['pdfjs-dist'] to vite.config.ts to prevent Vite from pre-bundling pdfjs-dist (which breaks the worker):
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- code/CogniteFileViewer.tsx 14 KB
- code/DocumentAnnotationOverlay.tsx 6.4 KB
- code/fileResolution.ts 4.0 KB runs code
- code/index.ts 1.1 KB runs code
- code/mimeTypes.ts 5.9 KB runs code
- code/types.ts 6.5 KB runs code
- code/useDocumentAnnotations.ts 8.0 KB runs code
- code/useFileResolver.ts 3.6 KB runs code
- code/useViewport.ts 9.2 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 288 lines · 90 tokens per session scan A 4024fcd62339
integrate-file-viewer is a skill published in the GitHub repository cognitedata/builder-skills (6 stars, last pushed today), licensed Apache-2.0. It adds 90 tokens to every session and 2,539 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
paper2html
Convert an academic paper PDF into a publish-ready, self-contained single-page project homepage (a self-contained index.html) — the kind of paper landing page researchers host on GitHub Pages. Triggers when the user says "turn a paper into a project page/webpage", "paper2html", "generate a paper landing page / project…
pdf-export
Add client-side PDF export to a web app using jspdf + html2canvas-pro. Use when the user asks to download, save, or export the current page, a report, a slide deck, a chart, or any DOM element as a PDF. Covers single-element snapshots and multi-page documents with TOC bookmarks. No server, no Puppeteer at runtime …
glmv-pdf-to-web
Convert a PDF (research paper, technical report, or project document) into a beautiful single-page academic/project website with a structured outline JSON. Trigger this skill when the user wants to make a paper page, project homepage, or academic website from a PDF — in Chinese or English.
pdf-slide-viewer
Convert PDF files into interactive web-based slide viewers. This skill should be used when the user provides a PDF file path and requests to create a website or web viewer for it (e.g., "make this PDF into a website", "create a slide viewer for this PDF", "PDF to web", "view this PDF as slides"). Creates a project…
pdf-vue3
Use the pdf-vue3 Vue 3 component to render PDFs (URL, base64, or Uint8Array) with built-in virtual scrolling, crisp zoom, print, download, and page navigation. Trigger when the user asks to display a PDF in a Vue 3 / Nuxt 3 app, mentions pdf-vue3 or , needs to handle large/multi-thousand-page PDFs, S3 presigned URLs…
doc-converter
Universal document format converter - DOCX, PDF, Markdown, HTML, TXT.