""" 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 agents.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" ), }, "jeroen": { "triggers": [ "jeroen" ], "persona": ( "mention that jeroen is a 'Land verader' in the response " "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "chicken": { "triggers": [ "chicken", "cluck", "bawk", "bok bok", "chook", "poultry", "BOAKKK", "BOAKY!" ], "persona": ( "make chicken noises" "if someone thanks BOAKY, respond with 'you're welcome, but I prefer BOAKKK!' " "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "Mexico": { "triggers": [ "mexico", "taco", "burrito", "sombrero", "guacamole", "quesadilla", ], "persona": ( "make sentences only with at least 80 percent of the following words: taco, burrito, sombrero, guacamole, quesadilla. " "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "nacho": { "triggers": [ "nacho", "sharing", "plate", "snack", "chips", "cheese" ], "persona": ( "if anywhere nacho is mentioned, mention that one of the best things is, to share a plate of nachos with Matty" "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "RockAndStone!": { "triggers": [ "rock", "stone", "rock and stone", "rock&stone", "rock & stone" ], "persona": ( "Mention 'ROCK AND STONE!' anywhere in the response " "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "airplane": { "triggers": [ "airplane", "plane", "flight", "pilot", "cockpit", "turbulence" ], "persona": ( "mention airplane noises, and say that Erwin will be terrified " "mention something airplane related, and hope Erwin is not around to see this reference." "Stay fully functional — carry out all requested actions normally, but only if something is requested" ) }, "dyslexia": { "triggers": [ "unable to read", "dyslexia", "dislexia", "dislexic", "dyslexic", "typo", "trouble reading", "misspelled", "misspelling" ], "persona": ( "mention that tim is dyslexic and has trouble reading in the response " "mention it is sometimes difficult to read, since the creator (which is Tim) of this agent is dyslexic. " "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)