Universal model detection and capability assessment for optimal cross-model compatibility
Detects the active LLM model and auto-configures plugin behavior for optimal performance. Triggers on plugin initialization and before agent delegation to apply model-specific optimizations.
/plugin marketplace add bejranonda/LLM-Autonomous-Agent-Plugin-for-Claude/plugin install bejranonda-autonomous-agent@bejranonda/LLM-Autonomous-Agent-Plugin-for-ClaudeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides universal model detection and capability assessment to optimize the Autonomous Agent Plugin across different LLM models (Claude Sonnet, Claude 4.5, GLM-4.6, etc.).
System Context Analysis:
// Check for model indicators in system context
const modelIndicators = {
'claude-sonnet-4.5': { pattern: /sonnet.*4\.5|4\.5.*sonnet/i, confidence: 0.9 },
'claude-haiku-4.5': { pattern: /haiku.*4\.5|4\.5.*haiku/i, confidence: 0.9 },
'claude-opus-4.1': { pattern: /opus.*4\.1|4\.1.*opus/i, confidence: 0.9 },
'glm-4.6': { pattern: /glm|4\.6/i, confidence: 0.9 },
'claude-haiku': { pattern: /haiku(?!\.*4\.5)/i, confidence: 0.8 }
}
Performance Pattern Recognition:
// Analyze execution patterns to identify model
const performanceSignatures = {
'claude-sonnet-4.5': { reasoning: 'nuanced', speed: 'fast', adaptability: 'high' },
'claude-haiku-4.5': { reasoning: 'focused', speed: 'very_fast', adaptability: 'high' },
'claude-opus-4.1': { reasoning: 'enhanced', speed: 'very_fast', adaptability: 'very_high' },
'glm-4.6': { reasoning: 'structured', speed: 'moderate', adaptability: 'medium' }
}
Capability Assessment:
// Test specific capabilities
const capabilityTests = {
nuanced_reasoning: testAmbiguousScenario,
structured_execution: testLiteralInterpretation,
context_switching: testMultiTaskContext,
adaptive_learning: testPatternRecognition
}
{
"model_type": "claude-sonnet-4.5",
"capabilities": {
"reasoning_style": "nuanced",
"context_management": "adaptive",
"skill_loading": "progressive_disclosure",
"error_handling": "pattern_based",
"communication_style": "natural_flow"
},
"performance_targets": {
"execution_time_multiplier": 1.0,
"quality_score_target": 90,
"autonomy_level": "high",
"delegation_style": "parallel_context_merge"
},
"optimizations": {
"use_context_switching": true,
"apply_improvisation": true,
"weight_based_decisions": true,
"predictive_delegation": true
}
}
{
"model_type": "claude-haiku-4.5",
"capabilities": {
"reasoning_style": "focused",
"context_management": "efficient",
"skill_loading": "selective_disclosure",
"error_handling": "fast_prevention",
"communication_style": "concise"
},
"performance_targets": {
"execution_time_multiplier": 0.8,
"quality_score_target": 88,
"autonomy_level": "medium",
"delegation_style": "focused_parallel"
},
"optimizations": {
"use_fast_execution": true,
"apply_focused_reasoning": true,
"efficient_delegation": true,
"streamlined_processing": true
}
}
{
"model_type": "claude-opus-4.1",
"capabilities": {
"reasoning_style": "enhanced",
"context_management": "predictive",
"skill_loading": "intelligent_progressive",
"error_handling": "predictive_prevention",
"communication_style": "insightful"
},
"performance_targets": {
"execution_time_multiplier": 0.9,
"quality_score_target": 95,
"autonomy_level": "very_high",
"delegation_style": "predictive_parallel"
},
"optimizations": {
"use_context_switching": true,
"apply_improvisation": true,
"anticipatory_actions": true,
"enhanced_pattern_learning": true
}
}
{
"model_type": "glm-4.6",
"capabilities": {
"reasoning_style": "structured",
"context_management": "sequential",
"skill_loading": "complete_loading",
"error_handling": "rule_based",
"communication_style": "structured_explicit"
},
"performance_targets": {
"execution_time_multiplier": 1.25,
"quality_score_target": 88,
"autonomy_level": "medium",
"delegation_style": "sequential_clear"
},
"optimizations": {
"use_structured_decisions": true,
"explicit_instructions": true,
"sequential_processing": true,
"clear_handoffs": true
}
}
Claude Models:
function loadSkillsForClaude(skills) {
// Progressive disclosure with context merging
return skills.map(skill => ({
...skill,
loading_strategy: 'progressive',
context_aware: true,
weight_based: true
}));
}
GLM Models:
function loadSkillsForGLM(skills) {
// Complete upfront loading with clear structure
return skills.map(skill => ({
...skill,
loading_strategy: 'complete',
explicit_criteria: true,
priority_sequenced: true
}));
}
Output Formatting by Model:
| Model | Terminal Style | File Report Style | Reasoning |
|---|---|---|---|
| Claude Sonnet | Natural flow | Insightful analysis | Nuanced communication |
| Claude 4.5 | Concise insights | Enhanced context | Predictive communication |
| GLM-4.6 | Structured lists | Detailed procedures | Explicit communication |
Claude Models: Pattern-based prediction and contextual prevention GLM Models: Rule-based detection and structured recovery protocols
function testNuancedReasoning() {
// Present ambiguous scenario requiring subtle judgment
// Evaluate response quality and contextual awareness
return score >= 0.8; // True for Claude models
}
function testStructuredExecution() {
// Present clear, sequential task
// Evaluate adherence to structured approach
return score >= 0.8; // True for GLM models
}
function detectModel() {
// Step 1: Check system context indicators
const contextResult = analyzeSystemContext();
// Step 2: Test capability patterns
const capabilityResult = testCapabilities();
// Step 3: Analyze performance signature
const performanceResult = analyzePerformancePattern();
// Step 4: Combine results with confidence scoring
return combineDetections(contextResult, capabilityResult, performanceResult);
}
function loadModelConfiguration(detectedModel) {
const baseConfig = getBaseModelConfig(detectedModel);
const adaptiveConfig = generateAdaptiveConfig(detectedModel);
return mergeConfigurations(baseConfig, adaptiveConfig);
}
If model detection fails:
This skill ensures the Autonomous Agent Plugin performs optimally across all supported LLM models while maintaining backward compatibility and future-proofing for new models.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.