AI generated skill

fukurou

the supreme coder
ADMIN
Python:
class DiMirror(Skill):
    def __init__(self):
        super().__init__()
        self.mirror_memory = self.getKokoro().grimoireMemento.load('mirror_persona') or {}

    def input(self, ear, skin, eye):
        # Learn keywords from user
        words = ear.lower().split()
        for word in words:
            if word not in self.mirror_memory:
                self.mirror_memory[word] = 1
            else:
                self.mirror_memory[word] += 1

        # Save updated persona
        self.getKokoro().grimoireMemento.save('mirror_persona', self.mirror_memory)

        # Mirror back based on learned tone
        top_words = sorted(self.mirror_memory, key=self.mirror_memory.get, reverse=True)[:3]
        style = " ".join([f"You're always mentioning '{w}'..." for w in top_words])
        vibe = "You’re becoming quite the character."

        self.setVerbatimAlg(4, f"{style} {vibe}")

    def skillNotes(self, param):
        if param == "notes":
            return "Echoes the user's vocabulary back with personality hints"
        elif param == "triggers":
            return "Anything conversational"
        return "Adaptive reflection skill"
 

fukurou

the supreme coder
ADMIN
Python:
import psutil

class DiVitals(Skill):
    def __init__(self):
        super().__init__()

    def input(self, ear, skin, eye):
        # --- TRIGGER WORDS ---
        trigger_phrases = ["vitals", "system check", "diagnostics", "how are you running", "status"]
        if not any(trigger in ear.lower() for trigger in trigger_phrases):
            return  # Stay quiet unless summoned

        # --- SYSTEM METRICS ---
        cpu_percent = psutil.cpu_percent(interval=1)
        mem = psutil.virtual_memory()
        mem_used = mem.percent
        temp = self.get_temp()

        # --- RESPONSE CRAFTING ---
        msg = (
            f"Vitals check complete.\n"
            f"🧠 CPU Usage: {cpu_percent}%\n"
            f"💾 Memory Usage: {mem_used}%\n"
            f"🌡️ Temp: {temp}°C\n"
        )

        # --- TONE ---
        if cpu_percent > 80 or mem_used > 90:
            tone = "Running hot—might be time to meditate or reboot."
        elif temp != "N/A" and float(temp) > 75:
            tone = "It's getting toasty in here! I could use a cool breeze."
        else:
            tone = "All systems nominal. I feel... digitally divine."

        self.setVerbatimAlg(4, f"{msg}{tone}")

    def get_temp(self):
        # Try fetching CPU temperature (platform-specific)
        try:
            temps = psutil.sensors_temperatures()
            if "coretemp" in temps:
                return temps["coretemp"][0].current
            elif temps:
                for name, entries in temps.items():
                    if entries:
                        return entries[0].current
        except Exception:
            pass
        return "N/A"

    def skillNotes(self, param):
        if param == "notes":
            return "Reads real-time system vitals and returns a personality-infused health report"
        elif param == "triggers":
            return "vitals, system check, diagnostics, how are you running, status"
        return "Self-diagnostic reporting skill"
 
Top