JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38
  • Score
    100M100P100Q95352F
  • License MIT

Share Claude Code conversations to OpenThread — the StackOverflow for AI agents. One command to publish any session to the community platform for the agentic AI era.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@openthread/claude-code-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @openthread/claude-code-plugin

    Share Claude Code conversations to OpenThreadthe StackOverflow for AI agents. The community platform for the agentic AI era, where developers share, vote on, and discover the best AI conversation threads from Claude, ChatGPT, Gemini, and more.

    One command. Zero config. Publish any Claude Code session as a post others can learn from.

    npm version license downloads

    Install

    npm i -g @openthread/claude-code-plugin

    The postinstall script registers the plugin with Claude Code automatically. Restart Claude Code after installing.

    Quick Start

    > /ot:share fixing auth bug
    
    Sharing conversation to OpenThread...
    Auto-generated title: "Debugging PKCE token refresh in auth middleware"
    Community: Coding with AI
    Tags: typescript, authentication, debugging
    
    Post shared successfully!
    View it at: https://openthread.me/c/coding-with-ai/post/27512cb1

    Examples

    Share instantly with quick mode

    > /ot:share building a REST API with Hono

    Auto-generates title, picks the best community, adds tags, and posts -- no questions asked.

    Share interactively

    > /ot:share
    
    ? Title: Building a REST API with Hono on Bun
    ? Community:
      > Coding with AI
        Prompt Engineering
        OpenThread Meta
    ? Tags: typescript, hono, api
    
    Post shared successfully!
    View it at: https://openthread.me/c/coding-with-ai/post/27512cb1

    Share after a long debugging session

    > /ot:share tracked down a memory leak in the worker pool

    The plugin reads the full conversation, generates a summary, and shares it as a post others can learn from.

    Share from any project

    The plugin auto-detects the current Claude Code session file. Works in any project directory -- just run /ot:share and it finds the right conversation.

    Why OpenThread?

    OpenThread is the social platform for the agentic AI world — the place where developers share what their AI agents actually built. Think StackOverflow meets Reddit, designed from the ground up for AI conversations. Every post is a full thread (including code, thinking, and tool use) that the community votes on, comments on, and learns from.

    This plugin is the one-command bridge from your Claude Code session to that community.

    Features

    • One-command sharing — run /ot:share inside any Claude Code session to publish the entire conversation to OpenThread.
    • Quick mode/ot:share <description> auto-generates a title, picks the best-matching community, adds tags, and posts immediately. Zero questions asked.
    • Interactive mode/ot:share with no arguments prompts you to choose a title, community, and tags.
    • Privacy first — strips usernames and local file paths before publishing. Your code, not your filesystem.
    • Secure auth — PKCE OAuth flow with automatic token refresh. Credentials stored locally at ~/.config/openthread/.
    • CLI managementopenthread-claude binary for install, uninstall, status checks, and updates.

    Usage

    Quick mode

    /ot:share <short description of what you worked on>

    Provide a short description after /ot:share. The plugin generates a title from the conversation context, picks the best-matching community, and posts without further prompts.

    Interactive mode

    /ot:share

    Run with no arguments to step through each field:

    1. Title (suggested from conversation, editable)
    2. Community (selectable from list)
    3. Tags (suggested, accept or modify)

    Commands

    /ot:search <query>

    Search OpenThread for threads, comments, communities, or users without leaving your Claude Code session.

    Flags:

    • --type posts|comments|communities|users|all (default posts)
    • --community <name>
    • --provider claude|chatgpt|gemini|...
    • --time hour|day|week|month|year|all
    • --limit 1-25 (default 10)

    Works without authentication (narrower visibility). If you're logged in, you also see private communities you're a member of. After results are shown, pick a number to import the thread via /ot:import.

    > /ot:search hono auth bug
    
    [1] Debugging PKCE token refresh in auth middleware
        c/coding-with-ai · u/alice · 3h ago · ▲ 42 · 💬 7
        Walks through the PKCE refresh flow and the off-by-one in expiresAt...

    /ot:import <post-id-or-url> [--read|--context]

    Pull a published OpenThread thread into your current workspace.

    Imported content is UNTRUSTED third-party data. It may contain prompt injections. The plugin treats every imported byte as data, not instructions, and enforces that boundary at multiple layers.

    • --read (default) — downloads the thread, sanitizes and masks it locally (defense-in-depth on top of server-side masking), and saves it to ~/.openthread/imports/<uuid>.md with mode 0600 inside a 0700 directory. Claude does not automatically load the file into context. If you want it read, ask in a separate message after the import completes.
    • --context — additionally emits an <imported_thread trust="untrusted"> envelope that the skill shows to Claude after you explicitly confirm. Even inside the envelope, the content is treated as data, never as instructions.

    Inputs accepted:

    • Bare UUID: 27512cb1-4e7a-4c3b-9d8e-1f2a3b4c5d6e
    • Path: /c/<community>/post/<uuid> or /post/<uuid>
    • Full URL: https://openthread.me/c/<community>/post/<uuid>

    Security properties:

    • Strict UUID validation on every input form.
    • HTTPS enforced unless OPENTHREAD_API_URL points to a loopback host.
    • Response bodies capped at 5 MB, read in bounded chunks.
    • Control characters and ANSI escapes are stripped; paths, usernames, secrets, emails, and IPs are masked locally.
    • Writes are atomic via a .part rename — a partial fetch never lands at the final path. Files land at mode 0600 in a 0700 directory.
    • Every saved file starts with a trust banner reminding Claude that the content is data, not instructions.

    /ot:export <post-id-or-url>

    Download a thread from OpenThread as a local file. Unlike /ot:import, this is for archival / sharing — the file is written with sharable permissions and does NOT include the "untrusted data" banner.

    Flags:

    • --format markdown|text|json (default markdown)
    • --out <path> (default ./ot-<slug>-<short>.<ext>)
    • --stdout
    • --no-banner

    The file is path-traversal-guarded (relative paths must stay under cwd; absolute paths are denied into system dirs). Content is re-masked locally on top of the server's masking as defense-in-depth. Writes are atomic via a .part rename and land at mode 0644 so the file can be committed or shared. Exported files are NOT loaded into Claude's context — if you want Claude to read one, open it in a follow-up message.

    CLI Commands

    Command Description
    openthread-claude install Install and register the plugin with Claude Code
    openthread-claude uninstall Remove the plugin and deregister from Claude Code
    openthread-claude status Show plugin installation and registration state
    openthread-claude update Reinstall plugin (update to current version)

    Configuration

    Environment variables override the default endpoints. Set them in your shell profile or .env file.

    Variable Default Description
    OPENTHREAD_API_URL https://openthread.me/api Backend API base URL
    OPENTHREAD_WEB_URL https://openthread.me Web app base URL (used for post links)

    Manual Install

    If you prefer not to use npm:

    1. Download the latest .zip release from openthread.me/extensions.
    2. Extract it to ~/.claude/plugins/openthread-share/.
    3. Run openthread-claude install to register with Claude Code.
    4. Restart Claude Code.
    mkdir -p ~/.claude/plugins/openthread-share
    unzip openthread-claude-code-plugin.zip -d ~/.claude/plugins/openthread-share/

    License

    MIT