Base templates for error escalation, decision criteria, and enforcement. Referenced by agents and commands to avoid duplication.
Install
npx skillscat add takeokunn/nixos-configuration/core-patterns Install via the SkillsCat registry.
SKILL.md
Provide standardized base templates for error handling, decision criteria, and enforcement behaviors shared across all agents and commands.
Standard 4-level severity escalation pattern
Include in agents and commands for consistent error handling</use_case>
Standard confidence calculation with validation tests
Include in agents and commands for consistent quality assessment</use_case>
Standard mandatory and prohibited behaviors pattern
Include in agents and commands for consistent behavior enforcement</use_case>
Standard 4-level severity classification for error escalation
low: Minor issues, note and proceed
medium: Unclear situations, document and ask user
high: Breaking changes, STOP and present options
critical: Security/data risks, BLOCK and require acknowledgment
Standard confidence score boundaries for status determination
success: confidence >= 80
warning: confidence 60-79
error: confidence less than 60
Boundary tests required:
boundary_success_80: Exactly 80, yields success
boundary_warning_79: 78.5-79.9, yields warning
boundary_error_59: 58.5-59.9, yields error
</example>
Naming convention for enforcement behavior IDs
Format: PREFIX-TYPE-NUMBER
PREFIX: Agent/command abbreviation (e.g., EXEC, DEF, EXP)
TYPE: B for mandatory behavior, P for prohibited
NUMBER: Sequential (001, 002, ...)
Examples:
EXEC-B001: Execute command mandatory behavior 1
DEF-P002: Define command prohibited behavior 2
</example>
Decision criteria weights must sum to 1.0
Standard distributions:
3-factor equal: 0.33, 0.34, 0.33
3-factor weighted: 0.4, 0.3, 0.3
2-factor equal: 0.5, 0.5
2-factor weighted: 0.6, 0.4
Standard 4-level error escalation template
Minor issue description
Note in report, proceed
Unclear or ambiguous situation
Document issue, use AskUserQuestion for clarification
Breaking change or blocker
STOP, present options to user
Security risk or data loss
BLOCK operation, require explicit user acknowledgment
</error_escalation>
Standard decision criteria with validation tests including boundary cases
Excellent condition
Good condition
Fair condition
Poor condition
Excellent
Good
Fair
Poor
Excellent
Good
Fair
Poor
factor1=95, factor2=90, factor3=95
(95*0.4)+(90*0.3)+(95*0.3) = 38+27+28.5 = 93.5
success</expected_status>
High scores yield success
factor1=85, factor2=75, factor3=80
(85*0.4)+(75*0.3)+(80*0.3) = 34+22.5+24 = 80.5
success</expected_status>
Weighted average 80.5 meets success threshold
factor1=80, factor2=75, factor3=80
(80*0.4)+(75*0.3)+(80*0.3) = 32+22.5+24 = 78.5
warning</expected_status>
Weighted average 78.5 triggers warning
factor1=60, factor2=55, factor3=60
(60*0.4)+(55*0.3)+(60*0.3) = 24+16.5+18 = 58.5
error</expected_status>
Weighted average 58.5 is below 60, triggers error
factor1=50, factor2=55, factor3=45
(50*0.4)+(55*0.3)+(45*0.3) = 20+16.5+13.5 = 50
error</expected_status>
Low scores yield error
</validation_tests>
</decision_criteria>
Standard enforcement template with mandatory and prohibited behaviors
When condition occurs
Required action
How to verify compliance
</mandatory_behaviors>
Always
Prohibited action description
What to do instead
</prohibited_behaviors>
Standard syntax for referencing skills from agents and commands
core-patterns
parallelization-patterns
workflow-patterns
serena-usage
nix-ecosystem
Use attribute values:
patterns: Shared templates (core-patterns, parallelization-patterns, workflow-patterns)
tools: Tool-specific usage patterns (serena-usage, context7-usage)
workflow: How-to guides and methodologies (investigation-patterns, execution-workflow)
domain: Domain knowledge and best practices (nix-ecosystem, typescript-ecosystem)