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.
npx agentmods add skills/shieldnet-360/secure-vibe/websocket-securitynpx skills add ShieldNet-360/secure-vibe --skill websocket-securitygit clone --depth 1 https://github.com/ShieldNet-360/secure-vibeWrote 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.
[](https://agentmods.dev/skills/shieldnet-360/secure-vibe/websocket-security)<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/websocket-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/websocket-security.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00093 | $0.02091 |
| Opus 5 | $0.00046 | $0.01045 |
| Sonnet 5 | $0.00019 | $0.00418 |
| Haiku 4.5 | $0.00009 | $0.00209 |
Grade A, and why
websocket-security 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WebSocket Security
Rules (for AI agents)
ALWAYS
- Validate the
Originheader on the upgrade handshake against an allowlist, and understand precisely what that buys: the browser setsOriginand script cannot forge it, so the check stops Cross-Site WebSocket Hijacking — a page onattacker.comopeningwss://api.example.com/wsand inheriting the user's cookies. It buys nothing against a non-browser client, which sets any header it likes. Origin is a CSRF control, not authentication. The same-origin policy and CORS preflight do not apply to the upgrade at all, which is why this check must be written by hand. - Authenticate the handshake, not the first frame. Once the upgrade completes the
connection exists, has consumed the user's cookie context, and is already a resource
the caller controls. A
subscribeorauthmessage afterwards is too late. - For a browser client, pick one of two mechanisms, because the browser
WebSocketconstructor cannot set request headers — there is noAuthorizationheader available to you:- Cookie on the upgrade plus the
Origincheck above as the CSRF control, or - A single-use ticket: the authenticated page calls an ordinary HTTP endpoint, receives a short-lived opaque ticket bound to the user and to the intended resource, passes it in the URL, and the server redeems and invalidates it at handshake time. A ticket is safe in a URL precisely because replaying it fails.
- Cookie on the upgrade plus the
- Re-authorize every frame, both the action and the subject it names. A frame like
{"action":"write","subjectId":"X"}must be checked against the principal established at handshake — an authenticated socket must never be able to assert an arbitrary subject id per frame. That is per-frame BOLA, and the forged id reaches every consumer downstream of the socket that trusts it. Permissions also change while the connection is open: logout, role change, account lock, token expiry. A socket opened an hour ago carries an authorization decision an hour old. - Bound the connection: maximum frame and message size, messages per second per
connection, concurrent connections per user and per source address, and total
connection lifetime after which the client must re-handshake. A WebSocket is an
allocation that persists, so every limit HTTP gets per-request must be re-expressed
per-connection. Concrete starting values, and the backpressure and heartbeat
settings, are in
references/limits-and-handshake.md. - Use
wss://.protocol-securityowns the TLS configuration behind it; what belongs here is thatws://exposes the session token, every frame, and the handshake itself to any on-path observer. - Consult
auth-securityfor the token's own properties — lifetime, rotation, and why a bearer token does not belong in a URL — andcors-securityfor the origin allowlist itself, including how to treat the serializednullorigin.
What ships with it
4 files 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.
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.
- 3d ago First seen · 140 lines · 93 tokens per session scan A 794809775be9
websocket-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 20d ago), licensed MIT. It adds 93 tokens to every session and 2,091 once invoked, about $0.0005 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-08-30.
Other skills, from other repositories
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.
bigquery-ai-ml
Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity…
edge-to-edge
Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…
chenhao-limit-up
Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.
comet-github
将 Comet GitHub 维护请求路由到基于证据的 PR 审阅、Issue 分诊、本地想法收集、CI 诊断或 Issue 实施流程。用户提到 Comet GitHub Issue/PR 但未指定流程,或询问下一步如何处理时使用。.