npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xuwenhao83/openclaw-discord-autoname

v0.1.1

Published

OpenClaw plugin that automatically renames Discord threads after agent replies.

Readme

@xuwenhao83/openclaw-discord-autoname

OpenClaw plugin that renames Discord threads after agent replies.

Behavior

  • Runs on Discord agent_end.
  • Renames the thread after the first completed reply.
  • Renames again only after the session token count increases by the configured token interval.
  • Generates a short title with any OpenAI-compatible Chat Completions API.
  • Patches the Discord thread name through Discord API v10.

Install

openclaw plugins install @xuwenhao83/openclaw-discord-autoname

Enable the plugin:

{
  "plugins": {
    "entries": {
      "discord-autoname": {
        "enabled": true,
        "hooks": {
          "allowConversationAccess": true
        },
        "config": {
          "baseUrl": "https://api.openai.com/v1",
          "apiKeyEnv": "OPENAI_API_KEY",
          "model": "gpt-4o-mini",
          "prompt": "根据以下的对话片段,总结出一个5到10个字以内的精确短标题作为Discord讨论串的名字。只需输出最终标题文本,绝不能包含引号、标点符号、前缀、说明等任何多余字符。\n\n对话片段:\n{conversation}",
          "tokenInterval": 50000
        }
      }
    }
  }
}

Config fields:

  • baseUrl: OpenAI-compatible API base URL. Examples: https://api.openai.com/v1, https://api.siliconflow.cn/v1, or a LiteLLM proxy URL.
  • apiKeyEnv: environment variable that contains the API key. Defaults to OPENAI_API_KEY.
  • apiKey: inline API key. Prefer apiKeyEnv for shared configs.
  • model: Chat Completions model used for title generation. Defaults to gpt-4o-mini.
  • prompt: prompt template. Use {conversation} where recent messages should be inserted.
  • tokenInterval: token increase required before renaming an already-renamed thread. Defaults to 50000.
  • maxInputChars: max recent conversation characters sent to the title model. Defaults to 3000.
  • maxOutputTokens: max output tokens for the title model. Defaults to 20.
  • temperature: title model temperature. Defaults to 0.3.

Environment

The gateway environment must provide:

  • DISCORD_BOT_TOKEN
  • the API key env configured by apiKeyEnv, for example OPENAI_API_KEY, SILICONFLOW_API_KEY, or LITELLM_API_KEY

Discord Permissions

The Discord bot must be able to access the target thread and needs Manage Threads. For some channel layouts, Manage Channels may also be required. Private threads must include the bot.

Verify

openclaw config validate --json
openclaw gateway restart

Then send a message in a new Discord thread. The gateway log should include:

[discord-autoname] Successfully renamed thread ...