triggers
Schema and rules for creating triggers
от nikolaj-lat★ 17 звёзд на GitHub
Установить triggers в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Triggers
Edit tabs/triggers.json.
Required Fields
| Field | Requirement |
|---|---|
name |
Must match object key exactly |
conditions |
Array of TriggerCondition objects (see format below) |
effects |
Array of TriggerEffect objects (see format below) |
Conditional Fields
| Field | When to Include |
|---|---|
recurring |
Set to true only when trigger should fire every turn conditions are met |
scope |
Set to 'player' only when effects should target the specific players who satisfy the conditions (multiplayer). Omit for normal party-wide triggers |
phase |
Set to 'planning' only on a purely mechanical trigger whose effects must land before this turn's story (react to combat damage or skill-check results in the same turn's narration). Omit otherwise |
script |
Only when declarative conditions/effects can't express the logic (branching, derived math, cross-trigger coordination). See trigger-scripts-reference.md |
Trigger-script gotchas: a story effect on tick 0 does not change the opening — put opening narration in the story-start text or fire at tick >= 1. Scripts go only in the top-level script field; never invent JS condition/effect types. Full details in the reference.
Never Include
Omit these fields (auto-set or unused):
embeddingId(auto-generated for semantic conditions)
TriggerCondition Format
All conditions in a trigger must pass for effects to fire.
Semantic Conditions (AI-Evaluated)
| Type | Description | Required Fields |
|---|---|---|
story |
Query matches recent story narrative | query |
action |
Query matches player's current action | query |
Format: { type: 'story' | 'action', query: 'natural language description' }
Mechanical Conditions (Code-Evaluated)
String conditions (party-realm, party-region, party-location, party-area, story-text, action-text, npc-realm, npc-region, npc-location, npc-area, npc-type):
{ type: '...', operator: 'equals' | 'notEquals' | 'contains' | 'notContains' | 'regex', value: 'string' }
// For npc-*, also include: npc. An off-stage or unresolved NPC matches no operator, notEquals/notContains included
// npc-type compares the NPC type key from tabs/npc-types.json, not a type's display name
Number conditions (player-level, game-tick, player-resource, npc-relationship, skill-value, npc-health, npc-health-percent):
{ type: '...', operator: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual', value: number }
// For player-resource, also include: resource: 'resourceName'
// For npc-relationship, npc-health, npc-health-percent, also include: npc
// For skill-value, also include: skill (id or display name). Compares skill level; a character without the skill matches nothing
// npc-health is absolute current HP (equals 0 = the death check); npc-health-percent is current/max as 0-100, unrounded
Action outcome condition (action-success-level):
{ type: 'action-success-level', operator: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual', value: 'tier name' }
// value names a tier from the world's successLevelSettings (stock ladder, lowest to highest: Critical Failure, Failure, Mixed Results, Basic Success, Success, Great Success, Critical Success), matched ignoring case and spacing
// Ordinal over the tiers' score-band order, per player, this turn's action. Simple actions, impossible actions, players with no evaluated action, and a value naming no tier match nothing, notEquals included. Rejected alongside story / story-text conditions: put the story check on a separate trigger
NPC relationship stage condition (npc-relationship-stage):
{ type: 'npc-relationship-stage', npc: 'npcName', operator: 'equals' | 'notEquals' | 'contains' | 'notContains' | 'regex', value: 'stage name' }
// Compares against the NPC's current stage name from the world's relationshipStages; a score matching no stage reads as 'Neutral'
Boolean conditions (known-entity, npc-in-scene, npc-in-party, npc-in-combat):
{ type: 'known-entity', operator: 'equals' | 'notEquals', value: boolean, entity: 'entityName' }
{ type: 'npc-in-scene' | 'npc-in-party' | 'npc-in-combat', operator: 'equals' | 'notEquals', value: boolean, npc: 'npcName' }
// npc-in-combat covers attacking or being attacked this turn, and describes this turn only
NPC selectors: every npc field takes an authored NPC name, or anySceneNPC / anyPartyNPC in conditions (passes if any NPC in the set matches) and allSceneNPCs / allPartyNPCs in effects (fans out; npc-portrait takes a name only). A wrong-slot selector resolves to nothing; avoid giving NPCs those four names.
Array conditions (`playe
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/random-selection-reference.md
- references/trigger-scripts-reference.md
- references/triggers-reference.md
FAQ
Что делает скилл triggers?
Schema and rules for creating triggers
Как установить скилл triggers?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл triggers запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…