feishu-websocket-stability

feishu-websocket-stability is a skill for Claude Code, Codex from davidtoby/agent-skills. It costs 85 tokens per session (1,020 once invoked), scanned A, original, MIT.

A troubleshooting and configuration guide for Feishu websocket connections used by Hermes gateways. Websockets are long-lived connections that allow the service to receive events without repeated polling.

In plain words
What is it for?
Use it to tune reconnect and ping settings, enforce one gateway per app, fail fast on conflicts, and add focused gateway tests.
Why use it?
It addresses slow reconnects, incorrect runtime settings, idle connection problems, and multiple local gateways competing for one Feishu app.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to tune reconnect and ping settings, enforce one gateway per app, fail fast on conflicts, and add focused gateway tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davidtoby/agent-skills/feishu-websocket-stability
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add davidtoby/agent-skills --skill feishu-websocket-stability
Clone the repo
git clone --depth 1 https://github.com/davidtoby/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feishu-websocket-stability

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidtoby/agent-skills/feishu-websocket-stability/github.svg)](https://agentmods.dev/skills/davidtoby/agent-skills/feishu-websocket-stability)
Your own site
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/feishu-websocket-stability"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/feishu-websocket-stability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for feishu-websocket-stability

Your own site · 80×15
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/feishu-websocket-stability"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/feishu-websocket-stability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.01020
Opus 5.5 $0.00034 $0.00408
Sonnet 5.5 $0.00017 $0.00204
Haiku 4.5 $0.00009 $0.00102

Measured 1mo ago against content hash 26d89a091207, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

feishu-websocket-stability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/.archive/umbrella-curation-2026-04-29/user-imports/feishu-websocket-stability/SKILL.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Feishu Websocket Stability

Use this skill when Hermes runs in Feishu websocket mode and you need predictable startup and reconnect behavior.

Quick start

  1. Confirm the adapter is running in connection_mode=websocket.
  2. Ensure only one local Hermes gateway instance uses a given Feishu app_id.
  3. Tune reconnect jitter/interval via Feishu platform extra config.
  4. If the SDK resets its own websocket settings during startup, reapply runtime overrides after _configure(...).
  5. Add ping tuning only when you have an actual idle-connection problem.
  6. Back all changes with focused gateway tests.

Core lessons from real usage

1. Guard against duplicate local websocket clients

Feishu websocket mode should behave like a single-owner resource per app.

Problem pattern:

  • two local Hermes gateway processes start with the same Feishu app_id
  • both try to consume the same websocket stream
  • behavior becomes ambiguous or unstable

Fix pattern:

  • acquire a scoped local lock keyed by the Feishu app_id
  • if acquisition fails, stop startup immediately
  • surface a clear fatal error that includes the owning PID when available

Recommended behavior:

  • fail fast
  • mark the error as non-retryable until the competing process is stopped

2. Make reconnect timing configurable

The official Feishu SDK defaults are conservative.

Real effect:

  • first reconnect may wait with large jitter
  • later reconnects can be spaced far apart
  • production recovery after a transient network flap can feel unnecessarily slow

Expose config values under platforms.feishu.extra:

platforms:
  feishu:
    extra:
      ws_reconnect_nonce: 0
      ws_reconnect_interval: 3

Guideline:

  • ws_reconnect_nonce: non-negative integer
  • ws_reconnect_interval: positive integer
  • invalid values should fall back to SDK defaults instead of crashing startup

3. Runtime websocket overrides must survive SDK reconfiguration

A subtle failure mode:

  • you set local reconnect or ping values
  • the Feishu SDK later calls its own _configure(...)
  • your custom values get overwritten
  • reconnect tuning appears ignored even though config parsing worked

Read the full file on GitHub · 148 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 148 lines · 85 tokens per session scan A 26d89a091207

Subscribe to this mod's changes

feishu-websocket-stability is a skill published in the GitHub repository davidtoby/agent-skills (11 stars, last pushed 2mo ago), licensed MIT. It adds 85 tokens to every session and 1,020 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

doris-debug-deployment

Use for Doris FE/BE startup failures, port conflicts, prioritynetworks misrouting, metadir corruption, and ADD/DROP BACKEND issues.

apache/doris-skills · 36 tokens

pipehero

Tunnel localhost to a public URL — debug webhooks (inspect and replay captured requests, and via the Pipehero MCP server let the agent read captured webhooks and diagnose failing handlers against the code), expose your own MCP server (Streamable HTTP) so a cloud-only client like Claude.ai or ChatGPT can reach it, or…

pipehero/pipehero-mcp · 190 tokens

officecli-academic-paper

Use this skill to build academic-style .docx output: journal / conference / thesis chapters carrying formal citation style (APA, Chicago, IEEE, MLA), numbered equations, figure & table cross-references, footnotes/endnotes, bibliography, or multi-column journal layout. Trigger on: 'research paper', 'journal paper'…

iOfficeAI/OfficeCLI · 141 tokens

officecli

Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.

iOfficeAI/OfficeCLI · 56 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

officecli-word-form

Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…

iOfficeAI/OfficeCLI · 224 tokens