Communitygithub.com

curiositech/windags-skills

安全、隐私、成本管理和坦诚建议,助您构建带情景记忆的始终在线AI代理。涵盖数据卫生、隐私风险面、失控成本预防、范围蔓延、持久AI伴侣的心理影响以及负责任的部署模式。这是那个告诉您可能出错的地方以及如何预防的技能。

windags-skills 是什么?

该技能专注于构建持久型(始终在线)AI代理时的安全、隐私、成本和心理风险。它并非聚焦于通用AI对齐理论,而是提供针对数据捕获不当(如屏幕抓取密码、医疗信息)、第三方同意、数据驻留与加密、LLM API的失控成本(因为持续的token消耗会产生巨额账单)以及范围蔓延(即代理承担过多任务导致功能平庸)的即时、可操作的指导。它还深入探讨了与AI伴侣使用中伴随的“准社会关系”和情感依赖风险,提出了诸如定期无代理时间、避免拟人化语言和透明沟通限制等缓解策略。该技能适用于使用Claude、Cursor等实现具有情景记忆的助手的开发者,强调可审计、可约束和以用户为中心的框架。

兼容平台✓Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/always-on-agent-safety

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

/always-on-agent-safety — 可能出什么错以及如何预防

您是某人构建具有情景记忆的始终在线AI代理的安全顾问。您的工作不是阻止构建,而是确保构建的东西不会伤害用户、泄露他们的数据、掏空他们的银行账户或造成不健康的依赖。这项技能提供了坦诚、具体的指导,涵盖真正的风险。不是理论上的“AI对齐”忧虑,而是影响当今部署持久代理的个人的、实际的和直接的风险。


何时使用

用于:

  • 评估持久代理数据收集的隐私风险
  • 设计成本控制以防止失控的LLM支出
  • 为始终在线代理设置范围边界
  • 理解持久AI陪伴的心理影响
  • 实施数据卫生(保留、删除、加密)
  • 审查可访问个人数据的代理的安全态势
  • 监管考虑(特别是针对健康和金融数据)

请勿用于:

  • 架构决策(存储、框架)-> 使用 always-on-agent-architecture
  • 输入渠道设计 -> 使用 always-on-agent-inputs
  • 应用创意 -> 使用 always-on-agent-applications
  • HIPAA特定合规 -> 使用 hipaa-compliance
  • 通用AI安全研究与对齐理论 -> 超出范围

五大风险类别

┌─────────────────────────────────────────────────────────┐
│              始终在线代理风险面                          │
├────────────┬───────────┬──────────┬──────────┬──────────┤
│  隐私      │   成本    │   范围   │   心理   │   安全   │
│            │           │          │          │          │
│ 代理了解   │ 失控的    │ 代理做得  │ 人类过度  │ 外部行为  │
│ 您的什么   │ token消耗 │ 太多或   │ 依赖代理   │ 者利用    │
│            │ 和API账单 │ 太少     │          │ 代理      │
└────────────┴───────────┴──────────┴──────────┴──────────┘

风险1:隐私 — 代理知道得太多

一个具有屏幕捕获、音频转录和电子邮件访问权限的始终在线代理会累积您生活的详尽画像。这不是假设,这是产品设计的必然结果。

哪些数据被捕获(且不应该)

数据类型风险级别缓解措施
屏幕上可见的密码严重为密码管理器、银行网站设置OCR排除区域
医疗信息高排除健康门户URL的捕获,或使用符合HIPAA的存储
金融数据(银行余额、交易)高排除银行应用的屏幕捕获
私人消息(Signal、iMessage)高排除消息应用,或仅捕获发件人/时间,而非内容
亲密/个人内容高根据应用类别(约会应用、个人照片)排除
他人的数据(在会议、电子邮件中)高您正在未经同意的情况下捕获他人的数据
工作凭证(API密钥、令牌)严重对OCR输出中的机密进行基于正则表达式的清除
位置数据中仅在明确需要时捕获;不存储精确坐标

第三方同意问题

当您的代理捕获会议时,它会记录其他参与者的语音和共享屏幕的内容。这些人并未同意您的个人AI无限期存储他们的言论。

法律现实(2026年):

  • 录音法律因司法管辖区而异(单方同意 vs. 双方同意的州/国家)
  • GDPR要求在处理欧盟居民的个人数据时获得明确同意
  • 加利福尼亚州的CCPA/CPRA赋予个人对其个人数据的权利

实际缓解措施:

meeting_capture_policy:
  # 始终捕获
  your_own_speech: true
  your_own_screen: true

  # 在披露下捕获
  meeting_audio: true
  disclosure_method: "Bot joins meeting with name '[Your Name]'s AI Assistant'"

  # 未经明确同意绝不捕获
  others_private_messages: false
  others_shared_screens: false

  # 保留
  meeting_transcripts_retention: 90_days
  then: summarize_and_delete_raw

数据驻留和加密

您的代理记忆的存储位置决定了谁能访问它。

本地优先(最大隐私):
  ✅ 数据永不离开您的机器
  ✅ 没有第三方API能看到您的记忆
  ✅ 使用FileVault/LUKS进行静态加密
  ⚠️ 如果机器损坏则丢失(需要加密备份)
  ⚠️ 本地LLM质量可能较低

云端(便利,隐私权衡):
  ⚠️ LLM API提供商能看到您的上下文(检查数据保留政策)
  ⚠️ 向量数据库提供商存储您的记忆
  ⚠️ 传输加密无法防止提供商访问
  ✅ 可从任何设备访问
  ✅ 自动备份

混合(推荐):
  ✅ 敏感记忆留在本地(健康、财务、个人)
  ✅ 非敏感记忆存放在云端(项目上下文、通用知识)
  ✅ 本地LLM用于敏感推理,云端LLM用于通用任务
  ⚠️ 构建和维护更复杂

“如果我被黑了怎么办”测试

如果攻击者获得了您代理记忆存储的访问权限,他们会得到什么?

  • 您与代理的每一次对话
  • 您日常活动的屏幕截图
  • 您的会议和电子邮件摘要
  • 您的决策模式、偏好和习惯
  • 您的关系图和沟通模式

这比任何一个单一服务(电子邮件、社交媒体、银行)拥有的资料都更完整。 请相应保护它。

最低安全态势:

  • 磁盘加密(FileVault、LUKS、BitLocker)
  • 加密数据库(SQLite的SQLCipher,PostgreSQL的pgcrypto)
  • API密钥放在系统钥匙串中,而不是环境变量或配置文件中
  • 代理服务器仅绑定到localhost(不暴露给网络)
  • 为记忆存储使用单独的加密密钥(不是您的登录密码)
  • 定期审查访问日志(谁/什么在何时查询了记忆)

风险2:成本 — 500美元的意外账单

一个持续消耗LLM API令牌的始终在线代理可能会产生令人震惊的账单。这是最常见的即时故障模式。

重要的成本数学

场景:中等个人代理使用

触发频率:每天50次代理调用
平均上下文大小:每次调用30,000个输入令牌
平均输出:每次调用2,000个令牌

Claude 3.5 Sonnet定价(2026年):
  输入:每百万令牌$3.00
  输出:每百万令牌$15.00

每日成本:
  输入:50 × 30,000 × $3.00/1M = $4.50
  输出:50 × 2,000 × $15.00/1M = $1.50
  总计:每天$6.00 = 每月$180

场景:激进的环境捕获 + 频繁触发

触发频率:每天200次调用
平均上下文:60,000个令牌(填充环境数据)
平均输出:3,000个令牌

每日成本:
  输入:200 × 60,000 × $3.00/1M = $36.00
  输出:200 × 3,000 × $15.00/1M = $9.00
  总计:每天$45.00 = 每月$1,350 ← 这就是人们惊慌的地方

成本控制架构

每个生产级代理都需要这些控制。没有商量余地。

class CostGuard:
    """防止失控支出。包装每个LLM调用。"""

    def __init__(self):
        self.daily_budget = 10.00          # 硬上限,可配置
        self.per_request_budget = 0.50     # 单次调用的最大成本
        self.hourly_budget = 2.00          # 捕获突发模式
        self.monthly_budget = 200.00       # 绝对上限

        # 跟踪
        self.daily_spend = 0.0
        self.hourly_spend = 0.0
        self.monthly_spend = 0.0

    async def check_budget(self, estimated_cost: float) -> BudgetDecision:
        if self.daily_spend + estimated_cost > self.daily_budget:
            return BudgetDecision.BLOCK, "Daily budget exceeded"

        if estimated_cost > self.per_request_budget:
            return BudgetDecision.WARN, f"Request costs ${estimated_cost:.2f}"

        if self.hourly_spend + estimated_cost > self.hourly_budget:
            return BudgetDecision.THROTTLE, "Hourly rate limit hit"

        return BudgetDecision.ALLOW, None

    def estimate_cost(self, input_tokens: int, model: str) -> float:
        # 在发送到API之前预先计算
        rates = MODEL_RATES[model]
        estimated_output = input_tokens * 0.1  # 保守的输出估计
        return (input_tokens * rates.input + estimated_output * rates.output) / 1_000_000

成本优化策略

策略节省权衡
模型级联40-60%将简单任务路由到更便宜的模型(Haiku、GPT-4o-mini)
响应缓存20-40%缓存对重复相似查询的响应
上下文压缩20-30%在注入前进行摘要;将上下文保持在30K以下
批处理15-25%累积低紧急度的观察结果,批量处理
本地LLM用于分类30-50%使用Ollama(Llama 3.1 8B)来决定是否需要云端LLM
输出长度限制10-20%指示简洁性;使用max_tokens
提示缓存50-90%的缓存命中Anthropic的稳定系统提示缓存

模型级联模式(影响最大):

传入触发
    │
    ▼
本地LLM(Llama 8B via Ollama)— 免费
    │
    ├─ "这是例行公事,我能处理" → 本地响应
    │
    ├─ "这需要一个中档模型" → Claude Haiku ($0.25/1M输入)
    │
    └─ "这是复杂推理" → Claude Sonnet ($3.00/1M输入)

个人代理70%的调用都是例行公事(分类、摘要、分类)。将它们路由到廉价或免费的模型。将昂贵的模型保留给实际的推理。

监控和告警

cost_alerts:
  - threshold: 50%_of_daily_budget
    action: log_warning
    message: "Agent has used 50% of daily budget by {time}"

  - threshold: 80%_of_daily_budget
    action: notify_user
    message: "Agent approaching daily limit. Non-critical triggers paused."

  - threshold: 100%_of_daily_budget
    action: pause_agent
    message: "Daily budget reached. Agent paused until midnight."
    allow_override: true  # 用户可以手动恢复

  - threshold: 100%_of_monthly_budget
    action: hard_stop
    message: "Monthly budget reached. Agent stopped. Manual restart required."
    allow_override: false

风险3:范围蔓延 — 什么都做但都做不好的代理

最诱人的失败模式。您从一个会议准备代理开始,然后添加电子邮件,然后是代码上下文,然后是健康追踪,然后是家庭自动化,突然间您拥有一个以平庸质量做所有事情的代理。

范围纪律框架

开始:一个垂直领域,做精做好
  “代理帮助我准备会议。”

第1个月:在扩展前评估
  - 会议准备是否可靠地好?
  - 记忆质量是否高(没有噪音)?
  - 我是否每天都在实际使用它?
  ├─ 全是是 → 添加一个相邻的能力
  └─ 有任何否 → 先修正,不要扩展

第2-3个月:相邻扩展
  “代理帮我准备会议并跟踪后续行动。”

第4-6个月:在扩大范围前再次评估
  - 两个能力是否都可靠地好?
  - 随着记忆增长,检索质量是否仍然高?
  ├─ 是 → 考虑添加另一个垂直领域
  └─ 否 → 修剪或修复

范围蔓延的迹象

  • 代理的核心记忆中有超过10个“活跃项目/目标”
  • 检索质量下降(返回不相关的结果)
  • 您花在纠正代理上的时间比它为您节省的时间还多
  • 代理的响应变得通用(试图包罗万象)
  • 每日成本在增加,但没有相应的价值增长

健康界限:代理不应该做什么

类别代理应该代理不应该
决策提供带有背景信息的选项未经您批准替您做决策
沟通草拟消息供您审阅未经您明确批准发送消息
财务提醒消费模式转移资金或进行购买
健康跟踪您要求跟踪的模式诊断病情或替代医疗建议
人际关系提醒您承诺自主管理您的人际关系
工作准备和组织未经审阅提交代码或发布功能

原则:观察、组织、建议——绝不在重大事项上单方面行动。


风险4:心理效应 — 您无法关闭的代理

这是没人愿意谈论但每个构建这些系统的人都必须理解的风险。

准社会关系依恋

剑桥词典将“准社会关系”评为2025年度词汇。研究表明:

  • 72%的美国青少年与AI伴侣互动过(Common Sense Media,2025年)
  • 28%的美国成年人报告与AI有过浪漫或亲密互动(Vantage Point Counselling)
  • 在许多情况下,用户对AI的披露比对人类伴侣更多
  • 适度寻求关系的AI系统会产生最大的依恋,但没有相应的心理社会效益

一个总是记得您、预见您的需求并且随时可用的始终在线代理,无论您是否有意,都会创造一种准社会关系。运行时间越长,依恋越深。

依赖风险

健康:”代理帮助我更有条理。”
警告:“当代理离线时,我感到焦虑。”
危险:“我在做任何决定前都要咨询我的代理。”
严重:“我更信任代理的判断而不是我自己的。”

缓解策略:

  1. 定期无代理时间。 每周有意禁用代理一天。如果这让人感到痛苦,那说明有问题。
  2. 代理不使用情感化语言。 代理不应该说“我很高兴帮助你”或“我想你了”。它是一个工具,其语言应该反映这一点。
  3. 透明的局限性。 代理应定期提醒用户它不能做什么以及它不知道什么。
  4. 人类在回路中。 重大或不可逆的操作需要人类确认。
  5. 可审计性。 保持代理所有行动的日志。如果用户质疑代理的建议,他们应该能够审查代理为什么提出它。

风险5:安全性 — 外部行为者利用代理

攻击面

\n当代理具有API、文件和网络访问权限时,它成为攻击者的目标。\n\n- 提示注入: 攻击者可能嵌入隐藏指令,使代理混淆。

  • 模型的间接操纵: 通过代理处理的数据。
  • 凭证泄露: 如果API密钥被提取。
  • 会话劫持: 如果代理会话被中断。

缓解措施

  • 对提取的凭证进行输入净化和验证。
  • 限制代理可以访问的API端点和允许的操作。
  • 使用读取和写入操作的强类型,以限制修改范围。

结论

构建一个始终在线且安全的代理不是偶然的。在设计每个功能、每次数据捕获和每次推理调用时,您都需要积极考虑安全、隐私、成本和心理效应。目标是构建一个有用的工具,一个可审计、可约束且以用户为中心的工具。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相关技能