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.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.svg" alt="Measured on agentmods" 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 $0.00043 $0.00510
Sonnet 5 $0.00017 $0.00204
Haiku 4.5 $0.00009 $0.00102

Measured 4d ago against content hash 26d89a091207, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 4d 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. 4d 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 (10 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 1,020 once invoked, about $0.0004 per session on Opus 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

agentphone

Build AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything relate.

ranbot-ai/awesome-skills · 46 tokens

api-analyzer

Validates whether an API request is correct based on provided inputs (method, URL, headers, body, auth, query params).

ranbot-ai/awesome-skills · 30 tokens

messaging-gateway-troubleshooting

Use this when Hermes messaging platforms are installed/configured but messages do not arrive, are ignored, do not reply, or appear to risk reply loops.

AtlasOmnia/hermes-custom-pack · 37 tokens

better-auth

Self-hosted auth for TypeScript/Cloudflare Workers with social auth, 2FA, passkeys, organizations, RBAC, and 15+ plugins. Requires Drizzle ORM or Kysely for D1 (no direct adapter). Self-hosted alternative to Clerk/Auth.js. Use when: self-hosting auth on D1, building OAuth provider, multi-tenant SaaS, or…

danstrem2/clawdbot-skill-master-pack · 102 tokens

ai-sdk-core

Build backend AI with Vercel AI SDK v6 stable. Covers Output API (replaces generateObject/streamObject), speech synthesis, transcription, embeddings, MCP tools with security guidance. Includes v4→v5 migration and 15 error solutions with workarounds. Use when: implementing AI SDK v5/v6, migrating versions…

danstrem2/clawdbot-skill-master-pack · 106 tokens