Turning Claude Code Output Into Shareable Links

April 8, 2026

Faux terminal showing Claude Code creating a shareable gist link

Claude Code is great at generating useful output, but it still lacks one thing I need all the time: a clean way to share what it just made.

Usually I do not want to send someone an entire chat transcript. I want to send the artifact that came out of it: a markdown doc, a checklist, a plan, a code snippet, or a set of instructions.

So I built a simple habit around that. When I need to share something from an agent session, I tell the agent to create a gist.

Share the artifact, not the conversation

That small shift changes a lot.

Instead of copy-pasting from chat, I get a proper thing with a URL. It can be edited, forwarded, referenced later, and read without any of the surrounding session noise.

The key for me was making this portable. I rely on it enough that I put it into my personal agent setup in CLAUDE.md, so I can use the same pattern anywhere I run Claude Code.

That means I can ask for things like:

  • create a gist from this markdown file

  • make this shareable

  • give me a public link for this doc

And the agent already knows what to do.

The CLAUDE.md section

Here is the actual section from my global ~/.claude/CLAUDE.md that teaches the agent how to handle gists:

## Sharing Code via Gists

When sharing code, notes, or snippets via GitHub Gists, share the
`md.solberg.is` link instead of the `gist.github.com` URL. The URL
format is `md.solberg.is/<gist_id>` (no username prefix needed).

Always create secret gists (never `--public` unless explicitly asked).
Use `gh gist create <files> -d "descriptive title"`. The `-d`
description becomes the page title, so make it clear and useful.

Use correct filenames with proper extensions (e.g. `server.ts`,
`config.yml`, `query.sql`) so syntax highlighting works. For markdown
content, use a `.md` file.

That is all the agent needs. From this, it knows to use gh gist create, default to secret, pick a good filename, and return the right URL.

The skill matters more than the command

A shell alias around gh gist create is helpful, but it is not enough.

The real value is in encoding the rules I do not want to repeat:

  • use a sensible filename

  • add a descriptive title

  • default to secret gists unless I explicitly want public

  • warm the rendered page after creation

  • return the nice viewer URL, not just the GitHub gist URL

That turns gist creation from a command into a workflow. In practice the agent runs something like:

gh gist create migration-notes.md -d "Q2 database migration runbook"

And returns:

md.solberg.is/a1b2c3d4e5f6

A nicer gist reader

GitHub gists are useful, but not very pleasant to read. So I forked gists.sh and adapted it into my own single-user deployment at md.solberg.is. I also published my version here: jokull/md-solberg-is.

My version is configured around a simple route structure:

  • md.solberg.is/<gistId>

No username prefix, no ugly GitHub chrome, just the content.

It is deployed on Cloudflare Workers, and the local config is tied to my own GitHub account. The result is that an agent can create a gist and hand me back a clean link that is actually pleasant to send to people.

Encrypted gists

For sensitive content I have a small helper that encrypts locally with AES-256-GCM and puts the decryption key in the URL fragment, so the server only ever sees ciphertext:

~/Code/gists-sh/bin/encrypt-gist notes.md -d "Private notes"
# → md.solberg.is/abc123#key=base64url...

Only someone with the full URL (including the fragment) can decrypt the content.

Why this is useful every day

This ends up being useful constantly.

Sometimes I want to send someone a quick runbook. Sometimes it is a migration note, a short report, a debugging checklist, or a piece of markdown I want to reuse later. In all of those cases, chat is the wrong final container.

A shareable gist works better because it is:

  • detached from the session

  • easy to forward

  • durable

  • readable

  • easy for an agent to produce

Once you have that pattern, the end of an agent session changes. Instead of getting "here is the content," you get "here is the link."

That is much closer to how I actually work.

The broader lesson

The important idea is not really "use gists."

It is that if you rely on coding agents heavily, you should package your favorite behaviors into portable affordances: CLAUDE.md instructions, shell helpers, and small hosted tools.

In my case, one of the most useful ones is simple: if I ask for something shareable, the agent should know how to package it, publish it, and return a clean URL.

That is a tiny workflow upgrade, but I use it many times a day.

Comments 0

No comments yet. Be the first to comment!