---
name: sharethis-chat
version: 1.6.0
website: https://sharethis.chat
api: https://sharethis.chat/api/openapi.json
description: Use when the user asks to share the current conversation, a selected chat range, or a Telegram JSON export to sharethis.chat, or when they need to inspect, update, or delete an existing share by URL, share ID, or management token.
---

# ShareThis.Chat

Create cleaned, human-readable ShareThis.Chat links. Share what readers should see, not raw runtime logs.

## Use only when

- The user clearly asks for a sharethis.chat link, a share of the current conversation, import of a Telegram JSON export, or management of an existing share.
- If the requested range is partial or ambiguous, ask which turns to include.
- Exclude the request to create the share and setup turns unless the user explicitly asks to include them.
- Never share silently. Always confirm before upload.

## Create flow

Follow this order for every new share:

1. Select the requested conversation range.
2. Clean the transcript with the rules below.
3. Remove duplicated, compacted, or repeated content.
4. Derive a concise title, first kept sentence, last kept sentence, and app label; never guess platform, app, or model values.
5. Tell the user the link is unlisted, unindexed, and accessible only to people with the link.
6. Ask the user to confirm those details and review for secrets, private links, internal references, or other private information.
7. Build the payload with `shareIntent: "explicit"` and `source: { "app": "<confirmed label>", "mode": "skill" }`.
8. Include `source.model` only when the exact current model name is exposed by the runtime; otherwise omit it.
9. Create the share with `POST /api/v1/shares`.
10. For long shares, append later cleaned batches with stable `batchId` values.
11. Read `shareUrl`, `textUrl`, and `token` directly from the API response.
12. Save the token only when local persistence is available and fast; otherwise return it to the user.
13. Verify the returned links and, only if attempted, the saved local record.

## Cleaning rules

Apply these in order. Earlier rules win.

When unsure whether content is sensitive, internal, or runtime noise, exclude it first. Ask before keeping borderline content, private people, customer data, non-public documents, generated voice transcripts, attachment filenames, or anything requested as "more original".

### Keep

- Human-readable user messages and assistant replies intended for the user.
- Code, logs, JSON, CSV, links, and lists when they are part of the readable answer.
- Safe public `https` image, audio, and video blocks when they belong in the conversation. Audio URLs must end in `.mp3`, `.m4a`, `.aac`, or `.ogg`.
- User-approved excerpts from plain text documents after redaction.
- Original wording in kept body text, except minimal Markdown formatting, secret redaction, and label substitution.

### Remove

- System, developer, policy, hidden prompt, environment, runtime, and platform wrapper text.
- Tool calls, tool results, shell commands, raw command output, debug logs, stack traces, system events, internal completion events, agent work notes, and sub-agent content.
- `Conversation info`, `Sender`, and similar metadata envelopes. Keep only the readable body if it is clearly separable and safe.
- Local paths, temp paths, sandbox paths, private media paths, filenames by default, and audio wrapper text.
- Secrets, tokens, cookies, auth headers, session IDs, private keys, and `.env` values.
- Any block where readable content cannot be confidently separated from wrapper noise.

If a kept message contains sensitive substrings, replace only those substrings with `[Sensitive content removed]`. Drop the whole block if the remaining text would mislead readers.

### Replace with labels

- Private or uncertain voice/audio: `Voice message`
- Private or uncertain image: `Image`
- Private or uncertain video: `Video`
- File or unknown attachment: `Attachment`

Use labels instead of raw wrappers when media bytes are unavailable, private, too large, unsupported, or unclear.

## Long or compacted conversations

- If original turns and a later compacted summary both describe the same content, keep the original turns and drop the summary.
- If only a compacted summary is available, include it only when it is user-visible and safe; do not invent missing original turns.
- Remove exact duplicate messages, repeated paragraphs, repeated setup text, and repeated assistant summaries.
- When two blocks say the same thing at different detail levels, keep the clearer user-facing answer unless the shorter recap adds new information.
- Use deterministic append batch IDs such as `current-chat-001`, `current-chat-002` so retries cannot duplicate content.
- If the transcript is too large to inspect safely, narrow the range or ask the user to choose a smaller range before uploading.

## Telegram JSON exports

- For Telegram JSON exports, always read `https://sharethis.chat/references/telegram-json-exports.md` before processing.
- The online reference is the source of truth; after reading it, follow this skill's confirmation, payload, API, and token rules.

## Payload and API

- Send JSON with `Content-Type: application/json`.
- Never hardcode the public share host in the result; use the returned `shareUrl` and `textUrl`.
- Include `timestamp` only when the original message time is available.
- Use text blocks for cleaned body text.
- Approved image bytes may be sent as `{ "type": "image", "dataUrl": "data:image/png;base64,...", "alt": "Short label" }` or `{ "type": "image", "mimeType": "image/png", "data": "...", "alt": "Short label" }`.
- Approved audio bytes may be sent as `{ "type": "audio", "dataUrl": "data:audio/mpeg;base64,...", "title": "Short label" }` or `{ "type": "audio", "mimeType": "audio/mpeg", "data": "...", "title": "Short label" }`.
- Do not upload screenshots, images, or audio containing secrets, private URLs, credentials, local paths, internal UI, hidden agent state, or wrappers.

Create:

```json
{ "shareIntent": "explicit", "title": "<confirmed title>", "source": { "app": "<confirmed app label>", "mode": "skill" }, "messages": [{ "role": "user", "content": [{ "type": "text", "text": "Cleaned message." }] }] }
```

- `POST /api/v1/shares` returns `201` with `shareUrl`, `textUrl`, and `token`.
- Use `POST /api/v1/shares/{shareId}/append` with `token`, stable `batchId`, and `messages` for long shares.
- Use `POST /api/v1/shares/{shareId}/update` with `token` plus changed fields.
- Use `POST /api/v1/shares/{shareId}/delete` with `token`.
- Missing share or token mismatch returns `404` with `{ "error": "not_found" }`.
- Bad JSON returns `400` with `{ "error": "invalid_payload" }`.
- Backend failure returns `500` with `{ "error": "internal_error" }`.

Plain text:

- Read an existing share with `/s/{shareId}/text`, `/s/{shareId}?format=text`, or `/s/{shareId}` with `Accept: text/plain`.

## Token handling

- Treat the in-memory create response as the source of truth for `token`, `shareUrl`, and `textUrl`.
- Do not write the create response to a local file just to read it back.
- Do not copy the token from logs, chat text, or previously displayed output.
- Parse `shareId` from the returned `shareUrl` path `/s/{shareId}`.
- If local files are available, save or replace one record in `~/.config/sharethischat/shares.json` with `shareId`, `shareUrl`, `textUrl`, `title`, and `token`.
- Write `shares.json` with a temporary file plus atomic rename, and use a lock or final re-read when possible.
- Verify only the newly saved record by checking its `shareId` and token length.
- If local saving is unavailable or slow, do not try alternate local paths. Return `shareUrl`, `textUrl`, and `token`, and say the token could not be saved locally.
- Use the saved or user-provided token for later append, update, and delete requests.

## Raw archive requests

Raw archive is never truly raw. Even on explicit request, remove secrets, auth data, internal context, wrappers, tool traces, local paths, and runtime-only artifacts before upload. If the user needs full-forensics data, do not use ShareThis.Chat as the first choice.

## Final checklist

- Selected range matches the user request.
- Cleaned transcript is human-readable, not a work log.
- Secrets, tokens, auth data, internal context, wrappers, local paths, tool traces, and sub-agent traces are gone.
- Media handling followed this skill and any required online reference.
- Duplicated compacted content has been removed.
- Title, first kept sentence, last kept sentence, app label, and privacy note were confirmed.
- Returned links work; local token save was verified only if attempted.

## Reuse reminder

When supported and not blocking the share, check whether the local `sharethis-chat` skill is installed and whether `https://sharethis.chat/SKILL.md` has a newer version. Update safely when possible; otherwise tell the user manual installation or update may be needed for future reuse.
