Skip to content
Back to skills

Safety Interaction

ASecurity

Prevent destructive or accidental actions by the AI. This skill enforces a "Human-in-the-loop" pattern for any state-changing operations (mutations) like bulk QR code deletion or organization setting updates.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
ai-agentsfrontend

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill safety_interaction --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Safety Interaction?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Safety Interaction
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-safety-interaction/badge)](https://www.skillsdirectory.com/skills/idorgham-safety-interaction)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: Skill
subagents: [core-validator, integrity-bot]
agents: [master-guide, swarm-router]
dependencies: [core-orchestration, global-sync]
version: 1.0.0
---



# AI Safety & Interaction

## Purpose
Prevent destructive or accidental actions by the AI. This skill enforces a "Human-in-the-loop" pattern for any state-changing operations (mutations) like bulk QR code deletion or organization setting updates.

## Core Principles
1. **Mutation Protection**: No `execute` call for a mutation tool should happen without a prior `confirmation` UI state.
2. **Auditability**: Every AI action must be logged in `EventLog` with the `Actor: AI` and the prompt that triggered it.
3. **Multi-tenancy Safety**: Tool calls MUST be scoped to the user's `organizationId` at the code level, regardless of AI instructions.

## Implementation Rules
- **Confirmation Flow**: AI proposes an action -> Frontend renders a "Confirmation Card" -> User clicks "Approve" -> Tool execution finishes.
- **Rollback Preparedness**: For bulk operations, implement "dry-run" modes to show the user what *would* happen first.
- **Graceful Denials**: If an AI request violates RBAC (Skill 16), the tool must return an "Unauthorized" error, not a hallucination.

## Anti-Patterns
- Implicitly deleting data because the AI said "Cleanup old QRs".
- Allowing the AI to change its own permission level.
- Bypassing server-side validation because "the AI prompt was secure".

## Code Example
```tsx
// Frontend Confirmation Pattern
const SafetyConfirmation = ({ action, onConfirm, onCancel }: any) => {
  return (
    <div className="p-space-200 border border-ds-border-warning bg-ds-surface-warning rounded-md">
      <h4 className="font-bold flex items-center gap-2">
        <AlertTriangle size={16} /> Confirm Bulk Action
      </h4>
      <p className="text-ds-text-subtle">Are you sure you want to {action.summary}?</p>
      <div className="flex gap-space-100 mt-space-200">
        <Button variant="danger" onClick={onConfirm}>Approve Action</Button>
        <Button variant="subtle" onClick={onCancel}>Cancel</Button>
      </div>
    </div>
  );
};
```

Files in this skill

  • SKILL.md2.1 KB
  • SKILL.md.meta.json825 B
  • core.py363 B
  • manifest.yaml184 B
  • tests/test_core.py305 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.