axiosleo/node-koapp/koapp-apps
Claude Code and agent skill by axiosleo/node-koapp
- community
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-appsSKILL.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?
| Class | Transport | Use when | |
|---|---|---|---|
KoaApplication | HTTP(S) via Koa | REST APIs, file uploads, SSR, Server-Sent Events | |
SocketApplication | Raw TCP via Node net | Custom TCP protocol, IoT gateways, line-delimited services | |
WebSocketApplication | WebSocket via ws | Real-time browser apps, chat, live dashboards |
All three accept { port, routers, debug, app_id } at minimum; see the per-class docs for full options:
- http-server.md -
KoaApplication - socket-server.md -
SocketApplication - websocket-server.md -
WebSocketApplication - examples.md - full server examples
Shared config keys
All three apps normalize config through Configuration from @axiosleo/cli-tool:
Shared events
All apps extend EventEmitter and emit:
starting- before the server bindsresponse- 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 connectedlisten- server bound to the port
Shared lifecycle
Connection management (Socket + WebSocket)
SocketApplication implements the following methods, inherited by WebSocketApplication:
broadcast(data, msg, code, connections)- send to many; passnullfor allsend(connection, data, msg, code)- send to one raw connectionclose(connection)- close one raw connectionsendByConnectionId(id, data, msg, code)- send by tracked connection IDcloseByConnectionId(id)- close by tracked connection IDgetConnection(id)- returns the raw connection ornullping(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:
When ping.open is true, the app broadcasts data to all active connections every interval ms.
Protocol differences
| Aspect | Socket (TCP) | WebSocket | |
|---|---|---|---|
| Request framing | {...json}@@@@@@ delimiter | Plain JSON string | |
send(conn, data) | conn.write(data + '@@@@@@') | conn.send(data) | |
close(conn) | conn.end() | conn.close() | |
| headers in context | none | context.headers (from upgrade request) |
Common pitfalls
- Calling
new KoaApplication({ static: false })disables the built-in
static server. Set static: { rootDir: './public' } to enable it.
SocketApplicationrequires every inbound message to end with@@@@@@.
Clients must append that delimiter.
WebSocketApplication.ping.open = truetriggersbroadcastevery
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:
- Building an HTTP API → http-server.md
- Building a TCP service → socket-server.md
- Building a WebSocket service → websocket-server.md
- Copy-paste-ready examples → examples.md
- Typing contexts and configs in TypeScript → koapp-typescript
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
- SKILL.md in the repositoryCheckingassets/skills/koapp-apps/SKILL.md
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
[](https://verified-skill.com/skills/axiosleo/node-koapp/koapp-apps)