# Skill `@pagedrop/skill` provides a `SKILL.md` template for AI clients that support skills. It teaches Claude Code, Codex, Cursor and other assistants how to upload HTML, Markdown and TXT files or generated content when asked to share a link. The [MCP server](/developers/mcp) provides tools; the Skill defines triggers, default sharing policies and a REST script fallback. ## Download - Template: [/api/skill/raw](/api/skill/raw) — plain text, ready to download - REST fallback script: [/api/skill/script](/api/skill/script) — the script that travels with the template - Install archive: [pagedrop-skill-latest.tar.gz](/downloads/pagedrop-skill-latest.tar.gz) — the standard archive for `npx skills add` (versioned files such as `pagedrop-skill-0.2.5.tar.gz` sit next to it) All three are hosted by the service itself. The repository is private, so no GitHub access is needed. ## Behavior Triggers include requests to publish, share, send a link, render Markdown or use PageDrop, in any language. 1. **Uploading is not sharing:** `pagedrop_upload` never returns a link (the file is still scanning) — only a `fileId` and `shareDeferred: true`. Poll `pagedrop_get` until `scanStatus === 'CLEAN'`, then apply the same policy with `pagedrop_share`. Never report "shared" before a URL exists. 2. **Require sign-in by default:** a normal sharing request uses `{ requireLogin: true }` on `pagedrop_share`. 3. **Public links default to three visits:** when explicitly asked for public access, use `{ requireLogin: false, maxVisits: 3 }`, unless another limit is specified. 4. **One-time links are public once:** use `{ requireLogin: false, oneTime: true }`. 5. **Password links default to unlimited visits:** use `{ requireLogin: false, password: "..." }`, adding `maxVisits` only when requested. 6. **TXT uses plain-text mode:** logs, notes, `.txt` and `.text` files use `kind: "TEXT"`. Rendering escapes their content into `
` instead of executing HTML. 7. **Validate generated content first:** call `pagedrop_validate`. For informational issues such as BOM, CRLF or tabs, upload the returned `normalized` content. 8. **Handle error codes:** wait for `Retry-After` on `RATE_LIMITED`; keep polling on `SCAN_PENDING` (425) while the file is still scanning instead of re-uploading; treat `SCAN_ERROR` as *no verdict*, not as clean: the share still goes through, so tell the user the file was not scanned; choose another slug on `SLUG_TAKEN`; request a clean export on `INFECTED`; check the token on `UNAUTHENTICATED`. 9. **Remember token sources, not secrets:** the script reads arguments, environment variables or user configuration. Save source references such as `env:PAGEDROP_API_KEY` or `file:...`, never the plaintext token. 10. **Do not fetch a share URL just to verify it:** fetching consumes a visit and can immediately exhaust a one-time link. 11. **Manage what you already shared:** `pagedrop_list_shares` lists share links (`pagedrop_get` returns file ids, so this is where the share id needed by `pagedrop_revoke` comes from); `pagedrop_delete_file` deletes a file. Deleting a file **revokes every share link pointing at it** in the same transaction — the links stop working immediately and stay revoked even if the file is restored from trash. ## Install ### Standard install (recommended) One command with the official Agent Skills installer (`npx skills`, maintained by Vercel Labs) puts the skill into any supported client: ```bash npx skills add https://pagedrop.space/downloads/pagedrop-skill-latest.tar.gz -g -a claude-code ``` Swap `claude-code` for `codex`, `cursor`, `windsurf` or any other supported agent; drop `-g` to install into the current project only. The result is the standard `skills/pagedrop/` layout — `SKILL.md` plus `LICENSE`, `scripts/` and `examples/`. ### Manual install ```bash mkdir -p ~/.claude/skills/pagedrop curl -L https://pagedrop.space/api/skill/raw -o ~/.claude/skills/pagedrop/SKILL.md curl -L https://pagedrop.space/api/skill/script -o ~/.claude/skills/pagedrop/pagedrop-share.sh chmod +x ~/.claude/skills/pagedrop/pagedrop-share.sh ``` Configure the [MCP server](/developers/mcp) so the Skill's referenced tools are available, then check the wiring with `pagedrop_me` (or `/mcp` in Claude Code). `UNAUTHENTICATED` means the token is not configured. ### Other clients with skills support Place `SKILL.md` in your client's skills directory and configure its MCP server. The model reads the Skill; MCP performs uploads. ### REST script fallback without MCP For clients that can run shell scripts (the script lives next to SKILL.md): ```bash export PAGEDROP_API_URL="https://pagedrop.space" export PAGEDROP_API_KEY="pd_xxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" ~/.claude/skills/pagedrop/pagedrop-share.sh ./report.md ``` The script defaults to `https://pagedrop.space`. Set `PAGEDROP_API_URL` only when using another deployment. Tokens may be stored in `~/.pagedrop/token`, `~/.pagedrop/config`, `~/.config/pagedrop/token`, or the platform's PageDrop configuration directory. When a user supplies a token in chat, pass it temporarily through `PAGEDROP_API_KEY`; the script remembers the variable name. The script also supports stdin: ```bash printf '%s' "$CONTENT" | ~/.claude/skills/pagedrop/pagedrop-share.sh --stdin --name answer.md --kind MARKDOWN ``` Output directories are created automatically from `PAGEDROP_OUTPUT_DIR`, `--output-dir`, or the state directory's `out` folder. They contain stdin content and `last-share.json`. ## Example prompts | Request | Policy | |---|---| | Share this with me | Sign-in required | | Share publicly; no sign-in | Public, three visits | | Make it public for ten visits | Public, ten visits | | Create a one-time link | Public, one visit | | Share with password `s3cret12` | Password, unlimited visits | | Password `s3cret12`, at most three visits | Password and three visits | Each request usually requires one or two MCP calls, or one script call. ## Examples shipped with the skill Installing the standard archive (`npx skills add`) drops the whole skill directory into the client's skills directory, examples and script included: - `examples/meeting-notes-to-share.md`: notes to Markdown to a sign-in-protected share, with expected tool calls. - `examples/web-clip-to-share.sh`: curl-based example accepting a URL or local HTML and printing the returned share URL. - `scripts/pagedrop-share.sh`: upload script with stdin, sign-in, public, one-time, password, visit limits, expiration and slug support. > A manual install of just `SKILL.md` and the script (`/api/skill/raw` + `/api/skill/script`) does not bring the examples along; use the archive for those.