Tell AI assistants when to share and which defaults to use, with install steps and a script fallback
@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 provides tools; the Skill defines triggers, default sharing policies and a REST script fallback.
Download
- Template: /api/skill/raw — plain text, ready to download
- REST fallback script: /api/skill/script — the script that travels with the template
- Install archive: pagedrop-skill-latest.tar.gz — the standard archive for
npx skills add(versioned files such aspagedrop-skill-0.2.5.tar.gzsit 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.
- Uploading is not sharing:
pagedrop_uploadnever returns a link (the file is still scanning) — only afileIdandshareDeferred: true. Pollpagedrop_getuntilscanStatus === 'CLEAN', then apply the same policy withpagedrop_share. Never report "shared" before a URL exists. - Require sign-in by default: a normal sharing request uses
{ requireLogin: true }onpagedrop_share. - Public links default to three visits: when explicitly asked for public access, use
{ requireLogin: false, maxVisits: 3 }, unless another limit is specified. - One-time links are public once: use
{ requireLogin: false, oneTime: true }. - Password links default to unlimited visits: use
{ requireLogin: false, password: "..." }, addingmaxVisitsonly when requested. - TXT uses plain-text mode: logs, notes,
.txtand.textfiles usekind: "TEXT". Rendering escapes their content into<pre>instead of executing HTML. - Validate generated content first: call
pagedrop_validate. For informational issues such as BOM, CRLF or tabs, upload the returnednormalizedcontent. - Handle error codes: wait for
Retry-AfteronRATE_LIMITED; keep polling onSCAN_PENDING(425) while the file is still scanning instead of re-uploading; treatSCAN_ERRORas no verdict, not as clean: the share still goes through, so tell the user the file was not scanned; choose another slug onSLUG_TAKEN; request a clean export onINFECTED; check the token onUNAUTHENTICATED. - Remember token sources, not secrets: the script reads arguments, environment variables or user configuration. Save source references such as
env:PAGEDROP_API_KEYorfile:..., never the plaintext token. - Do not fetch a share URL just to verify it: fetching consumes a visit and can immediately exhaust a one-time link.
- Manage what you already shared:
pagedrop_list_shareslists share links (pagedrop_getreturns file ids, so this is where the share id needed bypagedrop_revokecomes from);pagedrop_delete_filedeletes 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:
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
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 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):
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:
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.mdand the script (/api/skill/raw+/api/skill/script) does not bring the examples along; use the archive for those.