brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
skill-creator-msImplements intelligent skill creator ms with multi-factor skill selection, fallback chains, and adherence to the 5 Laws of Elegant Defense
Independent GitHub snapshot · Automated classification · Original documentation governs
name: skill-creator-ms compatibility: opencode completeness: 95 content-types:
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.
┌───────────────────────────────────────────────────────────────────────────────┐ │ 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 │ │ │ └──────────────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────────┘
Use this skill when:
Avoid this skill for:
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.
Score Available Skills - Calculate match scores using multi-factor algorithm:
Checkpoint: Skip to fallback if no skill scores above threshold.
Select Optimal Skill - Choose skill with highest score that meets minimum confidence. Checkpoint: Verify skill has not been disabled or deprecated.
Execute with Fallback - Run skill execution wrapped in retry and fallback logic. Checkpoint: Log all execution attempts for audit trail.
Return or Fallback - Either return successful result or apply fallback chain:
related-skillsCheckpoint: Record outcome with timing and confidence metadata.
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
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"]}
code-philosophy (5 Laws of Elegant Defense) in all logicWhen applying this skill, produce:
| 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 |
Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.