Scenarios

Screenshots in pull requests

A pull request that changes the UI should show the change. Here's how to get before-and-after screenshots into a PR description, from a coding agent, the command line or CI.

What you'll need

  • A drop.media account, and either the MCP server connected to your coding agent or an API key with files:write.

From a coding agent

  1. Connect drop.media
    $ claude mcp add --transport http drop https://drop.media/mcp

    Other agents: see AI agents.

  2. Ask for the screenshots

    With a browser tool (such as Playwright), the agent takes the screenshots, calls create_upload_link for each and sends the file with curl. The bytes go straight to storage, so even a long screen recording never passes through the model.

    > Take before and after screenshots of /settings and add them
      to the PR description. Make them expire in 30 days.
  3. The agent pastes the markdown

    Every upload returns a markdown snippet, so the description ends up like this:

    ## Before / after
    
    ![Settings, before](https://cdn.drop.media/acme/settings-before.png)
    ![Settings, after](https://cdn.drop.media/acme/settings-after.png)

From the command line

-m prints markdown instead of plain links:

$ drop before.png after.png -m --expires 30d
![before](https://cdn.drop.media/acme/before.png)
![after](https://cdn.drop.media/acme/after.png)

From CI

A GitHub Actions step that uploads screenshots from a test run and comments on the PR. Store a key with only files:write as the DROP_API_KEY secret:

- name: Upload screenshots
  env:
    DROP_API_KEY: ${{ secrets.DROP_API_KEY }}
    GH_TOKEN: ${{ github.token }}
  run: |
    npx -y drop-media screenshots/*.png -m --expires 30d > shots.md
    gh pr comment ${{ github.event.pull_request.number }} --body-file shots.md

Private repositories

Public links can be opened by anyone who has them. For screenshots that shouldn't leave the team, upload them as private (--private) and share them another way: signed links expire, so they don't suit a PR description that people read for months.

Cleaning up

PR screenshots are rarely needed once the PR is merged. --expires 30d (or expires_in on the API and MCP tools) deletes them automatically.