AgentSkillsCN

customize

为Guardian Core新增功能或调整其行为。当用户希望添加渠道(Telegram、Slack、电子邮件输入)、更改触发器、增加集成、修改路由器,或进行其他自定义操作时使用此技能。这是一个交互式技能,会通过提问来深入了解用户的需求。

SKILL.md
--- frontmatter
name: customize
description: Add new capabilities or modify Guardian Core behavior. Use when user wants to add channels (Telegram, Slack, email input), change triggers, add integrations, modify the router, or make any other customizations. This is an interactive skill that asks questions to understand what the user wants.

Guardian Core Customization

This skill helps users add capabilities or modify behavior. Use AskUserQuestion to understand what they want before making changes.

Workflow

  1. Understand the request - Ask clarifying questions
  2. Plan the changes - Identify files to modify
  3. Implement - Make changes directly to the code
  4. Test guidance - Tell user how to verify

Key Files

FilePurpose
platform/lib/guardian/kernel/config.exKernel paths and config
platform/lib/guardian/kernel/whatsapp/message_router.exMessage routing
platform/lib/guardian/kernel/container_runner.exAgent container spawning
platform/lib/guardian/kernel/task_scheduler.exScheduled tasks
data/registered_groups.jsonRegistered groups and triggers
groups/CLAUDE.mdGlobal memory/persona

Common Customization Patterns

Adding a New Input Channel (e.g., Telegram, Slack, Email)

Questions to ask:

  • Which channel? (Telegram, Slack, Discord, email, SMS, etc.)
  • Same trigger word or different?
  • Same memory hierarchy or separate?
  • Should messages from this channel go to existing groups or new ones?

Implementation pattern:

  1. Find/add MCP server for the channel
  2. Add connection and message handling in the kernel
  3. Store messages in the database (update Ecto schemas if needed)
  4. Ensure responses route back to correct channel

Adding a New MCP Integration

Questions to ask:

  • What service? (Calendar, Notion, database, etc.)
  • What operations needed? (read, write, both)
  • Which groups should have access?

Implementation:

  1. Add MCP server config to the container runner
  2. Add tools to allowedTools in the agent runner
  3. Document in groups/CLAUDE.md

Changing Assistant Behavior

Questions to ask:

  • What aspect? (name, trigger, persona, response style)
  • Apply to all groups or specific ones?

Simple changes → edit kernel config or data/registered_groups.json Persona changes → edit groups/CLAUDE.md Per-group behavior → edit specific group's CLAUDE.md

Adding New Commands

Questions to ask:

  • What should the command do?
  • Available in all groups or main only?
  • Does it need new MCP tools?

Implementation:

  1. Add command handling in the message router
  2. Check for the command before the trigger pattern check

Changing Deployment

Questions to ask:

  • Target platform? (Linux server, Docker)
  • Service manager? (systemd, Docker)

Implementation:

  1. Create appropriate service files
  2. Update paths in config
  3. Provide setup instructions

After Changes

Always tell the user:

bash
# Rebuild and restart
cd platform && mix compile
systemctl --user restart guardian-core

Example Interaction

User: "Add Telegram as an input channel"

  1. Ask: "Should Telegram use the same @Andy trigger, or a different one?"
  2. Ask: "Should Telegram messages create separate conversation contexts, or share with WhatsApp groups?"
  3. Find Telegram MCP or library
  4. Add connection handling in the kernel
  5. Update message storage in Ecto schemas
  6. Tell user how to authenticate and test