multiplayer-game-builder
Skill0 starsChanged 3 months agoMITView on GitHub
Build multiplayer turn-based games using template-based rapid development, TDD, and real-time Socket.IO integration. Use when creating card games, board games, or any turn-based multiplayer game with real-time synchronization. Apply automatically when the request matches; the user does not need to mention this skill.
In this repository76 other files it gives its agents.
- app-store-submission-packagerSkill
- digital-product-inventorSkill
- ios-testflight-github-actionsSkill
- meta-ads-analyzerSkill
- get-to-know-a-clientSkill
- investigate-before-recommendSkill
- production-system-auditSkill
- similarweb-analyticsSkill
- stock-analysisSkill
- system-architectSkill
- autonomous-github-syncSkill
- autonomous-sync-scriptSkill
- github-gem-seekerSkill
- organize-github-reposSkill
- using-git-worktreesSkill
- brainstorm-logosSkill
- brand-driven-ux-overhaulSkill
- canvas-designSkill
- excel-generatorSkill
- frontend-designSkill
- inspirational-music-video-productionSkill
- theme-factorySkill
- video-generatorSkill
- promo-code-systemSkill
- realistic-ai-persona-builderSkill
- role-based-access-controlSkill
- serverless-debuggingSkill
- vertical-expansion-blueprintSkill
- manus-mcp-configuratorSkill
- mcp-auto-recoverySkill
- mcp-builderSkill
- mcp-connector-testerSkill
- mcp-ecosystem-optimizerSkill
- voice-ai-integrationSkill
- api-endpoint-builderSkill
- database-schema-generatorSkill
- testing-frameworkSkill
- deployment-automationSkill
- error-monitoring-setupSkill
- github-workflow-automationSkill
- analytics-dashboardSkill
- email-system-builderSkill
- feature-flag-systemSkill
- user-authentication-systemSkill
- cron-job-schedulerSkill
- file-upload-systemSkill
- notification-systemSkill
- payment-integrationSkill
- search-implementationSkill
- debug-mining-engineSkill
- doc-coauthoringSkill
- docxSkill
- internet-skill-finderSkill
- pdfSkill
- pptxSkill
- project-handoff-ingestionSkill
- serverless-debuggingSkill
- skill-arsenal-builderSkill
- skill-creatorSkill
- skill-demo-builderSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 11 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this skill when the request matches its description.
- Distinctive: line 23
Use this skill when building:
- Distinctive: line 32
Test-Driven Development: Write tests first, implement to pass tests, ensure high code quality
- Distinctive: line 33
Immutable State: Never mutate game state, always return new objects
- Very specific: line 53
Use the find_game_templates.py script to search GitHub:
- Very specific: line 60
Use criteria from references/github-template-evaluation.md:
- Very specific: line 68
Use templates/implementation-plan-template.md to structure the project.
- Very specific: line 72
Follow strict Test-Driven Development.
- Distinctive: line 85
Write a failing test
- Distinctive: line 86
Run test to verify it fails
- Distinctive: line 87
Write minimal code to pass
- Distinctive: line 88
Run tests again to verify pass
- Distinctive: line 90
Commit with clear message
- Very specific: line 161
Broadcasting: Use io.to(gameId).emit() for public state changes
- Very specific: line 162
Private Data: Use socket.emit() for player-specific data (hands)
- Very specific: line 165
Automatic Actions: Use setTimeout() for delays (e.g., trick collection)
- Distinctive: line 197
Update UI in real-time as server broadcasts state changes.
- Distinctive: line 236
Always wrap game logic in try/catch and emit errors to specific players.
- Very specific: line 240
Use templates/execution-log-template.md to track:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Build multiplayer turn-based games using template-based rapid development, TDD, and real-time Socket.IO integration. Use when creating card games, board games, or any turn-based multiplayer game with real-time synchronization. Apply automatically when the request matches; the user does not need to mention this skill.
This skill should apply automatically when the request matches; the user does not need to mention this skill.
Usage
Use this skill when the request matches its description. The skill is discovered automatically; the user does not need to mention the skill explicitly.
Multiplayer Game Builder
Build multiplayer turn-based games from scratch using a proven workflow that combines template-based rapid development, Test-Driven Development (TDD), and real-time Socket.IO integration.
When to Use This Skill
Use this skill when building:
- Card games (poker, rummy, bridge, hearts, spades)
- Board games (chess, checkers, monopoly)
- Turn-based strategy games
- Any game requiring real-time multiplayer with game state synchronization
Core Principles
- Template-Based Rapid Development: Find and adapt existing open-source templates to save 50%+ development time
- Test-Driven Development: Write tests first, implement to pass tests, ensure high code quality
- Immutable State: Never mutate game state, always return new objects
- Progressive Implementation: Build in phases, test each before moving forward
- Comprehensive Documentation: Maintain implementation plans and execution logs
The Development Workflow
Phase 1: Research & Planning (1-2 days)
Research Game Rules
Deeply understand and document the complete rules. Create a rulebook that covers:
- Deck/board composition
- Player count and teams
- Setup and dealing
- Turn structure
- Winning conditions
- Special rules and edge cases
Find Similar Templates
Use the find_game_templates.py script to search GitHub:
python /home/ubuntu/skills/multiplayer-game-builder/scripts/find_game_templates.py "hearts card game"Evaluate Templates
Use criteria from references/github-template-evaluation.md:
- Core functionality (auth, lobby, rooms, real-time, database)
- Technical quality (code quality, tech stack, architecture)
- Project health (stars, activity, contributors)
- Ease of use (demo, documentation, setup)
Create Implementation Plan
Use templates/implementation-plan-template.md to structure the project.
Phase 2: Core Game Logic (TDD) (1-2 weeks)
Follow strict Test-Driven Development. See references/tdd-workflow.md for detailed workflow.
Setup Test Infrastructure
Generate boilerplate test files:
python /home/ubuntu/skills/multiplayer-game-builder/scripts/generate_test_suite.py "my-game"TDD Cycle for Each Module
For each game logic module (deck, bidding, playing, scoring):
- Write a failing test
- Run test to verify it fails
- Write minimal code to pass
- Run tests again to verify pass
- Refactor if needed
- Commit with clear message
Example: Deck Creation
// test/deck.test.js
it("should create a deck of 52 cards", () => {
const deck = createDeck();
assert.strictEqual(deck.length, 52);
});
// game-logic/deck.js
function createDeck() {
// Implementation here
}Validate Game State
During development, validate game state structure:
python /home/ubuntu/skills/multiplayer-game-builder/scripts/validate_game_state.py "game_state.json"Key Modules to Implement
- Deck/Board: Card/piece generation, shuffling
- Dealing: Distribute cards/pieces to players
- Game Actions: Bidding, playing, moving
- Validation: Turn order, legal moves, rule enforcement
- Trick/Round Collection: Determine winners
- Scoring: Calculate and track scores
- Game Orchestration: Coordinate all modules
Phase 3: Real-Time Multiplayer (1 week)
Integrate game logic with Socket.IO. See references/socketio-patterns.md for patterns.
Setup Socket Handlers
Start with templates/socket-handler-template.js:
const games = {}; // In-memory game store
module.exports = function(io, socket) {
socket.on("create_game", (data, ack) => {
const gameId = generateId();
games[gameId] = createGame();
ack({ gameId });
});
socket.on("join_game", (data, ack) => {
// Join logic
});
socket.on("play_card", (data) => {
try {
const game = games[data.gameId];
const updatedGame = playCard(game, data.card, data.player);
games[data.gameId] = updatedGame;
io.to(data.gameId).emit("card_played", updatedGame);
} catch (error) {
socket.emit("error", { message: error.message });
}
});
};Key Patterns
- Broadcasting: Use
io.to(gameId).emit()for public state changes - Private Data: Use
socket.emit()for player-specific data (hands) - Turn Validation: Enforce turn-based play on server
- Error Handling: Wrap all logic in try/catch
- Automatic Actions: Use
setTimeout()for delays (e.g., trick collection)
Phase 4: User Interface (1 week)
Build client-side interface that connects to Socket.IO.
UI Components
- Game board/table
- Player hands
- Action controls (buttons for bidding, playing)
- Current game state display
- Score tracking
Client-Side Socket Integration
const socket = io();
socket.emit("join_game", { gameId, userId });
socket.on("card_played", (data) => {
renderGameState(data);
});
$("#play-card-btn").click(() => {
socket.emit("play_card", { gameId, card, player });
});State Rendering
Update UI in real-time as server broadcasts state changes.
Phase 5: Polish & Production (1-2 weeks)
Game-Over Condition
Implement logic to end game and declare winner.
Persistence (Optional)
Integrate database (PostgreSQL, Redis) to save game state.
UI/UX Polish
- Card images instead of text
- Animations (card playing, trick collection)
- Sound effects
- Mobile responsive design
Deployment
Deploy to production server with proper monitoring.
Best Practices
Immutable State Management
See references/game-state-management.md for patterns:
// Bad: Mutation
game.currentPlayer = nextPlayer;
// Good: Immutable
return { ...game, currentPlayer: nextPlayer };Error Handling
Always wrap game logic in try/catch and emit errors to specific players.
Logging
Use templates/execution-log-template.md to track:
- Tasks completed
- Architectural decisions
- Code snippets for critical components
- Lessons learned
- Test results
Common Game Patterns
See references/common-game-patterns.md for reusable patterns:
- Turn-based play
- Bidding systems
- Trick-taking
- Scoring systems
- Round management
Resources
Scripts (scripts/):
find_game_templates.py: Search GitHub for similar gamesgenerate_test_suite.py: Create boilerplate test filesvalidate_game_state.py: Validate game state structure
Templates (templates/):
implementation-plan-template.md: Project planning structureexecution-log-template.md: Track implementation progressgame-logic-template.js: Starter code for game modulessocket-handler-template.js: Socket.IO boilerplatetest-suite-template.js: Test structure
References (references/):
tdd-workflow.md: Detailed TDD processsocketio-patterns.md: Real-time multiplayer patternsgame-state-management.md: State management best practicesgithub-template-evaluation.md: Template selection criteriacommon-game-patterns.md: Reusable game mechanics
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

