/skills-for-humanity:s4h-game-theory-prisoners-dilemmafrom skills-for-humanity
Analyses cooperation problems using prisoner's dilemma framework. Identifies when individual rationality leads to collective irrationality and applies Tit for Tat strategies.
Ships in skills-for-humanity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The prisoner's dilemma is the central problem of cooperation. Its structure: each player has an individual incentive to defect regardless of what the other does, so both defect — and both end up worse than if they had cooperated. Individual rationality produces collective irrationality.
This structure appears everywhere: countries competing on subsidies both nations would be better without, companies in a price war that erodes margins for everyone, colleagues who each underinvest in shared infrastructure, advertisers who would all benefit if no one ran ads but each is tempted to run them. Recognising the structure is the first move; it tells you why the situation is hard and what the real leverage points are.
Robert Axelrod's computer tournaments (1984) produced one of the most important empirical results in social science: in repeated prisoners' dilemmas, Tit for Tat — cooperate first, then mirror your opponent's previous move — consistently outperformed every more complex strategy. Its winning properties: nice (cooperates first), retaliatory (immediately punishes defection), forgiving (returns to cooperation as soon as the opponent does), and clear (easy to understand and predict). The lesson: cooperation is achievable without altruism, if the game is repeated and players are patient.
Step 1: Structure verification Confirm the three conditions that define a prisoner's dilemma:
If all three hold: this is a genuine prisoner's dilemma. If (a) fails, cooperation isn't actually better — the analysis changes. If (b) fails, there's no defection temptation — cooperation is already individually rational.
Framing check: Confirm the specific cooperation problem before continuing. State the players involved, what constitutes cooperation vs. defection for each, and why individual incentives diverge from collective interest in one sentence, then use AskUserQuestion:
Step 2: One-shot vs. repeated Is this a single interaction or an ongoing relationship? This is the most important structural question. In a one-shot game, defection is the rational dominant strategy and there is no mechanism for cooperation. In a repeated game, the future creates incentives for today's cooperation.
Step 3: Shadow of the future In repeated games, assess how much each player values future interactions. The discount factor (δ) captures how much tomorrow's payoff is worth today — high δ means future interactions matter a great deal; low δ means players are impatient or uncertain the relationship will continue. Cooperation is sustainable in repeated play if δ is above a threshold that depends on the payoff structure. Practically: ask how much each player needs the relationship to continue, how visible their defection will be, and how quickly punishment can be applied.
Step 4: Trigger conditions In a cooperative equilibrium, cooperation is sustained by the threat of punishment. What action would constitute defection? How quickly would it be detected? How severe is the punishment, and is it credible? A cooperation equilibrium is only stable if the punishment threat is believable and proportionate.
Step 5: Structural prescriptions If cooperation is failing or fragile, what changes to the structure could make cooperation individually rational?
Before proceeding, use the AskUserQuestion tool. State your interpretation of the situation in 1–2 sentences — what is being analyzed and what the core question is — then ask:
Proceed based on their selection. If the user reframes, incorporate the correction before running any analysis.
Structure Verification
Payoff Map [The four key outcomes: mutual cooperation / you cooperate, they defect / you defect, they cooperate / mutual defection — with approximate payoffs or ordinal rankings]
One-Shot vs. Repeated Assessment [Is this a single interaction or an ongoing relationship? How many rounds are expected? Does either player expect to exit soon?]
Shadow of the Future Analysis [How much do players value continued interaction? What is the discount factor — high (cooperation sustainable) or low (cooperation fragile)? What would cause either player to reduce their valuation of the relationship?]
Trigger Conditions [What constitutes defection? How quickly detected? Is punishment credible and proportionate?]
Structural Prescriptions [Specific recommendations for changing the game structure to make cooperation individually rational — ranked by feasibility and impact]
The prisoner's dilemma is the one-shot cooperation problem. For formal analysis of how cooperation can be sustained in repeated interactions, including specific strategy recommendations, use /s4h-game-theory-iterated.
If the structure is right but the rules are wrong — you want to change the game itself — use /s4h-game-theory-mechanism-design, which designs payoffs and rules specifically to align individual and collective incentives.
For analysis of the stable outcome of the one-shot version (and confirmation that defection is indeed the Nash equilibrium), use /s4h-game-theory-equilibrium.
Pairs with: /s4h-social-incentive-analysis (the social and power dynamics around the same incentive problem), /s4h-strategy-alliance (the strategic logic of forming cooperative relationships).
After delivering this output, use AskUserQuestion to offer the next move:
/s4h-game-theory-mechanism-design — Design away from mutual defection/s4h-social-incentive-analysis — Align incentives to encourage cooperation/s4h-game-theory-iterated — Test whether cooperation emerges with repeated interactionWhat SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (human-avatar/skills-for-humanity) — no native marketplace selected
npx claudepluginhub p/human-avatar-skills-for-humanity212 skills in this plugin
/s4hMaster orchestration skill. Takes any situation in plain English, identifies the underlying goal, designs a multi-skill reasoning workflow, and executes it sequentially — feeding each skill's output into the next. Use when you say 'help me think through this', 'I need to figure out what to do', 'where do I start', or any time you want structured thinking applied end-to-end rather than routed to a single tool./s4h-aestheticEntry point for the aesthetic toolkit. Routes to the right aesthetic skill based on your situation. Use when you say 'aesthetic', 'check the design', 'does this feel right', 'is this elegant', 'is this too complex', 'what pattern is this', 'find the simpler version', or want an aesthetic lens applied without knowing which specific tool fits./Other plugins' skills for the same job