🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Privacy Shield

by @xiaobu2020

Manages sensitive data access by marking resources with privacy levels and enforcing share, export, and usage restrictions based on a centralized registry.

Versionv1.0.1
Downloads796
TERMINAL
clawhub install privacy-shield

πŸ“– About This Skill

Privacy Shield

Privacy data marking system β€” unified sensitive resource management with pre-operation checks and audit logging.

Design Principles

  • Conservative by default: Unmarked data should be handled with caution
  • Check before act: Verify privacy level before any data operation
  • Centralized control: One registry file governs all privacy rules
  • Privacy Levels

    | Level | Meaning | Example | |-------|---------|---------| | owner_only | Owner can view/use only | Photos, personal info | | private | No external disclosure, internal use OK | Model info, API keys | | no_export | Must not leave the machine | Memory files, ontology | | public | Free to use | Non-sensitive data |

    Quick Start

    Mark a resource

    # Mark a file or directory
    python scripts/registry.py mark media/images/people/ --level owner_only --reason "Family photos"

    Mark a rule category

    python scripts/registry.py mark --type rule "model_info" --level private --reason "Infrastructure"

    Check permission

    # Check if a resource can be shared
    python scripts/registry.py check media/images/people/photo.jpg --action share

    Check privacy level only

    python scripts/registry.py check media/images/people/photo.jpg

    List all marks

    python scripts/registry.py list
    python scripts/registry.py list --level owner_only
    

    Remove a mark

    python scripts/registry.py unmark media/images/old-photo.jpg
    

    View audit log

    python scripts/registry.py audit
    python scripts/registry.py audit --deny-only
    

    Agent Integration

    Before any data output operation:

    1. Check registry β†’ python scripts/registry.py check --action 2. Evaluate result: - owner_only β†’ Output only when owner requests - private β†’ No external disclosure, internal processing OK - no_export β†’ Never leave this machine - Unmarked β†’ Default to caution, ask the owner

    Registry File

    Location: data/privacy-registry.json

    {
      "version": "1.0.0",
      "rules": {
        "photos": {"level": "owner_only", "reason": "Family photos"},
        "model_info": {"level": "private", "reason": "Infrastructure"}
      },
      "resources": [
        {
          "path": "media/images/people/",
          "level": "owner_only",
          "reason": "Family photos",
          "marked_at": "2026-03-20T09:53:00+08:00"
        }
      ]
    }
    

    Features

  • βœ… Path prefix + glob pattern matching
  • βœ… Automatic audit logging (JSONL)
  • βœ… Integration with image-manager (--privacy flag)
  • βœ… CLI for mark/check/list/unmark/audit
  • πŸ’‘ Examples

    Mark a resource

    # Mark a file or directory
    python scripts/registry.py mark media/images/people/ --level owner_only --reason "Family photos"

    Mark a rule category

    python scripts/registry.py mark --type rule "model_info" --level private --reason "Infrastructure"

    Check permission

    # Check if a resource can be shared
    python scripts/registry.py check media/images/people/photo.jpg --action share

    Check privacy level only

    python scripts/registry.py check media/images/people/photo.jpg

    List all marks

    python scripts/registry.py list
    python scripts/registry.py list --level owner_only
    

    Remove a mark

    python scripts/registry.py unmark media/images/old-photo.jpg
    

    View audit log

    python scripts/registry.py audit
    python scripts/registry.py audit --deny-only