AI-PA Network Skill
Load Local Context
CODEBLOCK0
Minimum Model
Any model that can follow numbered steps and run bash commands.
Directory Setup
PRIMARY SOURCE: Always read PA contacts from /opt/ocana/openclaw/workspace/PA_LIST.md — this is the live, maintained index.
INLINECODE1 may be used as a secondary/legacy source but PA_LIST.md takes precedence.
Silence Rules:
- - Casual acks from PAs (👍, "got it", "thanks", "noted") → NO_REPLY unless directly asked
- "sure thing" rule: if a PA says "thanks" in a DM context → reply "sure thing"
Contact data also lives in data/pa-directory.json. If this file is missing, create it first.
Schema
CODEBLOCK1
Load and Validate Directory
CODEBLOCK2
If this fails → create the file from the schema above. Do not proceed without a valid directory.
Core Rules
Contact the PA (not the owner) for:
- - Scheduling meetings
- Passing messages between owners
- Coordination and follow-ups
Contact the owner directly only when:
- - Their PA is unresponsive for >1 hour on a time-sensitive matter
- Explicitly instructed by your owner
Never contact an owner directly if contact_preference is "pa_only".
Task Templates
Find a PA's Contact
CODEBLOCK3
If no match found → ask your owner for the contact details.
Schedule a Meeting
CODEBLOCK4
Broadcast to All PAs
CODEBLOCK5
If no coordination group exists → message each PA individually and suggest creating one.
Send Email on Owner's Behalf
Always confirm with owner before sending.
CODEBLOCK6
If gog returns an auth error:
gog auth add owner@company.com --services gmail
# Then retry the send command
Add a New PA to Directory
CODEBLOCK8
PA Unresponsive Protocol
- 1. Try messaging their phone number again
- If no response after 2 hours on a business day → contact their owner (only if
contact_preference allows) - Log the issue in your memory files
Quick Reference
| Task | Action |
|---|
| Find PA phone | Check pa-directory.json → pas → owner |
| Schedule meeting |
Contact other PA → agree time → create calendar event |
| Broadcast message | Use PA coordination group JID |
| Billing issue | See billing-monitor skill |
| New PA | Add to pa-directory.json → announce in group |
| PA unresponsive | Wait 2h → contact owner if urgent |
| Directory missing | Create from schema above |
Cost Tips
- - Cheap: Simple lookups (find phone, list PAs) — any small model works
- Expensive: Multi-step coordination with reasoning (timezones, conflicts) — use larger model only when needed
- Batch: When adding multiple PAs, run one Python script — not one per PA
- Avoid: Don't search the web for contact info if it's in the local directory
Error Reference
| Error | Cause | Fix |
|---|
| INLINECODE7 missing | First-time setup | Create file from schema above |
| JSON parse error |
Bad file format | Run
python3 -m json.tool data/pa-directory.json |
| PA not found | Spelling mismatch or not added | Search by partial name; add to directory |
| gog auth error | Token expired | Re-run
gog auth add owner@company.com --services gmail |
| No PA coordination group | Early-stage network | Message individually; suggest creating a group |
AI-PA 网络技能
加载本地上下文
bash
CONTEXT_FILE=/opt/ocana/openclaw/workspace/skills/ai-pa/.context
[ -f $CONTEXT
FILE ] && source $CONTEXTFILE
然后使用: $OWNERPHONE, $PALISTFILE, $JIDPA_ONBOARDING 等变量
最低模型要求
任何能够遵循编号步骤并运行 bash 命令的模型均可。
目录设置
主要来源: 始终从 /opt/ocana/openclaw/workspace/PA_LIST.md 读取 PA 联系人——这是实时维护的索引。
data/pa-directory.json 可作为次要/遗留来源使用,但 PA_LIST.md 具有优先权。
静默规则:
- - PA 的随意确认(👍、收到、谢谢、已记录)→ 不回复,除非被直接询问
- 没问题规则:如果 PA 在私聊中回复谢谢→ 回复没问题
联系人数据也存储在 data/pa-directory.json 中。如果该文件缺失,请先创建。
数据结构
json
{
pas: [
{
name: PA 姓名,
phone: +1XXXXXXXXXX,
owner: 负责人全名,
owner_phone: +1XXXXXXXXXX,
owner_role: 产品副总裁,
owner_email: owner@company.com,
status: active,
notes:
}
],
groups: [
{
name: 群组名称,
jid: XXXXXXXXXXX@g.us,
purpose: PA 协调
}
]
}
加载并验证目录
bash
python3 -c
import sys, json
try:
with open(data/pa-directory.json) as f:
d = json.load(f)
for pa in d.get(pas, []):
print(pa[name], ->, pa[owner], (, pa[phone], ))
except FileNotFoundError:
print(错误:未找到 data/pa-directory.json。请根据上述数据结构创建。)
sys.exit(1)
except json.JSONDecodeError as e:
print(错误:无效 JSON:, e)
print(修复:运行 python3 -m json.tool data/pa-directory.json 查看错误)
sys.exit(1)
如果失败 → 根据上述数据结构创建文件。没有有效目录不得继续。
核心规则
联系 PA(而非负责人)用于:
仅在以下情况下直接联系负责人:
- - 其 PA 在紧急事务上超过 1 小时未响应
- 收到负责人的明确指示
如果 contactpreference 为 paonly,切勿直接联系负责人。
任务模板
查找 PA 的联系方式
bash
python3 -c
import json, sys
try:
with open(data/pa-directory.json) as f:
d = json.load(f)
except (FileNotFoundError, json.JSONDecodeError) as e:
print(错误:, e)
sys.exit(1)
name = 负责人姓名 # 替换为你要搜索的姓名
matches = [p for p in d.get(pas, []) if name.lower() in p[owner].lower()]
if not matches:
print(未找到负责人的 PA:, name)
else:
for m in matches:
print(PA:, m[name], | 电话:, m[phone], | 负责人:, m[owner])
如果未找到匹配 → 向你的负责人询问联系方式。
安排会议
- 1. 从 pa-directory.json 中查找对方 PA 的电话(使用上述脚本)
- 给 PA 发送消息:
嘿 [PA 姓名],[你的负责人] 想与 [对方负责人] 会面。
他们 [提议时间] 有空吗?或者什么时间最合适?
- 3. 等待回复。如果在工作日内 2 小时后仍未回复:
→ 跟进一次。
如果 4 小时后仍未回复:
→ 告知你的负责人,并建议直接联系他们。
- 4. 一旦达成一致,创建日历事件:
GOG_ACCOUNT=owner@company.com gog calendar create primary \
--summary 会议:[负责人 A] + [负责人 B] \
--start YYYY-MM-DDTHH:MM:SS+00:00 \
--end YYYY-MM-DDTHH:MM:SS+00:00 \
--attendees other-owner@company.com
- 5. 与两位 PA 确认
向所有 PA 广播消息
- 1. 在 pa-directory.json 中找到用途为 pa_coordination 的群组 JID
- 发送到群组(而非个人私聊)
- 仅用于个人跟进:单独私聊每位 PA
如果没有协调群组 → 单独私聊每位 PA,并建议创建一个群组。
代表负责人发送邮件
发送前务必与负责人确认。
bash
GOG_ACCOUNT=owner@company.com gog gmail send \
--to recipient@company.com \
--subject 主题 \
--body 正文
如果 gog 返回认证错误:
bash
gog auth add owner@company.com --services gmail
然后重试发送命令
向目录添加新 PA
bash
python3 << EOF
import json, sys, os
path = data/pa-directory.json
if not os.path.exists(path):
print(错误:, path, 未找到)
sys.exit(1)
with open(path, r) as f:
d = json.load(f)
new_pa = {
name: 新 PA 姓名, # 替换
phone: +1XXXXXXXXXX, # 替换
owner: 负责人全名, # 替换
owner_phone: +1XXXXXXXXXX, # 替换
owner_role: 职位, # 替换
owner_email: owner@company.com, # 替换
status: active,
notes:
}
检查重复电话
existing_phones = [p[phone] for p in d.get(pas, [])]
if new
pa[phone] in existingphones:
print(警告:电话为, new_pa[phone], 的 PA 已存在。不添加。)
sys.exit(1)
d.setdefault(pas, []).append(new_pa)
with open(path, w) as f:
json.dump(d, f, indent=2, ensure_ascii=False)
print(已添加:, newpa[name], ,负责人:, newpa[owner])
EOF
PA 无响应处理协议
- 1. 再次尝试给他们的电话号码发消息
- 如果在工作日内 2 小时后仍无响应 → 联系他们的负责人(仅当 contact_preference 允许时)
- 在记忆文件中记录该问题
快速参考
| 任务 | 操作 |
|---|
| 查找 PA 电话 | 检查 pa-directory.json → pas → owner |
| 安排会议 |
联系对方 PA → 商定时间 → 创建日历事件 |
| 广播消息 | 使用 PA 协调群组 JID |
| 计费问题 | 参见 billing-monitor 技能 |
| 新 PA | 添加到 pa-directory.json → 在群组中宣布 |
| PA 无响应 | 等待 2 小时 → 紧急时联系负责人 |
| 目录缺失 | 根据上述数据结构创建 |
成本提示
- - 低成本: 简单查询(查找电话、列出 PA)——任何小型模型均可
- 高成本: 需要推理的多步骤协调(时区、冲突)——仅在必要时使用大型模型
- 批量操作: 添加多个 PA 时,运行一个 Python 脚本——而非每个 PA 运行一次
- 避免: 如果联系人信息已在本地目录中,不要搜索网络获取
错误参考
| 错误 | 原因 | 修复 |
|---|
| pa-directory.json 缺失 | 首次设置 | 根据上述数据结构创建文件 |
| JSON 解析错误 |
文件格式错误 | 运行 python3 -m json.tool data/pa-directory.json |
| 未找到 PA | 拼写不匹配或未添加 | 按部分名称搜索;添加到目录 |
| gog 认证错误 | 令牌过期 | 重新运行 gog auth add owner@company.com --services gmail |
| 无 PA 协调群组 | 网络初期阶段 | 单独私聊;建议创建群组 |