跳到正文
TakoAPI
返回技能列表

totp

由 diegofcornejo 提供

CLI Utilities
272下载量由 clawskills.sh 提供
1浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

TOTP-based OTP verification for sensitive operations (env vars, gateway restarts, backup deletions, critical config.

描述

该技能的功能

Adds TOTP-based two-factor verification before an agent executes sensitive operations. Uses otplib with a 2-window tolerance (±1 minute) to handle clock drift. Requires a one-time setup with any TOTP authenticator app.

Enforces a hardware-independent second factor at the agent level without modifying the underlying service or infrastructure.

何时使用

  • Gating access to .env file contents
  • Requiring OTP before restarting a gateway service
  • Confirming identity before deleting backups
  • Protecting critical config file reads
  • Blocking external API key operations without verification

示例工作流

输入

User asks: delete the staging backup

智能体
  1. 1

    Agent prompts user for a 6-digit OTP from their authenticator app

  2. 2

    User provides the code

  3. 3

    Agent runs: TOTP_SECRET=$TOTP_SECRET node scripts/verify.js 123456

  4. 4

    Script exits 0 if valid, 1 if invalid or expired

  5. 5

    Agent proceeds with deletion on exit 0, denies on exit 1

输出

Backup deleted after successful OTP verification, or access denied with no action taken

前置要求

  • TOTP_SECRET environment variable (Base32 secret generated during setup)
  • Google Authenticator, Authy, or any TOTP-compatible authenticator app

安装

clawhub install diegofcornejo/totp

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接