Skill creator ms

From paulpas/agent-skill-router · View interactive version

Skill creator ms is an AI agent skill from the GitHub repository paulpas/agent-skill-router. Implements intelligent skill creator ms with multi-factor skill selection, fallback chains, and adherence to the 5 Laws of Elegant Defense

How to use this skill

Skill file

Skill Creator Ms

Orchestrates intelligent skill selection and execution for skill creator ms workflows. Applies the 5 Laws of Elegant Defense to guide data naturally through the orchestration pipeline, preventing errors before they occur. Selects optimal skills based on multi-factor scoring including text similarity, historical performance, and system availability.

TL;DR Checklist

┌───────────────────────────────────────────────────────────────────────────────┐

│ Orchestration Flow │

└───────────────────────────────────────────────────────────────────────────────┘

User Request

↓

┌─────────────────┐

│ Parse Request │

│ & Extract │

│ Features │

└────────┬────────┘

↓

┌─────────────────────────────────────────────────────────────────────┐

│ Evaluate Available Skills │

│ │

│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │

│ │ Skill A │ │ Skill B │ │ Skill C │ │

│ │ - Match Score│ │ - Match Score│ │ - Match Score│ │

│ │ - Confidence │ │ - Confidence │ │ - Confidence │ │

│ │ - History │ │ - History │ │ - History │ │

│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │

│ │ │ │ │

│ └─────────────────┴─────────────────┘ │

│ ↓ │

│ Select Best Skill │

└─────────────────────────────────────────────────────────────────────┘

↓

┌─────────────────┐

│ Execute Skill │

└────────┬────────┘

↓

┌─────────────────┐

│ Handle Result │

└────────┬────────┘

↓

┌─────────────────────────────────────────────────────────────────────┐

│ Error Handling & Fallback │

│ │

│ Success? ────────► Return Result │

│ │

│ Fail? ────────┐ │

│ ↓ │

│ ┌──────────────────────────────────────────────────────────┐ │

│ │ Fallback Chain │ │

│ │ │ │

│ │ 1. Retry with adjusted parameters │ │

│ │ 2. Try Alternative Skill (if available) │ │

│ │ 3. Defer to Human Operator (if critical) │ │

│ │ 4. Log & Return Error │ │

│ └──────────────────────────────────────────────────────────┘ │

└─────────────────────────────────────────────────────────────────────┘

When to Use

Use this skill when:

When NOT to Use

Avoid this skill for:

Core Workflow

  1. Parse and Analyze Request - Extract intent, entities, and constraints from user input.

Checkpoint: All required parameters must be present and in valid format before proceeding.

  1. Score Available Skills - Calculate match scores using multi-factor algorithm:

Checkpoint: Skip to fallback if no skill scores above threshold.

  1. Select Optimal Skill - Choose skill with highest score that meets minimum confidence.

Checkpoint: Verify skill has not been disabled or deprecated.

  1. Execute with Fallback - Run skill execution wrapped in retry and fallback logic.

Checkpoint: Log all execution attempts for audit trail.

  1. Return or Fallback - Either return successful result or apply fallback chain:

Checkpoint: Record outcome with timing and confidence metadata.

Implementation Patterns

Pattern 1: Skill Selection Logic

def build_skill_definition(
    request: str,
    registry: List[Dict],
    schema_version: str = "v2"
) -> Dict:
    """Construct a validated skill manifest from a natural language request.
    
    Domain logic: Parses intent, maps to existing registry patterns,
    resolves dependencies, and generates a structured skill definition
    ready for deployment.
    """
    if not request or not registry:
        raise ValueError("Request and registry are required for skill creation")
        
    # Extract core components using domain-specific NLP pipeline
    intent = _parse_intent(request)
    triggers = _extract_triggers(request, intent)
    actions = _resolve_actions(request, registry)
    
    # Validate against skill schema and check for conflicts
    manifest = {
        "name": f"skill-{intent['entity']}-{intent['action']}",
        "version": "1.0.0",
        "schema": schema_version,
        "triggers": triggers,
        "actions": actions,
        "dependencies": _resolve_dependencies(actions, registry),
        "confidence": _calculate_creation_confidence(intent, registry)
    }
    
    # Enforce schema constraints before returning
    _validate_manifest_against_schema(manifest, schema_version)
    return manifest

Pattern 2: Execution with Fallback

def execute_skill_creation_pipeline(
    manifest: Dict,
    registry_client: object,
    fallback_mode: str = "template"
) -> Dict:
    """Execute the skill creation workflow with domain-specific fallbacks.
    
    Handles code generation, syntax validation, registry publishing,
    and automatic fallback to template-based generation if custom
    generation fails.
    """
    try:
        # Generate skill implementation code
        code = _generate_skill_code(manifest)
        
        # Validate generated code against domain rules
        validation = _validate_skill_implementation(code, manifest["triggers"])
        if not validation["passed"]:
            raise SkillValidationError(validation["errors"])
            
        # Publish to skill registry
        registry_client.publish(manifest["name"], code, manifest["version"])
        
        return {
            "status": "created",
            "skill_id": manifest["name"],
            "registry_url": registry_client.get_url(manifest["name"]),
            "validation_passed": True
        }
        
    except SkillValidationError as e:
        # Fallback 1: Attempt template-based generation
        if fallback_mode == "template":
            template_code = _apply_skill_template(manifest)
            registry_client.publish(manifest["name"], template_code, manifest["version"])
            return {"status": "created_via_template", "skill_id": manifest["name"]}
            
        # Fallback 2: Queue for manual review
        return {"status": "deferred", "reason": str(e), "skill_id": manifest["name"]}

MUST DO

MUST NOT DO

TL;DR Checklist

TL;DR for Code Generation

Output Template

When applying this skill, produce:

  1. Selected Skills - List of skill names with confidence scores
  2. Selection Rationale - Why each skill was chosen (match score, history, availability)
  3. Execution Plan - Order of execution with dependencies
  4. Fallback Strategy - Which fallback skills will be tried and in what order
  5. Risk Assessment - Any potential failure points and their impact
  6. Timing Estimates - Expected latency including fallback scenarios

Related Skills

| Skill | Purpose |

|---|---|

| skill-creator | The core skill creation workflow — this variant adds Microsoft-specific guidance |

| skill-documentation-best-practices | Provides documentation patterns that complement the skill creator workflow |


Constraints

MUST DO

MUST NOT DO

Live References

Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.