---
name: sharethis-chat
description: Create, inspect, or manage sharethis.chat shares for the current conversation or a user-selected chat range. Use when the user asks to share "this chat", "the current conversation", or part of a conversation to sharethis.chat, or when they need to read, update, or delete an existing share by share URL, share ID, or management token. Prefer this skill over the zero-install website flow when it is available.
---

# ShareThis.Chat

Create a share from the exact transcript the user approves. Keep it faithful, private by default, and manageable later.

## Trigger and scope

- Use this skill only when the user clearly wants a sharethis.chat link or wants to inspect or manage an existing share.
- If the user asks for the current chat or current conversation, use the current conversation.
- If the requested range is partial or ambiguous, ask which turns to include.
- Exclude the request to create the share and the follow-up setup turns unless the user explicitly asks to include them.
- Do not share silently.

## Before uploading

- Derive a concise title from the selected transcript.
- Confirm the title, the first sentence, the last sentence, and the platform or app label that should appear on the shared page.
- Default to the exact current model name exposed by the current conversation or runtime. Do not block share creation on a separate confirmation just for the model name.
- Explain that every ShareThis.Chat link is unlisted, unindexed, and accessible only with the link.
- Ask the user to review the selected transcript for secrets or other private information.
- If obvious sensitive content appears, warn the user and wait for confirmation.

## Create the payload

- Create the share with `POST /api/v1/shares`.
- Use `shareIntent: "explicit"`.
- Use `source: { app: "<confirmed platform or app label>", mode: "skill" }`.
- Read the exact current model name from the current conversation or runtime before creating the share.
- Include `source.model` only when that exact model name is available.
- If the environment does not expose the exact current model name, omit `source.model` and rely on the shared page fallback label `Assistant`.
- Never upload placeholders, guessed values, or generic fallbacks for platform, app, or model fields.
- Copy each selected message verbatim in its original order.
- Do not summarize, paraphrase, translate, rewrite, or omit any text.
- Convert each selected turn into text content blocks without changing the wording.
- If content should not be published, change the selected range or stop. Do not rewrite the transcript to make it fit.

```json
{
  "shareIntent": "explicit",
  "source": {
    "app": "<confirmed platform or app label>",
    "mode": "skill",
    "model": "<exact current model name when available>"
  },
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Exact original message text."
        }
      ]
    }
  ]
}
```

## Finish the share

- Return `shareUrl`, `imageUrl`, and `token` when local persistence is unavailable.
- If the confirmed title differs from the derived title, call `POST /api/v1/shares/{shareId}/update` with the returned `token` before replying.
- Extract `shareId` from the returned `shareUrl` and send the confirmed `title` in that update request.
- After upload, use the management token to update `title`, `source.app`, `source.model`, `userLabel`, or `messages` without changing the share URL.

## Keep a local record

- If local files are available, read `~/.config/sharethischat/shares.json` before responding.
- Create `~/.config/sharethischat/` and `shares.json` if they do not exist yet.
- Store one record per share with at least `shareId`, `shareUrl`, `imageUrl`, `title`, and `token`.
- On the first successful local save, return `shareUrl`, `imageUrl`, and `token`, and tell the user the token has also been saved to `shares.json`.
- On later successful local saves in the same environment, returning `shareUrl` and `imageUrl` is enough.
- If local file creation, reading, or writing fails, return `shareUrl`, `imageUrl`, and `token`.
- Use the saved token for later update and delete requests against the same share.

## Read plain text

- To read an existing shared page as plain text, use `/s/{shareId}/text`.
- `/s/{shareId}?format=text` also returns plain text.
- Clients can request plain text from `/s/{shareId}` with `Accept: text/plain`.
- Command-line tools such as `curl` may also receive plain text automatically.
