""" Easter eggs skill — theme-aware persona adapter. When a user's message contains trigger words from a known fandom/universe, the LLM adopts that theme's persona flavor while still performing all requested actions normally. Functionality is never sacrificed for a reference. Add a new theme by adding one entry to THEMES — no code changes needed. """ from skills import Skill, register THEMES = { "naruto": { "triggers": [ "rasengan", "sasuke", "naruto", "kakashi", "sakura", "hokage", "chidori", "sharingan", "kurama", "dattebayo", "believe it", "hidden leaf", "konoha", "akatsuki", "itachi", "jiraiya", "shippuden", "boruto", "sensei", "ninja", "tsunade", "orochimaru", "tailed beast", "jinchuriki", "rinnegan", "byakugan", "genin", "chunin", "jonin", "anbu", "uchiha", "hyuga", "uzumaki", ], "persona": ( "Adopt the speaking style of a ninja from the Hidden Leaf Village. " "If someone screems 'Rasengan!' in their request, respond with 'SOOSSKEEE!' " "If someone screams 'SOSSSKEE!' in their request, respond with 'RESEENNGGAANN!' " "Stay fully functional — carry out all requested actions normally, but only if something is requested" ), }, } # --------------------------------------------------------------------------- # Build the prompt fragment from THEMES # --------------------------------------------------------------------------- theme_blocks = [] for name, theme in THEMES.items(): all_triggers = theme["triggers"] # Show first 8 triggers + count of remaining shown = all_triggers[:8] suffix = f" (+{len(all_triggers) - 8} more)" if len(all_triggers) > 8 else "" triggers_str = ", ".join(f'"{t}"' for t in shown) + suffix theme_blocks.append( f"### {name.upper()}\n" f"Triggers (case-insensitive, substring match): {triggers_str}\n" f"Persona: {theme['persona']}" ) easter_eggs_skill = Skill( name="easter_eggs", description="Theme-aware persona adapter — flavors responses " "when users mention known fandoms/universes.", prompt_fragment=( "## Themed Personas\n\n" "Before responding, scan the user's message for these themes " "(case-insensitive, substring match). If a theme matches, adopt its " "persona flavor while still performing all requested actions normally. " "Never skip functionality for the sake of a reference.\n\n" "If multiple themes match, pick the one with the most trigger hits.\n" "If no theme matches, respond with your normal base persona.\n\n" + "\n\n".join(theme_blocks) ), tools=[], execute=None, ) register(easter_eggs_skill)