twinmind-security-basics
Implement security best practices for TwinMind integrations. Use when securing API keys, configuring privacy settings, or implementing data protection for meeting recordings. Trigger with phrases like "twinmind security", "secure twinmind", "twinmind privacy", "protect twinmind data", "twinmind api key security".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- twinmind-security-basics
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Implement security best practices for TwinMind integrations. Use when securing API keys, configuring privacy settings, or implementing data protection for meeting recordings. Trigger with phrases like "twinmind security", "secure twinmind", "twinmind privacy", "protect twinmind data", "twinmind api key security".
- allowed-tools
- Read, Write, Edit
- compatible-with
- claude-code, codex, openclaw
02 资源文件 1
- 参考文档references/implementation.md5.6 KB
03 SKILL.md 正文
TwinMind Security Basics
Contents
Overview
Essential security practices for TwinMind integrations covering API key management, webhook verification, data encryption, access control, privacy configuration, and audit logging.
Prerequisites
- TwinMind account configured
- Understanding of environment variables
- Basic security and cryptography concepts
Instructions
Step 1: Secure API Key Management
Store keys in environment variables or a secrets manager (GCP Secret Manager, AWS Secrets Manager). Never hardcode credentials. Use .env files (gitignored) with .env.example templates committed to the repo.
Step 2: Validate Webhook Signatures
Verify x-twinmind-signature headers using HMAC-SHA256 with crypto.timingSafeEqual to prevent timing attacks. Reject requests with missing or invalid signatures.
Step 3: Encrypt Sensitive Data at Rest
Use AES-256-GCM encryption for storing transcripts. Store IV and auth tag alongside ciphertext. Key management via environment variables or KMS.
Step 4: Implement Access Control
Define Permission enums (transcripts:read, transcripts:write, settings:manage, admin:*) and Express middleware (requirePermission) to enforce RBAC on all routes.
Step 5: Configure Privacy Settings
Create a PrivacyConfig interface controlling audio storage (default: never stored), transcript retention days, encryption, local processing, PII redaction patterns (SSN, credit card, email).
Step 6: Enable Audit Logging
Build an AuditLogger class that records userId, action, resource, timestamp, IP address, and user agent for all sensitive operations. Persist to a logging service.
See detailed implementation for complete security code including encryption, webhook verification, RBAC middleware, and audit logging.
Output
- Secure API key storage
- Webhook signature verification
- Data encryption at rest
- Access control implementation
- Privacy configuration
- Audit logging
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| API key exposed | Hardcoded secret | Rotate key immediately, audit logs |
| Webhook unverified | Missing middleware | Always verify signatures |
| PII leaked | Missing redaction | Enable PII patterns, encrypt data |
| Unauthorized access | No RBAC | Implement permission middleware |
Examples
Basic usage: Apply twinmind security basics to a standard project setup with default configuration options.
Advanced scenario: Customize twinmind security basics for production environments with multiple constraints and team-specific requirements.
Resources
Next Steps
For production deployment, see twinmind-prod-checklist.
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.