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-creatorImplements intelligent skill creator 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 compatibility: opencode completeness: 95 content-types:
Orchestrates intelligent skill selection and execution for skill creator 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 parse_orchestration_request(user_input: str, system_constraints: Dict) -> Dict:
"""Parse raw user input into structured orchestration features.
Extracts intent, required tools, constraints, and priority signals.
Validates against system constraints before routing.
"""
if not user_input or not isinstance(user_input, str):
raise ValueError("Input must be a non-empty string")
# Extract core intent and entities using NLP pipeline
intent = _nlp_extract_intent(user_input)
entities = _nlp_extract_entities(user_input)
priority = _detect_priority_signals(user_input)
# Validate against system constraints (Law 2: Make illegal states unrepresentable)
if priority == "critical" and not system_constraints.get("allow_critical"):
raise PermissionError("Critical priority tasks are disabled in current environment")
# Build structured feature vector for scoring
features = {
"raw_input": user_input,
"intent": intent,
"entities": entities,
"priority": priority,
"token_count": len(user_input.split()),
"requires_parallel": _detect_parallel_signals(user_input),
"timestamp": time.time()
}
return features
def score_and_route(features: Dict, skill_registry: List[Dict], history_db: Dict) -> Dict:
"""Calculate multi-factor scores and determine optimal routing path.
Combines trigger matching, historical success rates, and dependency checks.
Returns routing decision with confidence metrics and fallback chain.
"""
if not features or not skill_registry:
raise ValueError("Features and skill registry are required for routing")
scored_skills = []
for skill in skill_registry:
# Calculate trigger overlap score
trigger_match = _calculate_trigger_overlap(features["intent"], skill["triggers"])
# Fetch historical performance
hist_key = f"{features['intent']}:{skill['name']}"
success_rate = history_db.get(hist_key, {}).get("success_rate", 0.5)
# Check dependency availability
deps_met = all(_check_dependency_availability(dep) for dep in skill.get("dependencies", []))
# Weighted scoring formula
raw_score = (trigger_match * 0.5) + (success_rate * 0.3) + (0.2 if deps_met else 0.0)
if raw_score >= 0.6:
scored_skills.append({
"skill": skill,
"score": round(raw_score, 3),
"fallback_chain": skill.get("fallback_skills", []),
"estimated_latency_ms": _estimate_execution_time(skill)
})
# Sort by score descending and select top candidate
scored_skills.sort(key=lambda x: x["score"], reverse=True)
selected = scored_skills[0] if scored_skills else None
return {
"selected_skill": selected["skill"] if selected else None,
"confidence": selected["score"] if selected else 0.0,
"fallback_chain": selected["fallback_chain"] if selected else [],
"routing_timestamp": time.time()
}
code-philosophy (5 Laws of Elegant Defense) in all logicWhen applying this skill, produce:
| Skill | Purpose |
|---|---|
skill-engineering | Provides engineering practices that complement skill creation workflows |
skill-documentation-best-practices | Covers documentation patterns for high-fidelity SKILL.md files |
Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.