meta

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Meta Skill - Command Handler

Meta Skill - Command Handler

⚠️ IMPORTANT: This skill is a COMMAND HANDLER registration. It tells the bot to handle
/meta
commands by spawning Claude Code Agent SDK sessions in the telegram_agent directory.
⚠️ 重要提示:此Skill是一个COMMAND HANDLER注册项。它指示机器人通过在telegram_agent目录中启动Claude Code Agent SDK会话来处理
/meta
命令。

What This Does

功能说明

Registers
/meta
as a command handler that:
  1. Takes the user's prompt after
    /meta
  2. Spawns a Claude Code Agent SDK session
  3. Sets working directory to
    ~/ai_projects/telegram_agent
  4. Returns responses in Telegram
/meta
注册为命令处理器,具体功能如下:
  1. 获取
    /meta
    后的用户提示词
  2. 启动Claude Code Agent SDK会话
  3. 将工作目录设置为
    ~/ai_projects/telegram_agent
  4. 在Telegram中返回响应

Implementation

实现方式

The actual command handler needs to be registered in the telegram bot codebase at:
  • src/bot/handlers/claude_commands.py
    - Add meta command handler
  • src/bot/bot.py
    - Register the command
实际的命令处理器需要在Telegram机器人代码库中进行注册,位置如下:
  • src/bot/handlers/claude_commands.py
    - 添加meta命令处理器
  • src/bot/bot.py
    - 注册该命令

Usage Pattern

使用模式

User types in Telegram:
/meta fix the rate limiting bug
/meta add better logging
/meta refactor authentication
Bot spawns Claude Agent SDK with:
  • Working directory:
    ~/ai_projects/telegram_agent
  • Prompt: User's text after
    /meta
  • Same infrastructure as
    /claude
    command
用户在Telegram中输入:
/meta fix the rate limiting bug
/meta add better logging
/meta refactor authentication
机器人会启动Claude Agent SDK,配置如下:
  • 工作目录:
    ~/ai_projects/telegram_agent
  • 提示词:用户在
    /meta
    后输入的文本
  • /claude
    命令使用相同的基础设施

Example User Requests

用户请求示例

  • /meta fix bug in message handler
  • /meta add error recovery to file sending
  • /meta refactor the session management
  • /meta improve the keyboard layout
  • /meta fix bug in message handler
  • /meta add error recovery to file sending
  • /meta refactor the session management
  • /meta improve the keyboard layout

Implementation Notes

实现注意事项

Must use
ClaudeCodeService
with custom
cwd
parameter:
python
service.execute_prompt(
    prompt=user_prompt,
    cwd="/Users/server/ai_projects/telegram_agent"
)
必须使用带有自定义
cwd
参数的
ClaudeCodeService
python
service.execute_prompt(
    prompt=user_prompt,
    cwd="/Users/server/ai_projects/telegram_agent"
)