conditional-domain-specific-template

djankies's avatarfrom djankies

[REPLACE] Apply domain-specific logic based on detected context. Use when [REPLACE with specific triggers].

⭐0stars🔀0forks📁View on GitHub🕐Updated Nov 25, 2025

When & Why to Use This Skill

This Claude skill template enables the creation of context-aware workflows that automatically adapt their logic based on the detected domain, technology, or data characteristics. It provides a structured multi-phase framework—Detect, Load, and Apply—to ensure AI agents utilize the correct rulesets and formulas for specific fields such as finance, science, or business analytics, significantly enhancing the precision of automated decision-making.

Use Cases

  • Financial Analysis: Automatically detecting financial keywords (e.g., EBITDA, QoQ) to trigger specialized revenue growth calculations and fiscal reporting standards.
  • Scientific Data Processing: Identifying statistical notation to apply rigorous hypothesis testing, p-value validation, and standardized scientific formatting.
  • Business Metric Tracking: Recognizing KPI and conversion-related data to route inputs through specific funnel analysis patterns and retention logic.
  • Technical Support Routing: Detecting the specific technology stack or programming language in a query to apply the relevant debugging rules and architectural constraints.
nameconditional-domain-specific-template
description[REPLACE] Apply domain-specific logic based on detected context. Use when [REPLACE with specific triggers].
allowed-toolsRead, TodoWrite

Conditional Domain-Specific Template

Purpose

This template demonstrates context-aware workflows that adapt based on domain, technology, or data characteristics.

Use this template when:

  • Behavior varies by framework/language/domain
  • Different rule sets apply to different contexts
  • Progressive disclosure by detected context
  • Multiple technology stacks supported

Workflow

Phase 1: Detect Context

1. Analyze input to determine domain 2. Identify relevant technology stack 3. Load domain-specific rules 4. Select appropriate processing path

Phase 2: Load Domain Rules

Based on detected context: - Financial: @references/financial-analysis.md - Scientific: @references/scientific-calculations.md - Business: @references/business-metrics.md

Phase 3: Apply Domain Logic

1. Use domain-specific formulas 2. Apply domain conventions 3. Validate against domain constraints 4. Format output per domain standards

Context Detection

Financial Data:

  • Keywords: revenue, profit, QoQ, YoY, EBITDA
  • Date ranges with quarterly/annual patterns
  • Currency symbols and financial notation

Scientific Data:

  • Keywords: mean, median, standard deviation, p-value
  • Statistical notation
  • Hypothesis testing language

Business Metrics:

  • Keywords: KPI, conversion, retention, churn
  • Percentage-based metrics
  • Funnel analysis patterns

Progressive Disclosure

Core workflow (this file):

  • Context detection logic
  • Domain routing rules
  • High-level processing flow

Domain-specific details (references/):

  • references/financial-analysis.md - Financial calculations and formulas
  • references/scientific-calculations.md - Statistical methods
  • references/business-metrics.md - KPI calculations

Example Usage

<detect-context>
Detected: Financial data (contains "revenue", "QoQ", quarterly dates)
Domain: Financial Analysis
Loading: /references/financial-analysis.md
</detect-context>

<apply-logic>
Calculating QoQ revenue growth:
Q4 2024: $1.2M → Q1 2025: $1.5M
QoQ Growth: +25.0%

YoY revenue comparison:
Q1 2024: $0.9M → Q1 2025: $1.5M
YoY Growth: +66.7%

Forecast Q2 2025: $1.7M (based on trend)
</apply-logic>