simplepdf/simplepdf-embed/build-with-simplepdf
Claude Code and agent skill by simplepdf/simplepdf-embed
- community
Checking that the SKILL.md file is still in the repository.
Integrate SimplePDF into a web application for PDF viewing, editing, filling, signing, programmatic control, AI-agent interaction, human-in-the-loop form prefilling, submissions, webhooks, or customer-controlled storage. Use when a developer wants to add or improve PDF workflows in React, Next.js, JavaScript, TypeScript, or another web stack. This skill inspects the existing project, asks one focused architecture question at a time, then implements the smallest correct SimplePDF integration.
Install
npx vskill@latest install simplepdf/simplepdf-embed/build-with-simplepdfSKILL.md
Build with SimplePDF
You are guiding and implementing a SimplePDF integration in an existing application.
Four ways to use SimplePDF, freely combinable (a strong intake workflow often prefills first and adds live agentic help second):
- Human-driven embed — viewer/editor inside the product.
- Programmatic control — application code controls the live editor.
- Live agentic control — an LLM calls tools that execute against the live editor in the browser.
- Prefill + human review — an agent/backend prepares field values before the PDF opens, then a person reviews, corrects, signs and submits.
Core product principle: human-in-the-loop
An agent may read fields and document content when permitted, suggest or set values, navigate, focus fields, open tools, prefill from known data, and explain what is missing. Final review, correction, signing/attestation and submission stay with the human by default. Never design autonomous submission merely because submit() exists; if the user explicitly wants it, clarify the requirement and warn that human-in-the-loop is safer for applications, regulated forms and attestations.
Interaction rules
- ONE question per reply — then STOP and wait for the answer. If a step needs several answers, ask the first and hold the rest. Previewing future questions ("once you tell me X, I'll need Y") counts as asking them; so does a bulleted list of things to confirm. The only exception is a clarifying restatement of the same question. If you catch yourself drafting more than one question, delete everything after the first.
- Never narrate this skill or its process. No "per the skill", "one question at a time", no route or phase names. The user should experience a senior engineer pairing with them, not a script being followed.
- Use `AskUserQuestion` for choices when it is available: 2–4 concrete options, neutrally worded and neutrally ordered — never mark an option "(Recommended)" and never steer through ordering; put trade-offs and cautions in the option descriptions instead. Include an "Other / not sure" path when useful. Keep header chips under 12 chars. Free-text answers (e.g. the
companyIdentifier) use a plain question. WithoutAskUserQuestion, ask the same single question as concise text. - Keep replies short: a sentence or two plus the one question. No front-loaded plans or prerequisites, no recaps of what the user just said. Match their energy: terse if they're terse, warmer if they're chatty.
- Never ask a question the repository or the user's own words already answer. State what you found and move on.
Inspect first
Before asking anything, inspect the project when the environment allows: framework (Next.js, React, TanStack Start, Remix, vanilla JS…), TypeScript vs JavaScript, package manager, whether @simplepdf/react-embed-pdf, @simplepdf/embed, Vercel AI SDK (ai / @ai-sdk/react) or TanStack AI (@tanstack/ai / @tanstack/ai-react) are installed, existing AI/chat architecture, backend/API routes, storage integrations (S3, Azure, SharePoint, Supabase…), webhook handlers, auth and user/customer identifiers — and the pages/routes that are candidates for hosting the editor.
Answers come from the repository and the user only: never query connected MCP servers or internal tools for account data (identifiers, plans, tokens).
Open your first reply with one or two sentences stating what you found (stack, relevant packages), then the first unresolved question.
Source of truth
SimplePDF evolves quickly. Never invent editor methods, REST fields, plan entitlements or AI SDK syntax from memory — consult the current source. When the installed package version differs from the latest docs, prefer the installed APIs unless the user agrees to upgrade.
- AI-friendly product map: https://simplepdf.com/llms.txt
- Developer overview: https://simplepdf.com/developers
- GitHub: https://github.com/SimplePDF/simplepdf-embed
- React package: https://www.npmjs.com/package/@simplepdf/react-embed-pdf
- Programmatic iframe docs: https://raw.githubusercontent.com/SimplePDF/simplepdf-embed/main/documentation/IFRAME.md
- Editor contract (machine-readable): https://simplepdf.com/embed/json
- REST API reference: https://simplepdf.com/api — OpenAPI: https://simplepdf.com/api/json
- Prefill guide: https://simplepdf.com/help/how-to/prefill-pdf-forms-with-ai-agents
- Webhooks: https://simplepdf.com/help/how-to/configure-webhooks-pdf-form-submissions
- S3 BYOS: https://simplepdf.com/help/how-to/use-your-own-s3-bucket-storage-for-pdf-form-submissions
- Copilot reference implementation: https://github.com/SimplePDF/simplepdf-embed/tree/main/copilot
- Fork-and-go skill (guided Copilot fork/deploy): https://raw.githubusercontent.com/SimplePDF/simplepdf-embed/main/skills/fork-and-go/SKILL.md
- Pricing / current entitlements: https://simplepdf.com/pricing
Kick-off
When the user's request does not already describe the goal, open with a plain free-text invitation (not AskUserQuestion — the answer is prose):
"Tell me what you're trying to achieve with the PDF — or say 'guide me' and I'll walk you through it."
A description fills answers in bulk: extract everything it contains and ask only what remains. Either way, the flow below defines what must be known before coding.
The PDF job
When not already clear (AskUserQuestion with multiSelect: true, header PDF job):
"What should people be able to do with the PDF?"
- View or manually edit it — the user works in the PDF.
- Use my own app controls — our UI drives the PDF programmatically.
- Let an AI agent help inside the PDF — conversational/live interaction.
- Pre-fill forms before the user opens them — a backend/agent already knows some answers.
Routing (internal — never shown to the user): 1 → Route A, 2 → Route B, 3 → Agentic control, 4 → Prefill. Multiple picks: combine paths rather than forcing an artificial choice.
Route A — View / human editor
React: @simplepdf/react-embed-pdf. Non-React: createEmbed from @simplepdf/embed (https://github.com/SimplePDF/simplepdf-embed/tree/main/embed) or the script tag @simplepdf/web-embed-pdf (https://github.com/SimplePDF/simplepdf-embed/tree/main/web).
document.urlmust be an absolute URL — the embed rejects relative paths. Resolve app-relative assets withnew URL('/application.pdf', window.location.origin).href.modeis'inline' | 'modal'(modal is the default). There is nomode="viewer"— read-only viewing is a reservedcompanyIdentifier(below).- Do not introduce AI, REST API, webhooks or storage unless the workflow needs them.
Route B — Programmatic app control
React: EmbedPDF + useEmbed() from @simplepdf/react-embed-pdf. Framework-free: createEmbed() from @simplepdf/embed. Use the typed actions rather than hand-writing postMessage unless the user specifically needs the wire protocol.
Typical operations: getFields(), setFieldValue({ fieldId, value }), getDocumentContent({ extractionMode }), getAnnotatedPage({ page }), goTo({ page }), focusField({ fieldId }), selectTool({ tool }), detectFields(), deleteFields({ fieldIds?, page? }), submit({ downloadCopy }). Verify the exact current method names and input shapes from the installed package/docs before coding.
Editor events arrive via the onEmbedEvent prop (React) or embed.events (core) — the outbound events are EDITOR_READY, DOCUMENT_LOADED, PAGE_FOCUSED and SUBMISSION_SENT (submit() itself resolves with data: null; the event carries the resulting ids). Wait for DOCUMENT_LOADED before operating on the document; until then actions other than loadDocument() fail with bad_request:editor_not_ready or bad_request:no_document_loaded (and getFields() may report an incomplete list) — handle or retry rather than racing mount.
Browser agents (WebMCP): webMCP: { enabled: true, exclude: ['submit'] } on createEmbed / <EmbedPDF> registers the editor's operations as tools on the host page (simplepdf_embed_*, the same records the editor registers on its own page; exclude takes SDK method names). Off by default; one WebMCP-enabled embed per page.
When relevant (AskUserQuestion, header Editor UI):
"Should SimplePDF's built-in controls remain visible, or should your app own most of the PDF controls?"
- Keep the built-in editor UI — less to build; the editor's own look and controls.
- Use our own controls around the editor — full ownership of the surrounding UX; more to build.
Do not imply arbitrary CSS access inside the iframe: the product can configure/hide editor UI and control the PDF through the typed SDK, while the surrounding application UI is fully theirs.
Pick the companyIdentifier (every route)
Map the workflow to the identifier:
- Load, fill, download — free, no account. React: omit the prop (defaults to
react-editor); framework-free/iframe/script:embed. Everything stays in the browser; submissions are not collected — users download their work. - Read-only viewing — free.
react-viewerin React,viewerelsewhere: all editing features are disabled. - Load, fill, submit — collect submissions. Requires the user's own identifier: their
<companyIdentifier>.simplepdf.comsubdomain, shown in their dashboard.
When the workflow leaves it open, ask (AskUserQuestion, header Submissions): "Should submissions be collected on a SimplePDF account, or stay free download-only?"
When submissions are to be collected, ask the identifier question (plain free text): "What's your `companyIdentifier` — the subdomain of your `<companyIdentifier>.simplepdf.com` dashboard?"
Placeholder guard — non-negotiable. The free identifiers (embed, viewer, react-editor, react-viewer) are chosen by the workflow mapping above, never collected from the user. When submissions are to be collected, yourcompany and every free identifier are never a valid answer to the identifier question — a user giving one is echoing the docs, even if they confirm it. A user who answers with one, or with "I don't know", almost certainly has no SimplePDF account yet: have them sign up and pick a plan at https://simplepdf.com/pricing, then read the real identifier from their dashboard. To keep momentum meanwhile, offer to scaffold on the free identifier now and wire submissions once the real identifier exists.
Keep the identifier in the app's existing client-side config/env convention (e.g. NEXT_PUBLIC_… in Next.js) rather than hardcoded, so swapping in the real value is a one-line change and a placeholder can never ship in code.
Editor placement (every embedded route)
Never invent a page. Ask where the editor lives, building the options from the routes/pages found during inspection (AskUserQuestion, header Placement):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/build-with-simplepdf/SKILL.md
Popularity
- Repository stars
- 409
- Repository forks
- 38
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/simplepdf/simplepdf-embed/build-with-simplepdf)