Skip to content

anbeime/skill / skills/historical-interview-scripts/historical-interview-scripts

historical-interview-scripts

Verified

自媒体创作者在策划历史名人访谈短视频时,当需要融合古今反差与网络热梗打造爆款,使用本技能可自动生成包含吸睛标题、主持人串词与爆笑问答的完整结构化脚本,轻松产出高传播力的趣味短视频文案。

scripts/agents/base_agent.py

View on GitHub
#!/usr/bin/env python3
"""
基础智能体类
"""

from abc import ABC, abstractmethod
from typing import Dict, Any, List, Optional


class BaseAgent(ABC):
    """基础智能体"""
    
    def __init__(self, memory, config: Dict[str, Any]):
        """
        初始化
        
        Args:
            memory: 共享记忆库
            config: 配置字典
        """
        self.memory = memory
        self.config = config
    
    @abstractmethod
    def execute(self, *args, **kwargs) -> Any:
        """执行任务"""
        pass
    
    def _call_llm(self, prompt: str, system_prompt: str = None) -> str:
        """
        调用LLM
        
        Args:
            prompt: 用户提示
            system_prompt: 系统提示(可选)
        
        Returns:
            str: LLM返回的文本
        """
        # 这里应该调用实际的LLM API
        # 为了演示,这里返回模拟响应
        # 在实际使用时,请替换为真实的API调用
        
        llm_config = self.config.get('llm', {})
        provider = llm_config.get('provider', 'openai')
        
        if provider == 'openai':
            # 调用OpenAI API
            # from openai import OpenAI
            # client = OpenAI(api_key=llm_config.get('api_key'))
            # response = client.chat.completions.create(...)
            pass
        
        # 模拟响应
        return "模拟LLM响应"
    
    def log(self, message: str):
        """日志"""
        print(f"[{self.__class__.__name__}] {message}")
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 192kUpdated Claude CodeCodexVerifiedInstall