add-character
Standardizes the implementation of Town Hall characters in Salem 1692, from rulebook verification to testing.
Install
mkdir -p .claude/skills/add-character && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14550" && unzip -o skill.zip -d .claude/skills/add-character && rm skill.zipInstalls to .claude/skills/add-character
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when implementing a Town Hall character ability in Salem 1692. Covers reading the rulebook edge cases, following the existing character pattern, handling ability inheritance, writing tests, and running the suite. Invoke once per character in priority order.Key capabilities
- →Implement character abilities in Salem 1692
- →Read rulebook edge cases for characters
- →Follow existing character implementation patterns
- →Identify hook points for ability triggers
- →Write tests for normal activation and edge cases
- →Run the full test suite
How it works
The skill guides the implementation of character abilities by requiring reading documentation, stating abilities and edge cases, identifying hook points, implementing logic, and writing and running tests.
Inputs & outputs
When to use add-character
- →Implementing new character abilities
- →Writing tests for game logic
- →Ensuring rulebook compliance for character powers
About this skill
Add Character Ability
Implementation Priority
Implement in this order — later characters have interactions with earlier ones:
- Tituba
- Cotton Mather
- Thomas Danforth
- George Burroughs
- John Proctor
- Martha Corey
- Mary Warren
- Remaining characters
Step 1 — Read Before Writing Anything
Read all three before writing code:
- The most similar existing character implementation
- Rulebook pages 12–14 for this character's edge cases (@docs/Salem_Rulebook.pdf)
- Development guide Phase 5.2 (@docs/Salem_1692_Development_Guide.md)
Step 2 — State the Ability and All Edge Cases
Write in plain English before coding:
- What the ability does
- When it triggers
- Every edge case from rulebook pages 12–14
- Any interactions with already-implemented characters
Step 3 — Identify Hook Points
| Hook | When it fires |
|---|---|
onTurnStart | Beginning of this player's turn |
onCardPlayed(card, target) | When any player plays a card |
onAccusationPlaced(count) | When an accusation is placed on this player |
onTryalRevealed(tryal) | When one of this player's tryals is revealed |
onPlayerEliminated(player) | When any player is eliminated |
onAbilityInherited(fromCharacter) | When ability is inherited via John/Martha |
Step 4 — Implement
- Ability logic in
server/src/characters/[character_name].js - If ability needs player input, use
promptPlayerChoicehelper - Store accusation modifiers on the player object, not at calculation time
- Implement both
onAbilityInheritedandonAbilityLostif transferable
Step 5 — Write Tests
One test per edge case in server/tests/characters/[character_name].test.js:
- Normal ability activation
- Each edge case from Step 2
- Interaction with other characters if documented
- Ability inheritance received and lost (if applicable)
Step 6 — Run the Full Suite
cd server && npm test
All existing tests must still pass. Do not suppress or skip existing tests.
Common Mistakes
- Checking character by name string in core logic — use the hook registry
- Applying ability effects before checking if the player is eliminated
- Forgetting
onAbilityLost— if an ability can be gained, it can be lost - Accusation math at calculation time — store modifier on the player object
When not to use it
- →When checking character by name string in core logic
- →When applying ability effects before checking player elimination
- →When forgetting onAbilityLost for transferable abilities
Limitations
- →Requires implementation in a specific priority order
- →Requires reading rulebook pages 12–14 for edge cases
- →Requires `server/src/characters/[character_name].js` for ability logic
How it compares
This skill enforces a structured, test-driven approach to implementing game character abilities, ensuring rulebook compliance and interaction handling, unlike ad-hoc coding.
Compared to similar skills
add-character side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-character (this skill) | 0 | 2mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| vitest | 41 | 6mo | No flags | Intermediate |
| browser-tools | 6 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
vitest
antfu
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
browser-tools
Whamp
Lightweight Chrome automation toolkit with shared configuration, JSON-first output, and six focused scripts for starting, navigating, inspecting, capturing, evaluating, and cleaning up browser sessions.
validate-typescript
BerryKuipers
Run TypeScript compiler type-checking (tsc --noEmit) to validate type safety and catch type errors. Works with any TypeScript project. Returns structured output with error counts, categories (type/syntax/import errors), and affected files. Used for quality gates and pre-commit validation.
ts-testing
johnlindquist
Design, implement, and maintain high‑value TypeScript test suites using popular JS/TS testing libraries. Use this skill whenever the user is adding tests, debugging failing tests, or refactoring code that should be covered by tests.
react-best-practices
redpanda-data
Client-side React performance optimization patterns.