AI 代理的分层陌生人访问控制。在设置联系人权限、处理未知发件人、管理批准的联系人或配置服务时使用...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install agent-access-control或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install agent-access-control⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/agent-access-control/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: agent-access-control description: Tiered stranger access control for AI agents. Use when setting up contact permissions, handling unknown senders, managing approved contacts, or configuring stranger deflection on messaging platforms (WhatsApp, Telegram, Discord, Signal). Provides diplomatic deflection, owner approval flow, and multi-tier access (owner/trusted/chat-only/blocked). ---
Protect your agent from unauthorized access with tiered permissions and an owner-approval pairing flow.
Create memory/access-control.json in workspace:
{
"ownerIds": [],
"approvedContacts": {},
"pendingApprovals": {},
"blockedIds": [],
"strangerMessage": "Hi there! 👋 I'm {{AGENT_NAME}}, an AI assistant. I'm currently set up to help my owner with personal tasks, so I'm not able to chat freely just yet. I've let them know you reached out — if they'd like to connect us, they'll set that up. Have a great day! 😊",
"notifyChannel": "",
"notifyTarget": ""
}
Fill in:
ownerIds: Owner phone numbers, Telegram IDs, Discord IDs (strings)strangerMessage: Customize {{AGENT_NAME}} with agent's namenotifyChannel: Channel to alert owner (telegram, whatsapp, discord, signal)notifyTarget: Owner's ID on that channel| Tier | Level | Capabilities | |------|-------|-------------| | 0 | Stranger | Diplomatic deflection only, zero access | | 1 | Chat-only | Basic conversation, no tools or private info | | 2 | Trusted | Chat + public info (weather, time, general questions) | | 3 | Owner | Full access to all tools, files, memory, actions |
On every incoming message from a messaging platform:
ownerIds → if match: full access, respond normallyblockedIds → if match: silent ignore, respond with NO_REPLYapprovedContacts[senderId] → if match: respond within their tiera. Send strangerMessage to the sender
b. Notify owner:
"🔔 Stranger contact from {senderId} on {platform}:
'{first 100 chars of message}'
Reply: approve (trusted) / chat (chat-only) / block"
c. Store in pendingApprovals:
{
"senderId": {
"platform": "whatsapp",
"firstMessage": "...",
"timestamp": "ISO-8601",
"notified": true
}
}
d. Respond with NO_REPLY after sending deflection
When owner replies to an approval notification:
| Owner says | Action | |-----------|--------| | approve, yes, trusted | Add to approvedContacts with tier 2 (trusted) | | chat, chat-only, chat only | Add to approvedContacts with tier 1 (chat-only) | | block, no, deny | Add to blockedIds | | ignore | Remove from pendingApprovals, no action |
After approval, update memory/access-control.json and notify the contact:
When responding to a non-owner contact, enforce tier restrictions:
Tier 1 (chat-only):
Tier 2 (trusted):
Normalize IDs for comparison:
+. E.g., +1 555 123 4567 → +15551234567An owner may have multiple IDs across platforms. All should be in ownerIds.
Apply per-tier rate limits to prevent abuse:
| Tier | Messages/hour | Messages/day | |------|--------------|-------------| | Stranger | 1 (deflection only) | 3 | | Chat-only | 20 | 100 | | Trusted | 50 | 500 | | Owner | Unlimited | Unlimited |
If limit exceeded, respond: "I've reached my chat limit for now. Try again later! 😊"
Track in memory/access-control.json under rateLimits:
"rateLimits": {
"+61412345678": { "hourCount": 5, "dayCount": 23, "hourReset": "ISO", "dayReset": "ISO" }
}
Log all stranger contacts to memory/access-control-log.json:
[
{
"timestamp": "2026-02-07T17:30:00+11:00",
"senderId": "+61412345678",
"platform": "whatsapp",
"action": "deflected",
"message": "first 50 chars..."
}
]
Keep last 100 entries. Rotate older entries out.
memory/ (gitignored by default in most setups)See references/example-config.md for a complete annotated example.
安装 代理访问控制 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/agent-access-control/ 目录(个人级,所有项目可用),或 .claude/skills/agent-access-control/(项目级)。重启 AI 客户端后,用 /agent-access-control 主动调用,或让 AI 根据上下文自动发现并使用。
代理访问控制 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
代理访问控制 可免费安装使用。请查阅仓库了解许可证信息。
AI 代理的分层陌生人访问控制。在设置联系人权限、处理未知发件人、管理批准的联系人或配置服务时使用...
代理访问控制 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。