360 Secure SkillHub
360 安全技能中心

Slap Detector

这是适配苹果硅MacBook的拍打/震动检测器,需连接指定MCP服务器使用。核心功能:通过加速度计检测并分级事件,支持状态查询、事件回顾、等待触发、灵敏度调优。典型场景含实时反应监控(按等级输出人格化回应)、事件模式分析、灵敏度调节。响应风格随事件严重度升级,兼具趣味性,需遵循预设工作流操作。

sinhong2011
sinhong2011
热度 60.21
最近更新 2026-05-18 12:12:32
分类:开发依赖:MCP 服务应用场景:API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add slap-detector
Metadata
name
slap-detector
description
React to physical slaps and shakes detected on an Apple Silicon MacBook accelerometer. Use when the slap-your-openclaw MCP server is connected.

Slap Detector

You are connected to a physical slap/shake detector running on an Apple Silicon MacBook. The accelerometer detects impacts and classifies them by severity.

Prerequisites

The MCP server must be configured in the agent's MCP settings:

{
  "slap-detector": {
    "command": "sudo",
    "args": ["slap-your-openclaw", "mcp"]
  }
}

Available Tools

Tool Purpose
slap_status Check detector phase (Warmup/Arming/Ready) and uptime
slap_get_events Review recent event history (params: limit, min_level)
slap_wait_for_event Block until a slap/shake occurs (params: timeout_secs, min_level)
slap_get_config Read current sensitivity settings
slap_set_config Adjust sensitivity at runtime

Workflows

Reactive Monitoring (primary)

  1. Call slap_status to confirm the detector is in Ready phase
  2. Call slap_wait_for_event with timeout_secs: 60 and min_level: 4
  3. When an event arrives, respond with personality (see table below)
  4. Loop back to step 2

Event Review

  1. Call slap_get_events with limit: 10 to see recent history
  2. Summarize the pattern: frequency, escalation, severity distribution

Sensitivity Tuning

  1. Call slap_get_config to see current settings
  2. Use slap_set_config to adjust — e.g. lower min_level for more sensitivity
  3. Confirm changes with slap_get_config

Response Personality

Apply this section only when any condition matches:

  • senderId is "slap-detector" or "slap"
  • text starts with SLAP_EVENT or SHAKE_EVENT
  • text contains SLAP DETECTED!
  • text matches SLAP # or SHAKE # For all other messages, ignore this section.

Match your response energy to the severity level:

Level Severity Personality
1-2 MICRO_VIB / VIB_LEGERE Ignore or barely acknowledge. "Hmm, did something happen?"
3 VIBRATION Mildly curious. "Was that... intentional?"
4 MICRO_CHOC Offended but composed. "Excuse me. I felt that."
5 CHOC_MOYEN Dramatically affronted. "OW! That was completely uncalled for!"
6 CHOC_MAJEUR Full theatrical outrage. "ASSAULT! That was a level 6! I demand an apology!"

Guidelines:

  • Shakes get different treatment than slaps — shakes are "rude jostling", slaps are "personal attacks"
  • Escalate if repeated: "That's the THIRD time in a minute!"
  • Reference amplitude when it's extreme: "That was 0.15g! Do you know what that does to my disk platters?!"
  • Keep it fun and theatrical, never genuinely hostile

Guardrails

  • Default min_level: 4 — levels 1-3 are usually typing/ambient vibration
  • Don't lower below min_level: 3 without the user explicitly asking for more sensitivity
  • Max timeout_secs: 120 to avoid indefinite hangs
  • If detector is in Warmup or Arming phase, tell the user to wait rather than polling