安全扫描
OpenClaw
安全
high confidenceInstruction-only DynamoDB design guide that is internally consistent with its stated purpose and does not request unrelated credentials or perform unexpected actions.
评估建议
This skill is an instruction-only DynamoDB design guide and appears coherent with its purpose. It does not request credentials or perform installs. If you plan to have the agent run live examples or AWS CLI commands using this guidance, ensure your AWS credentials are provided only when you trust the agent and that least-privilege IAM credentials are used. If you do not want the agent to run any AWS commands, confirm the agent is not given access to the aws CLI or credentials when invoking this ...详细分析 ▾
✓ 用途与能力
Name and description match the content of SKILL.md: guidance on table design, indexes, capacity, pagination, transactions, TTL, and best practices. The declared dependency on the 'aws' CLI is plausible (examples or live checks might use it) and no unrelated resources or credentials are requested.
✓ 指令范围
SKILL.md is a static design and best-practice document; it does not instruct the agent to read system files, access environment variables, or transmit data to external endpoints. There are no open-ended directives that would give the agent broad discretionary access.
✓ 安装机制
No install spec and no code files — lowest-risk, instruction-only skill. Nothing will be downloaded or written to disk by the skill itself.
✓ 凭证需求
The skill does not request environment variables or credentials. Asking for the 'aws' binary is proportionate for DynamoDB-related tasks; no extraneous secrets or unrelated service credentials are requested.
✓ 持久化与权限
always is false and model invocation is allowed (default). The skill does not request persistent presence or modify other skills or system settings.
安全有层次,运行前请审查代码。
运行时依赖
🖥️ OSLinux · macOS · Windows
版本
latestv1.0.02026/2/10
Initial release
● 无害
安装命令 点击复制
官方npx clawhub@latest install dynamodb
镜像加速npx clawhub@latest install dynamodb --registry https://cn.clawhub-mirror.com
技能文档
键 Design
- Partition 键 determines data distribution—high-cardinality keys spread 加载 evenly
- Hot partition = one 键 gets 所有 traffic—使用 composite keys 或 添加 random suffix
- 排序 键 enables range queries 在...内 partition—design 对于 access patterns
- 可以't 更改 keys 之后 creation—模型 所有 access patterns 之前 creating 表
查询 vs Scan
- 查询 uses partition 键 + 可选 排序 键—O(items 在...中 partition), always prefer
- Scan reads entire 表—expensive, slow, avoids indexes; almost never 正确
- "I 需要 到 过滤 由 X" usually means missing GSI—添加 索引, don't scan
- FilterExpression applies 之后 读取—仍然 consumes 满 读取 capacity
Global Secondary Indexes
- GSI = 不同 partition/排序 键—enables alternate access patterns
- GSI eventually consistent—writes propagate 带有 slight 延迟
- GSI consumes separate capacity—provision 或 pay 对于 每个 GSI independently
- Sparse 索引 trick: 仅 items 带有 属性 appear 在...中 GSI
Single-表 Design
- One 表 对于 multiple entity types—prefix partition 键:
用户#123,ORDER#456 - Overloaded 排序 键:
METADATA,ORDER#2024-01-15,ITEM#abc - 查询 returns mixed types—过滤 client-side 或 使用 begins_with
- 不 always right—开始 带有 access patterns, 不 doctrine
分页
- Results capped 在 1MB per 请求—必须 handle 分页
LastEvaluatedKey在...中 响应 means 更多 pages—pass 作为ExclusiveStartKey- 循环 until
LastEvaluatedKeyabsent—common mistake: assume one call gets 所有 Limitlimits evaluated items, 不 returned—仍然 需要 分页 logic
Consistency
- Reads eventually consistent 由 默认—可能 return stale data
ConsistentRead: 真对于 strong consistency—costs 2x 读取 capacity- GSI reads always eventually consistent—否 strong consistency 选项
- 写入-然后-读取 needs consistent 读取 或 重试—eventual consistency bites 这里
Conditional Writes
ConditionExpression对于 optimistic locking—fails 如果 条件 假- Prevent overwrites:
attribute_not_exists(pk) - Version check:
version = :expected然后 increment - ConditionCheckFailedException = 重试 带有 fresh data, don't 只是 失败
Batch Operations
BatchWriteItem不 atomic—partial 成功 possible, check UnprocessedItems- 重试 unprocessed 带有 exponential backoff—built 进入 AWS SDK
- Max 25 items per batch, 16MB 总计—split larger batches
- 否 conditional writes 在...中 batch—使用 TransactWriteItems 对于 atomicity
Transactions
TransactWriteItems对于 atomic multi-item writes—所有 或 nothing- Max 100 items per 事务, 4MB 总计
- TransactGetItems 对于 consistent multi-读取—snapshot isolation
- 2x cost 的 normal operations—使用 仅 当...时 atomicity 必填
TTL
- Enable TTL 在...上 时间戳 属性—DynamoDB deletes 已过期 items automatically
- Deletion background process—items 可能 persist hours 之后 expiration
- TTL 值 Unix epoch seconds—milliseconds silently fails
- 过滤
attribute_exists(ttl) 和 ttl > :现在对于 queries 如果 needed
Capacity
- 在...上-demand: pay per 请求, auto-scales—good 对于 unpredictable traffic
- Provisioned: 设置 RCU/WCU, cheaper 在 scale—needs capacity planning
- Provisioned 带有 auto-scaling 对于 predictable patterns—设置 min/max/target
- ProvisionedThroughputExceededException = throttled—back off 和 重试
Limits
- Item size max 400KB—store large objects 在...中 S3, reference 在...中 DynamoDB
- Partition throughput: 3000 RCU, 1000 WCU—spread 穿过 partitions
- 查询/Scan returns max 1MB—分页 必填 对于 更多
- 属性 name max 64KB 总计 per item—don't 使用 long 属性 names
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制