Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
<a name="english"></a>
zero-to-prod-orchestrator (Phase 4 AI integration), brainstorming, session-memory-manager.llm-finops-router (ROI tracking & cost caps), llm-observability-expert (cascade decisions, escalations, & tracing).frontier-ai-models-expert (model tier scoring & benchmarks), context-window-engineer (context threshold overflow routing), kv-cache-prefix-optimizer (tier prefix cache locking).test-time-compute-optimizer (dynamic reasoning tokens during escalation), ai-llm-integration-expert, vercel-ai-sdk-expert (multi-provider cascade fallbacks).Production architecture for routing AI requests to the optimal model tier based on real-time task complexity assessment. Instead of sending every request to the most expensive frontier model, this skill implements a cascade: try the fastest/cheapest model first, evaluate output quality via automated judges, and escalate to more capable (expensive) models only when the cheaper tier fails the quality gate. Achieves 40-60% cost reduction for typical production workloads where 60-70% of requests are simple enough for smaller models.
Activate this skill when:
USER REQUEST
│
▼
┌──────────────────────┐
│ COMPLEXITY SCORER │ Classify request complexity: LOW / MEDIUM / HIGH / ULTRA
│ (Fast heuristic or │
│ lightweight model) │
└──────┬───────────────┘
│
├── LOW ──────────► Gemini 4 Flash-Lite / Claude Haiku ($0.025/1M)
│ │
│ ┌────▼────┐
│ │ QUALITY │ Pass? → Return response
│ │ GATE │ Fail? → Escalate to MEDIUM
│ └─────────┘
│
├── MEDIUM ───────► Gemini 4 Flash / Claude Sonnet ($0.30/1M)
│ │
│ ┌────▼────┐
│ │ QUALITY │ Pass? → Return response
│ │ GATE │ Fail? → Escalate to HIGH
│ └─────────┘
│
├── HIGH ─────────► Gemini 4 Pro / Claude Opus ($3-15/1M)
│ │
│ ┌────▼────┐
│ │ QUALITY │ Pass? → Return response
│ │ GATE │ Fail? → Escalate to ULTRA
│ └─────────┘
│
└── ULTRA ────────► GPT Astra 6 + Extended Thinking ($15/1M)
│
Return response (final tier, no escalation)
export type ComplexityLevel = 'LOW' | 'MEDIUM' | 'HIGH' | 'ULTRA';
export interface ComplexitySignals {
tokenCount: number;
hasCodeGeneration: boolean;
requiresReasoning: boolean;
hasMultiStep: boolean;
domainSpecificity: 'general' | 'technical' | 'specialized';
requiresCreativity: boolean;
hasToolCalls: boolean;
contextSize: number;
}
export function scoreComplexity(signals: ComplexitySignals): ComplexityLevel {
let score = 0;
if (signals.tokenCount > 2000) score += 1;
if (signals.tokenCount > 8000) score += 1;
if (signals.hasCodeGeneration) score += 2;
if (signals.requiresReasoning) score += 2;
if (signals.hasMultiStep) score += 1;
if (signals.domainSpecificity === 'technical') score += 1;
if (signals.domainSpecificity === 'specialized') score += 2;
if (signals.requiresCreativity) score += 1;
if (signals.hasToolCalls) score += 1;
if (signals.contextSize > 100_000) score += 1;
if (signals.contextSize > 500_000) score += 2;
if (score <= 2) return 'LOW';
if (score <= 5) return 'MEDIUM';
if (score <= 8) return 'HIGH';
return 'ULTRA';
}
export interface QualityGateResult {
passed: boolean;
score: number;
reasons: string[];
}
export async function evaluateQualityGate(
request: string,
response: string,
tier: ComplexityLevel
): Promise<QualityGateResult> {
const checks: Array<{ name: string; passed: boolean }> = [];
// Structural completeness: does the response address all parts of the request?
const hasSubstance = response.length > 50 && !response.includes("I don't know");
checks.push({ name: 'substance', passed: hasSubstance });
// Code validity: if code was requested, does the output contain valid-looking code blocks?
if (request.toLowerCase().includes('code') || request.toLowerCase().includes('function')) {
const hasCodeBlocks = /```[\s\S]+```/.test(response);
checks.push({ name: 'code_blocks', passed: hasCodeBlocks });
}
// Refusal detection: did the model refuse or hedge excessively?
const refusalPatterns = /i('m| am) (unable|not able|can't|cannot)\s+(to|help)/i;
const noRefusal = !refusalPatterns.test(response);
checks.push({ name: 'no_refusal', passed: noRefusal });
// Length adequacy: response should be proportional to request complexity
const minExpectedLength = tier === 'LOW' ? 100 : tier === 'MEDIUM' ? 300 : 500;
const adequateLength = response.length >= minExpectedLength;
checks.push({ name: 'adequate_length', passed: adequateLength });
const passedCount = checks.filter((c) => c.passed).length;
const score = passedCount / checks.length;
const failedReasons = checks.filter((c) => !c.passed).map((c) => c.name);
return {
passed: score >= 0.75,
score,
reasons: failedReasons,
};
}
import { generateText } from 'ai';
export interface ModelTier {
level: ComplexityLevel;
modelId: string;
provider: string;
costPer1MTokens: number;
maxRetries: number;
}
const MODEL_TIERS: ModelTier[] = [
{ level: 'LOW', modelId: 'gemini-4-flash-lite', provider: 'google', costPer1MTokens: 0.025, maxRetries: 1 },
{ level: 'MEDIUM', modelId: 'claude-5.5-sonnet', provider: 'anthropic', costPer1MTokens: 3.0, maxRetries: 1 },
{ level: 'HIGH', modelId: 'gemini-4-pro', provider: 'google', costPer1MTokens: 1.25, maxRetries: 1 },
{ level: 'ULTRA', modelId: 'gpt-astra-6', provider: 'openai', costPer1MTokens: 15.0, maxRetries: 2 },
];
const TIER_ORDER: ComplexityLevel[] = ['LOW', 'MEDIUM', 'HIGH', 'ULTRA'];
export async function cascadeRequest(
prompt: string,
signals: ComplexitySignals,
systemPrompt: string
): Promise<{ text: string; model: string; totalCost: number; escalations: number }> {
const startTier = scoreComplexity(signals);
const startIndex = TIER_ORDER.indexOf(startTier);
let escalations = 0;
for (let i = startIndex; i < MODEL_TIERS.length; i++) {
const tier = MODEL_TIERS[i];
const result = await generateText({
model: getModelProvider(tier.provider, tier.modelId),
system: systemPrompt,
prompt,
});
const quality = await evaluateQualityGate(prompt, result.text, tier.level);
if (quality.passed || i === MODEL_TIERS.length - 1) {
return {
text: result.text,
model: tier.modelId,
totalCost: calculateCost(result.usage, tier.costPer1MTokens),
escalations,
};
}
escalations++;
}
throw new Error('All model tiers exhausted');
}
function calculateCost(usage: { promptTokens: number; completionTokens: number }, costPer1M: number): number {
return ((usage.promptTokens + usage.completionTokens) / 1_000_000) * costPer1M;
}
| Workload Distribution | Without Cascade | With Cascade | Savings |
|---|---|---|---|
| 60% simple, 30% medium, 10% complex | $1,500/month (all Opus) | $450/month | 70% |
| 40% simple, 40% medium, 20% complex | $2,000/month (all Pro) | $800/month | 60% |
| 20% simple, 50% medium, 30% complex | $3,000/month (mixed) | $1,500/month | 50% |
kv-cache-prefix-optimizer patterns to reduce base cost at every tier.feature-flag-analytics-expert to experiment with complexity score thresholds.| Anti-Pattern | Consequence | Remedy |
|---|---|---|
| Sending everything to the frontier model | 5-10x unnecessary cost | Implement complexity scoring and cascade |
| Using another LLM call as the quality gate | Gate cost exceeds savings from cascading | Use fast heuristic checks (regex, length, structure) |
| No fallback for model provider outages | Total feature outage when one provider is down | Cascade across providers, not just model sizes |
| Static tier assignment without telemetry | Suboptimal routing as usage patterns evolve | Monitor and adjust complexity thresholds weekly |
<a name="bahasa-indonesia"></a>
zero-to-prod-orchestrator (Integrasi AI Fase 4), brainstorming, session-memory-manager.llm-finops-router (pelacakan ROI & batas biaya), llm-observability-expert (keputusan kaskade, eskalasi, & tracing).frontier-ai-models-expert (skor tier model & tolok ukur), context-window-engineer (routing luapan batas konteks), kv-cache-prefix-optimizer (penguncian cache prefix tier).test-time-compute-optimizer (token penalaran dinamis saat eskalasi), ai-llm-integration-expert, vercel-ai-sdk-expert (fallback kaskade multi-provider).Arsitektur produksi untuk merutekan permintaan AI ke tier model optimal berdasarkan penilaian kompleksitas tugas secara real-time. Alih-alih mengirim setiap permintaan ke model frontier termahal, skill ini mengimplementasikan kaskade: coba model tercepat/termurah dulu, evaluasi kualitas output via penilai otomatis, dan eskalasi ke model lebih capable (mahal) hanya jika tier murah gagal melewati gerbang kualitas. Menghemat 40-60% biaya untuk beban kerja produksi tipikal.
Aktifkan skill ini ketika:
Empat tier berurutan: LOW (Flash-Lite/Haiku), MEDIUM (Flash/Sonnet), HIGH (Pro/Opus), ULTRA (Astra 6 + Extended Thinking). Setiap tier memiliki gerbang kualitas. Jika gagal, eskalasi ke tier berikutnya.
Skor numerik berdasarkan sinyal: jumlah token, kebutuhan generasi kode, penalaran, langkah multi-step, spesifisitas domain, kreativitas, tool calls, dan ukuran konteks.
Evaluasi cepat berbasis heuristik (<200ms): substansi respons, blok kode valid, deteksi penolakan, dan kecukupan panjang. Tidak menggunakan panggilan LLM tambahan.
kv-cache-prefix-optimizer untuk mengurangi biaya dasar di setiap tier.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Fast (Composer 2.5, Grok 4.7/4.6) to Medium (Gemini 4 Argon, GPT-5.6 Sol, Claude Opus 5.5) and High (Claude Sonnet 5.5, Claude Fable 5.1, Muse Wonder) / Panduan ahli untuk kaskade dan routing model cerdas.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Master guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan utama komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.