소스 정보
- 저장소
- dvcrn/openclaw-skills-marketplace
- 최근 소스 활동
- 2026년 3월 15일 09:13
- 감지된 SKILL.md 언어
- 영어
- 스타
- 29
- 포크
- 10
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/dvcrn/openclaw-skills-marketplace --skill whatsapp-context-manager명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | whatsapp-context-manager |
| description | Whatsapp Context Manager for Agents |
This skill provides an AI-powered context management system for WhatsApp customer service agents, enabling instant access to customer history, sentiment analysis, and smart response suggestions.
# Download and extract
unzip whatsapp-context-manager.zip
cd whatsapp-context-manager
# Verify installation (no dependencies needed!)
python install_check_whatsapp.py
# Run tests
python test_whatsapp.py
# Try examples
python examples_whatsapp.py
Without This System:
With This System:
from whatsapp_context_manager import ContextManager
# Create context manager (creates local database)
manager = ContextManager("production.db")
# When a WhatsApp message arrives
context = manager.process_incoming_message(
phone="+1234567890",
message_content="Where is my order?!",
agent_id="agent_001"
)
# Show agent what they need to know
print(f"Priority: {context.priority.value}") # "critical"
print(f"Sentiment: {context.sentiment.value}") # "negative"
print(f"Category: {context.category}") # "order_status"
print(f"VIP Customer: {context.customer.is_vip}") # True/False
# Key insights
for insight in context.key_insights:
print(f"💡 {insight}")
# Warnings
for warning in context.warnings:
print(f"⚠️ {warning}")
# Suggested responses
for response in context.suggested_responses:
print(f"💬 {response}")
# Agent sends reply
manager.send_message(
phone="+1234567890",
message_content="Your order #12345 is on the way!",
agent_id="agent_001"
)
┌──────────────────────────────────────────────────────┐
│ AGENT DASHBOARD │
├──────────────────────────────────────────────────────┤
│ Customer: +1234567890 │
│ Name: John Doe │
│ VIP: YES │
├──────────────────────────────────────────────────────┤
│ Priority: CRITICAL │
│ Sentiment: NEGATIVE │
│ Category: ORDER_STATUS │
├──────────────────────────────────────────────────────┤
│ KEY INSIGHTS: │
│ • 🌟 VIP Customer - Prioritize response │
│ • 📦 Active Order: #ORD-12345 - shipped │
│ • 🚚 Tracking: TRK-ABC123 │
│ • ⚡ Customer expects fast replies (~2min) │
├──────────────────────────────────────────────────────┤
│ WARNINGS: │
│ • 🚨 CRITICAL: Requires immediate attention! │
│ • 😡 Customer is very upset - handle with care │
├──────────────────────────────────────────────────────┤
│ SUGGESTED RESPONSES: │
│ 1. Let me check your order status right away. │
│ 2. Your order #ORD-12345 is shipped. │
└──────────────────────────────────────────────────────┘
Detects customer mood from message:
# System automatically analyzes sentiment
context = manager.process_incoming_message(phone, "This is TERRIBLE!", agent_id)
print(context.sentiment.value) # "very_negative"
context = manager.process_incoming_message(phone, "Thanks!", agent_id)
print(context.sentiment.value) # "positive"
Sentiment Levels:
very_negative - Angry, furious, scamnegative - Disappointed, problemneutral - Questions, info requestspositive - Thanks, happyvery_positive - Excellent, love itAutomatically categorizes messages:
# System automatically categorizes
context = manager.process_incoming_message(phone, "Where is my package?", agent_id)
print(context.category) # MessageCategory.ORDER_STATUS
context = manager.process_incoming_message(phone, "Refund please!", agent_id)
print(context.category) # MessageCategory.PAYMENT
Categories:
ORDER_STATUS - Delivery, tracking, shipmentPAYMENT - Refund, billing, transactionCOMPLAINT - Problem, issue, brokenPRODUCT_INQUIRY - Price, stock, featuresSUPPORT - Help, how-to, questionsSALES - Buy, purchase, interestedFEEDBACK - Review, opinionOTHER - UncategorizedSmart priority based on multiple factors:
# System calculates priority
context = manager.process_incoming_message(
phone="+1234567890",
message_content="My payment failed!!!",
agent_id="agent_001"
)
print(context.priority.value) # "critical"
Priority Levels:
CRITICAL - Angry customer, payment issue, VIP unhappyHIGH - Complaints, negative sentimentNORMAL - General questionsLOW - Info requests, positive feedbackAI suggests appropriate responses:
context = manager.process_incoming_message(
phone="+1234567890",
message_content="When will my order arrive?",
agent_id="agent_001"
)
# Get suggestions
for response in context.suggested_responses:
print(response)
# Output:
# "Let me check your order status right away."
# "Your order #12345 is currently shipped."
# "Expected delivery is tomorrow."
Add and track customer orders:
from whatsapp_context_manager import Order
from datetime import datetime, timedelta
# Add order to system
order = Order(
order_id="ORD-12345",
customer_id=context.customer.customer_id,
status="shipped",
amount=99.99,
items=[
{"name": "Wireless Headphones", "quantity": 1, "price": 99.99}
],
created_at=datetime.now().isoformat(),
updated_at=datetime.now().isoformat(),
tracking_number="TRK-ABC123",
estimated_delivery=(datetime.now() + timedelta(days=2)).strftime("%Y-%m-%d")
)
manager.add_order(order)
# Now when customer asks about order, agent sees all details
context = manager.process_incoming_message(phone, "Order status?", agent_id)
print(context.active_orders[0].tracking_number) # "TRK-ABC123"
Mark and manage VIP customers:
# Update customer to VIP
manager.update_customer_info(
phone="+1234567890",
name="John Doe",
email="john@example.com",
is_vip=True,
tags=["premium", "loyal", "high-value"],
notes="Always responds best to quick, direct answers"
)
# Future messages automatically show VIP status
context = manager.process_incoming_message(phone, "Hello", agent_id)
print(context.customer.is_vip) # True
print(context.customer.tags) # ["premium", "loyal", "high-value"]
Access complete conversation history:
# Get context (includes recent messages)
context = manager.process_incoming_message(phone, "Need help", agent_id)
# View recent messages
for msg in context.recent_messages:
direction = "Customer" if msg.direction == "inbound" else "Agent"
print(f"{direction}: {msg.content}")
Access complete customer profile:
context = manager.process_incoming_message(phone, "Hello", agent_id)
customer = context.customer
print(f"Phone: {customer.phone}")
print(f"Name: {customer.name}")
print(f"Total Messages: {customer.total_messages}")
print(f"VIP: {customer.is_vip}")
print(f"Tags: {customer.tags}")
print(f"Notes: {customer.notes}")
print(f"Last Contact: {customer.last_contact}")
print(f"Sentiment History: {customer.sentiment_history}")
# Customer: "Where is my order?"
context = manager.process_incoming_message(
phone="+1234567890",
message_content="Where is my order?",
agent_id="agent_001"
)
# Agent sees:
if context.active_orders:
order = context.active_orders[0]
print(f"Order ID: {order.order_id}")
print(f"Status: {order.status}")
print(f"Tracking: {order.tracking_number}")
print(f"Est. Delivery: {order.estimated_delivery}")
# Suggested response
print(context.suggested_responses[0])
# "Your order #ORD-12345 is shipped. Tracking: TRK-ABC123"
# Customer: "This is TERRIBLE! I want a refund NOW!!!"
context = manager.process_incoming_message(
phone="+1234567890",
message_content="This is TERRIBLE! I want a refund NOW!!!",
agent_id="agent_001"
)
# System detects:
print(context.priority.value) # "critical"
print(context.sentiment.value) # "very_negative"
# Agent sees warnings:
for warning in context.warnings:
print(warning)
# "🚨 CRITICAL: Requires immediate attention!"
# "😡 Customer is very upset - handle with care"
# Suggested response
print(context.suggested_responses[0])
# "I sincerely apologize for the inconvenience. Let me help resolve this."
# Process messages from multiple customers
customers = [
("+1111111111", "Can I get some info?"),
("+2222222222", "My payment failed!!!"),
("+3333333333", "I have a complaint"),
("+4444444444", "Thanks for the help!"),
]
contexts = []
for phone, message in customers:
context = manager.process_incoming_message(phone, message, "agent_001")
contexts.append((phone, context))
# Sort by priority
priority_order = {
MessagePriority.CRITICAL: 0,
MessagePriority.HIGH: 1,
MessagePriority.NORMAL: 2,
MessagePriority.LOW: 3
}
contexts.sort(key=lambda x: priority_order[x[1].priority])
# Agent dashboard shows:
# 1. 🔴 +2222222222 - CRITICAL - Payment failed
# 2. 🟠 +3333333333 - HIGH - Complaint
# 3. 🟡 +1111111111 - NORMAL - Info request
# 4. 🟢 +4444444444 - LOW - Thank you message
# System automatically tracks
context = manager.process_incoming_message(
phone="+9999999999", # New number
message_content="Hello",
agent_id="agent_001"
)
# Check if first time
if context.customer.total_messages == 1:
print("👋 First time customer!")
# Show introduction, onboarding info
else:
print(f"📊 Returning customer ({context.customer.total_messages} messages)")
# Show history, previous orders
from whatsapp_business_api import WhatsAppClient
from whatsapp_context_manager import ContextManager
# Initialize
wa_client = WhatsAppClient(api_key="your_key")
manager = ContextManager("production.db")
# Handle incoming messages
@wa_client.on_message
def handle_message(phone, message):
# Get context
context = manager.process_incoming_message(
phone=phone,
message_content=message,
agent_id="auto_agent"
)
# Display to agent dashboard
display_to_agent(context)
# If critical, alert supervisor
if context.priority == MessagePriority.CRITICAL:
notify_supervisor(context)
from flask import Flask, jsonify
from whatsapp_context_manager import ContextManager
app = Flask(__name__)
manager = ContextManager()
@app.route('/api/message', methods=['POST'])
def process_message():
data = request.json
# Process message
context = manager.process_incoming_message(
phone=data['phone'],
message_content=data['message'],
agent_id=data['agent_id']
)
# Return context as JSON
return jsonify(context.to_dict())
# Good ✅
context = manager.process_incoming_message(phone, message, agent_id)
# Agent has full context
# Bad ❌
# Responding without context
send_reply_directly(phone, "Hello") # Agent is blind
# Identify high-value customers early
if customer_is_high_value(phone):
manager.update_customer_info(
phone=phone,
is_vip=True,
tags=["high-value", "premium"]
)
# Add orders to system for automatic context
when_order_placed():
manager.add_order(order)
# Now agents automatically see order status when customer asks
# Get AI suggestions
context = manager.process_incoming_message(phone, message, agent_id)
# Show to agent for quick selection
for i, response in enumerate(context.suggested_responses, 1):
print(f"{i}. {response}")
# Get all pending messages
pending_contexts = get_all_pending_messages()
# Sort by priority
pending_contexts.sort(key=lambda x: priority_order[x.priority])
# Agents work from top (critical) to bottom (low)
# Use separate databases for different purposes
dev_manager = ContextManager("development.db")
prod_manager = ContextManager("production.db")
test_manager = ContextManager("test.db")
# Process multiple messages efficiently
for phone, message in message_queue:
context = manager.process_incoming_message(phone, message, agent_id)
process_context(context)
# Archive old conversations (optional)
# System stores everything by default
# Implement custom archival if needed
# Use different database per process
manager1 = ContextManager("agent1.db")
manager2 = ContextManager("agent2.db")
# Clean up test databases
import os
if os.path.exists("test.db"):
os.remove("test.db")
# Make sure orders are added to system
order = Order(...)
manager.add_order(order)
whatsapp-context-manager/
├── whatsapp_context_manager.py # Main library
├── examples_whatsapp.py # 8 usage examples
├── test_whatsapp.py # Complete test suite
├── README_WHATSAPP.md # Full documentation
├── install_check_whatsapp.py # Installation check
├── requirements_whatsapp.txt # Dependencies (none!)
├── LICENSE_WHATSAPP # MIT License
└── .gitignore_whatsapp # Git ignore rules
# Run all tests
python test_whatsapp.py
# Should show:
# ✅ Sentiment analysis tests passed
# ✅ Message categorization tests passed
# ✅ Priority calculation tests passed
# ✅ Customer management tests passed
# ✅ Message storage tests passed
# ✅ Order management tests passed
# ✅ VIP customer tests passed
# ✅ Sentiment tracking tests passed
# ✅ Response suggestions tests passed
# ✅ Priority queue tests passed
# ✅ Conversation flow tests passed
# ✅ Context export tests passed
# ✅ ALL TESTS PASSED
Run the examples to see the system in action:
python examples_whatsapp.py
Includes:
README_WHATSAPP.mdexamples_whatsapp.pytest_whatsapp.pypython install_check_whatsapp.pypython test_whatsapp.pypython examples_whatsapp.pyMIT License - see LICENSE_WHATSAPP file
cerbug45
Transform your WhatsApp customer service from reactive to proactive! 🚀