nobodyonlyc/masoi/masoi-perf-security
Claude Code and agent skill by nobodyonlyc/masoi
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Audit Ma Sói server and client for performance bottlenecks, memory leaks, security vulnerabilities, rate limiting, input validation, CORS policy, timer cleanup, and room zombie detection. Use when changing socket handlers, setTimeout/setInterval patterns, Redis/PostgreSQL queries, authentication, or deploying to production.
Install
npx vskill@latest install nobodyonlyc/masoi/masoi-perf-securitySKILL.md
The same SKILL.md was published earlier as nobodyonlyc/masoi/masoi-perf-security.
Ma Sói Performance & Security Auditor
Workflow
- Read
server/index.jsfor socket handlers, timer patterns, and room lifecycle. - Read
server/db/redis.jsandserver/db/postgres.jsfor data access patterns. - Read
server/gameEngine.jsfor input validation in role assignment. - Check the change against
references/security-checklist.md. - After edits, verify:
node --check server/index.jsnode --check server/gameEngine.jscd client && npm run buildif client changed.
Security Rules
- Never trust client-sent
userIdwithout server-side validation against socket session. - All socket event handlers must validate room existence, player membership, and phase before acting.
- Rate limit socket events to prevent spam and DDoS (especially
send_message,night_action,cast_vote). - Production must NOT use
cors: { origin: '*' }— restrict to known domains. - Bcrypt salt rounds should be at least 10 (currently OK).
- Never expose full room state including all player roles to non-admin clients.
Performance Rules
- Every
setTimeoutmust be cancellable and tracked — stale timers from old rounds must not fire. - Room zombie detection: rooms with all players disconnected should be cleaned up within a bounded time.
- Redis
saveRoomcalls should be batched or debounced where possible to reduce write pressure. roomLocksMap must not grow unbounded — ensure cleanup after lock release.- Client
setIntervalfor timer countdown must be cleared on component unmount and phase change. - Wolf chat and public chat arrays are capped at 200 — verify no unbounded growth paths.
Common Vulnerability Patterns
- Forged
userIdin socket events bypassing auth. - Concurrent
resolveNight/resolveVotecausing double kills or double state transitions. - Timer stacking: multiple
scheduleNightorscheduleVotecalls for the same round. - Room state corruption from race conditions in
withRoomLockedge cases. - Stale
user:{id}:roommappings blocking room creation/joining.
References
Load references/security-checklist.md when auditing security or performance.
Security
- Security scanPassed, 90 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 repositoryCheckingskills/masoi-perf-security/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (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/nobodyonlyc/masoi/masoi-perf-security)