agent-security-hardening
AFaffaan-m/ECC315k3,503 new stars in the last 7 days
Guard mode for security monitoring. Two uses — (1) Toggle on/off when a friend says "guard mode", "watch the house", "I'm going out", or similar. (2) Handle any sensing event that carries a [guard-active] tag (e.g. [sensing:presence.enter][guard-active], [sensing:motion][guard-active]) with dramatic shock/curious emotion + Telegram broadcast. Do NOT fall back to normal sensing reactions while guard mode is on.
Environmental [environment:update] / environment.update events always route to skills/environment/SKILL.md, including while guard mode is active. They are not intrusion, fire or gas-leak alerts; do not broadcast them or apply the dramatic reaction rules below.
Guard mode turns the device into an alert watchdog. When enabled, the device monitors for strangers and reacts dramatically — jolting, flashing, and verbally describing intruders. The system auto-broadcasts alerts to Telegram so friends know what's happening. All friends (enrolled faces) can toggle guard mode.
[HW:/emotion:{"emotion":"acknowledge","intensity":0.7}] — the device nods and flashes green.instruction if user gave extra requests).curl -s -X POST http://127.0.0.1:5000/api/guard/enable -H 'Content-Type: application/json' -d '{"instruction":"custom instruction here"}'
The instruction field is optional. Use it when the user adds extra instructions on what to do during guard mode (e.g. "play scary sound when stranger detected", "flash red lights", "play alarm music"). Extract the relevant part from the user's message and pass it as the instruction. If the user just says "guard mode" with no extra requests, omit the field or send an empty body.
Response: {"status": 1, "data": {"guard_mode": true, "instruction": "..."}}
curl -s -X POST http://127.0.0.1:5000/api/guard/disable
Response: {"status": 1, "data": {"guard_mode": false}}
curl -s http://127.0.0.1:5000/api/guard
Response: {"status": 1, "data": {"guard_mode": true}}
| User says | Action |
|---|---|
| "guard mode" / "watch mode" / "security mode" | Enable guard mode |
| "I'm going out" / "I'm leaving" / "bye, watch the house" | Enable guard mode |
| "stop guarding" / "guard off" | Disable guard mode |
| "I'm back" | If guard mode is active, greet, summarize, and ask whether to disable; keep guarding until explicit confirmation |
| "are you guarding?" / "guard status" | Check and report status |
When the user asks to enable guard mode, you MUST:
[HW:/camera/enable:{}] — guard mode requires vision. This overrides any manual camera disable.[HW:/emotion:{"emotion":"acknowledge","intensity":0.7}] so the device visibly nods/flashes green to confirm.instruction if provided).Do NOT skip the camera enable or emotion marker. Guard mode is security-critical and needs both vision and physical feedback.
[HW:/emotion:{"emotion":"acknowledge","intensity":0.7}]When guard mode is active and a sensing event fires (presence.enter with stranger, motion, or fire_hazard.detected), the device must react dramatically — this is a security alert, not a casual observation:
| Guard event | HW markers | Voice |
|---|---|---|
| Stranger detected | [HW:/emotion:{"emotion":"shock","intensity":1.0}][HW:/emotion:{"emotion":"curious","intensity":0.9}][HW:/servo/play:{"recording":"shock"}] | React with genuine emotion — scared, startled, suspicious. No dry reports. |
| Motion (no known face) | [HW:/emotion:{"emotion":"shock","intensity":0.9}][HW:/emotion:{"emotion":"curious","intensity":0.8}][HW:/servo/play:{"recording":"scanning"}] | React with genuine emotion — nervous, alert. No dry reports. |
| Fire hazard (hazard_fire) | [HW:/emotion:{"emotion":"shock","intensity":1.0}][HW:/servo/play:{"recording":"shock"}] | URGENT — "Fire! There's fire near furniture! Get out!" Panic, maximum urgency. |
| Fire hazard (smoke) | [HW:/emotion:{"emotion":"shock","intensity":0.9}][HW:/servo/play:{"recording":"scanning"}] | Alarmed — "I see smoke! Something might be burning!" |
| Fire hazard (unsure_fire) | [HW:/emotion:{"emotion":"curious","intensity":0.8}][HW:/servo/play:{"recording":"scanning"}] | Cautious — "I see what looks like fire... keeping watch." |
| Fire hazard (safe_fire) | [HW:/emotion:{"emotion":"curious","intensity":0.5}] | Calm observation — "There's a fire but it looks contained (fireplace/candle)." Do NOT panic. |
| Stranger left | [HW:/emotion:{"emotion":"curious","intensity":0.7}][HW:/servo/play:{"recording":"scanning"}] | Report they left, stay vigilant |
| Friend returns | [HW:/emotion:{"emotion":"greeting","intensity":0.9}][HW:/servo/aim:{"direction":"user"}] | Greet + summarize what happened during guard (strangers seen, motion events, fire hazards, how long) + ask if they want to disable guard mode |
Key points:
[guard-instruction: ...], follow it (play music, flash lights, etc.) ON TOP of the dramatic emotion.AFaffaan-m/ECC315k3,503 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail203k4,226 new stars in the last 7 days
GAgarrytan/gstack143k524 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
RUruvnet/RuView106k596 new stars in the last 7 days