axiosleo/node-koapp/koapp-apps

Claude Code and agent skill by axiosleo/node-koapp

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Choose and configure the right @axiosleo/koapp Application class - KoaApplication for HTTP, SocketApplication for TCP sockets, WebSocketApplication for WebSocket. Use when building a server with koapp, configuring ports, listen host, session, static files, body parser, ping heartbeat, managing socket connections, or deciding between HTTP/TCP/WS transport.

Install

npx vskill@latest install axiosleo/node-koapp/koapp-apps

SKILL.md

@axiosleo/koapp Application Classes

@axiosleo/koapp exposes three runtime application classes, all extending a shared Application base. Pick one based on the transport you need.

Which class do I need?

ClassTransportUse when
KoaApplicationHTTP(S) via KoaREST APIs, file uploads, SSR, Server-Sent Events
SocketApplicationRaw TCP via Node netCustom TCP protocol, IoT gateways, line-delimited services
WebSocketApplicationWebSocket via wsReal-time browser apps, chat, live dashboards

All three accept { port, routers, debug, app_id } at minimum; see the per-class docs for full options:

Shared config keys

All three apps normalize config through Configuration from @axiosleo/cli-tool:

javascript
{
port: 8080, // Port to listen on
listen_host: 'localhost', // '0.0.0.0' for public access (Koa only)
routers: [], // Array of Router instances
app_id: '', // Optional stable ID; auto uuid-v4 if empty
debug: false // Verbose logging
}

Shared events

All apps extend EventEmitter and emit:

  • starting - before the server binds
  • response - after each response is produced (framework uses this internally to write the response)

Socket apps also expose a separate app.event EventEmitter emitting:

  • connection - new client connected
  • listen - server bound to the port

Shared lifecycle

javascript
const app = new KoaApplication({ ... });
app.on('starting', () => console.log('about to listen'));
await app.start(); // all three classes implement .start()

Connection management (Socket + WebSocket)

SocketApplication implements the following methods, inherited by WebSocketApplication:

  • broadcast(data, msg, code, connections) - send to many; pass null for all
  • send(connection, data, msg, code) - send to one raw connection
  • close(connection) - close one raw connection
  • sendByConnectionId(id, data, msg, code) - send by tracked connection ID
  • closeByConnectionId(id) - close by tracked connection ID
  • getConnection(id) - returns the raw connection or null
  • ping(id) - send a ping payload to one connection

Connections are tracked in app.connections keyed by an auto-generated connection_id (_uuid_salt('connect:' + app_id)).

Ping heartbeat

Socket apps support opt-in periodic ping:

javascript
new SocketApplication({
port: 8801,
routers: [root],
ping: {
open: true, // default false
interval: 1000 * 60 * 5, // default 5min
data: 'this is a ping'
}
});

When ping.open is true, the app broadcasts data to all active connections every interval ms.

Protocol differences

AspectSocket (TCP)WebSocket
Request framing{...json}@@@@@@ delimiterPlain JSON string
send(conn, data)conn.write(data + '@@@@@@')conn.send(data)
close(conn)conn.end()conn.close()
headers in contextnonecontext.headers (from upgrade request)

Common pitfalls

  • Calling new KoaApplication({ static: false }) disables the built-in

static server. Set static: { rootDir: './public' } to enable it.

  • SocketApplication requires every inbound message to end with @@@@@@.

Clients must append that delimiter.

  • WebSocketApplication.ping.open = true triggers broadcast every

interval even when there are zero connections - the call is a no-op but still schedules.

  • Do not call app.start() inside a route handler - the app is already

running at that point.

Quick jump

If you just need to build one server, start with the matching doc:

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
44
Repository forks
11
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/axiosleo/node-koapp/koapp-apps/badge)](https://verified-skill.com/skills/axiosleo/node-koapp/koapp-apps)

Something wrong with this skill or its page? Tell us.