メインコンテンツまでスキップ

Skill Schema Reference

All skills in River Review must conform to JSON schema located at:

/schemas/skill.schema.json

Required fields

FieldDescription
idUnique skill identifier (match the directory name)
nameHuman-readable skill name
descriptionWhat the skill checks
categorycore / upstream / midstream / downstream (primary routing key)
applyToFile glob patterns

category is the primary routing key and is required at the top level. phase (upstream / midstream / downstream) is an optional backward-compatibility alias; new skills should use category. phase / applyTo can be specified at the top level or within a trigger object (top-level takes precedence if both are present).

Example

---
id: rr-python-sqlinj-v1-en
name: Python SQL Injection Check
description: Detects SQL injection patterns in Python code
phase: midstream
applyTo:
- '**/*.py'
tags: ['security', 'owasp']
---
# instructions...

Example with trigger wrapper

---
id: rr-python-sqlinj-v2-en
name: Python SQL Injection Check
description: Detects SQL injection patterns in Python code
trigger:
phase: midstream
files:
- '**/*.py'
tags: ['security', 'owasp']
---
# instructions...

Loading Stages

Skill fields correspond to three stages of Progressive Disclosure.

StageTimingFields
1: MetadataAlways (at startup)id, name, description, phase, applyTo, tags, severity, inputContext, outputKind, modelHint, dependencies, priority
2: InstructionsAfter skill selectionbody (Markdown body)
3: ReferencesAt review executionprompt.system, prompt.user, fixtures/, golden/, Riverbed Memory entries

Stage 1 fields are used for filtering and routing. Stage 2 and beyond are used for LLM prompt construction. The loader is designed to complete skill selection using only Stage 1 metadata.