context-verifier (検証)
Unified skill for file hash computation, integrity verification, severity tagging,
and context packet creation. Consolidates 3 granular skills into a single verification system.
Trigger: 明示呼出 (explicit invocation)
Source skills: context-packet, file-verifier, severity-tagger
Installation
CODEBLOCK0
Dependencies: None (foundational skill)
Standalone usage: This skill is fully functional standalone. It provides file integrity
verification that other skills in the suite depend on. Install this first when adopting
the Neon Agentic Suite.
Data handling: This skill performs local-only operations. Hash computation uses standard
SHA256 algorithms locally — no file contents are sent to any model, API, or external service.
Results are written to output/context-packets/ in your workspace. The skill reads config from
.openclaw/context-verifier.yaml or .claude/context-verifier.yaml only.
File access scope: This skill reads user-specified files for hash computation. The metadata
declares config and output paths only — the skill will read ANY file path you provide to
/cv hash, /cv verify, or /cv packet. Use caution with sensitive files.
What This Solves
AI agents sometimes operate on stale data — editing a file that changed since it was read, or trusting cached content that\'s now outdated. This skill prevents that by:
- 1. Computing hashes of files before and after operations
- Detecting changes between read and write
- Generating context packets with verifiable checksums for review workflows
The insight: Trust but verify. The file you read might not be the file you\'re about to edit. Check first.
Usage
CODEBLOCK1
Sub-Commands
| Command | CJK | Logic | Trigger |
|---|
| INLINECODE6 | 哈希 | file→SHA256(content) | Explicit |
| INLINECODE7 |
検証 | file×hash→match✓∨mismatch✗ | Explicit |
|
/cv tag | 標記 | file→severity∈{critical,important,minor} | Explicit |
|
/cv packet | 包装 | files[]→{path,hash,severity,timestamp}[] | Explicit |
Arguments
/cv hash
| Argument | Required | Description |
|---|
| file | Yes | File path to hash |
| --algorithm |
No | Hash algorithm:
sha256 only (MD5/SHA-1 removed - cryptographically broken) |
/cv verify
| Argument | Required | Description |
|---|
| file | Yes | File path to verify |
| hash |
Yes | Expected hash value |
| --algorithm | No | Hash algorithm: sha256 only |
/cv tag
| Argument | Required | Description |
|---|
| file | Yes | File path to tag |
| severity |
No | Severity level:
critical,
important,
minor (auto-detected if omitted) |
/cv packet
| Argument | Required | Description |
|---|
| files | Yes | Comma-separated file paths or glob pattern |
| --name |
No | Packet name (default: auto-generated) |
| --include-content | No | Include file content in packet (default: false) -
see Security section |
⚠️ Security Warning: The --include-content flag stores file contents to disk.
Never use this flag with sensitive files (.env, credentials, secrets).
See the Security Considerations section below.
Configuration
Configuration is loaded from (in order of precedence):
- 1.
.openclaw/context-verifier.yaml (OpenClaw standard) - INLINECODE17 (Claude Code compatibility)
- Defaults (built-in patterns)
Security Considerations
Local-only processing: All hash computation uses standard SHA256 algorithms executed locally.
No file contents are ever sent to any LLM, API, or external service. The \"agent\'s model\" is only
used to interpret your commands — not to process file contents.
What this skill does NOT do:
- - Send file contents to any model or API (hashing is local)
- Call external APIs or third-party services
- Modify source files (only writes to
output/context-packets/)
What this skill accesses:
- - Configuration files in
.openclaw/context-verifier.yaml and INLINECODE20 - Any user-specified files for hash computation (read-only) — the skill reads whatever paths you provide
- Its own output directory
output/context-packets/ (write)
⚠️ IMPORTANT: Unlike other skills in this suite, context-verifier reads arbitrary files that
you specify. The metadata only declares config/output paths. When you run /cv hash myfile.go,
the skill reads myfile.go even though it\'s not in the metadata. This is by design — verification
requires reading the files you want to verify.
This skill handles file metadata and optionally file contents. Follow these guidelines:
Sensitive File Detection (Not Reading)
The critical_patterns (e.g., *.env, *credentials*, *secret*) are used for:
- - Detection: Identifying files that should trigger warnings
- Severity tagging: Marking files as critical for change-blocking behavior
By default, /cv hash and /cv packet compute hashes without reading file contents into output.
The hash is computed but the file content is not stored.
--include-content Flag
⚠️ WARNING: The --include-content flag writes actual file contents to disk.
| Risk | Mitigation |
|---|
| Secrets written to disk | Never use --include-content with .env, credentials, or secret files |
| Sensitive data in git |
Add
output/context-packets/ to
.gitignore (see below) |
| Data retention | Packets are stored indefinitely; manually delete when no longer needed |
Recommended usage:
CODEBLOCK2
Required .gitignore Entry
Add to your .gitignore to prevent accidental commits:
CODEBLOCK3
Storage and Retention
- - Location: Packets stored in
output/context-packets/ (workspace-local) - Format: Unencrypted JSON
- Retention: No automatic deletion; clean up manually
- Access: Standard filesystem permissions (no additional access controls)
For sensitive environments, consider:
- 1. Restricting
output/ directory permissions - Using encrypted filesystems
- Periodic cleanup of old packets
Provenance
This skill is developed by Live Neon (https://github.com/live-neon/skills) and published
to ClawHub under the leegitw account. Both refer to the same maintainer.
Core Logic
Hash Computation
Default algorithm: SHA-256
CODEBLOCK4
Severity Classification
Files are auto-classified based on configurable patterns:
| Severity | Default Patterns | Behavior on Change |
|---|
| critical | INLINECODE39 , *credentials*, *secret*, project config | Block operation |
| important |
*.go,
*.ts,
*.md (in docs/) | Warn user |
| minor |
*.log,
*.tmp,
output/* | Info only |
Critical file patterns are configurable via .openclaw/context-verifier.yaml:
CODEBLOCK5
Context Packet Structure
CODEBLOCK6
Output
/cv hash output
CODEBLOCK7
/cv verify output (match)
CODEBLOCK8
/cv verify output (mismatch)
CODEBLOCK9
/cv tag output
CODEBLOCK10
/cv packet output
CODEBLOCK11
Note: Avoid including sensitive files (.env, credentials) in packets.
Use specific globs like src/*.go rather than * to exclude secrets.
Integration
- - Layer: Foundation (no dependencies)
- Depends on: None (foundational verification system)
- Used by: failure-memory (for file change detection), constraint-engine (for pre-action checks)
Failure Modes
| Condition | Behavior |
|---|
| File not found | Error: \"File not found: {path}\" |
| Permission denied |
Error: \"Cannot read file: {path}\" |
| Invalid hash format | Error: \"Invalid hash format. Expected: {algorithm}\" |
| Glob matches no files | Warning: \"No files match pattern: {glob}\" |
Next Steps
After invoking this skill:
| Condition | Action |
|---|
| Hash mismatch | Alert user, suggest re-read of file |
| Critical file changed |
Block operation, require verification |
| Packet created | Store in
output/context-packets/ for audit |
Workspace Files
This skill reads/writes:
CODEBLOCK12
Examples
Verify file before editing
CODEBLOCK13
Create context packet for refactoring
CODEBLOCK14
Tag sensitive files
CODEBLOCK15
Verify database migration before deployment
CODEBLOCK16
Create API schema verification packet
CODEBLOCK17
Acceptance Criteria
- - [ ]
/cv hash computes SHA-256 hash of file - [ ]
/cv verify compares file hash against expected value - [ ]
/cv verify clearly indicates match/mismatch - [ ]
/cv tag auto-classifies file severity based on patterns - [ ]
/cv tag allows manual severity override - [ ]
/cv packet creates JSON packet with file metadata - [ ]
/cv packet supports glob patterns - [ ] Critical file changes trigger block behavior
- [ ] Workspace files stored in documented location
Consolidated from 3 skills as part of agentic skills consolidation (2026-02-15).
context-verifier (検証)
用于文件哈希计算、完整性验证、严重性标记和上下文包创建的统合技能。将3个精细技能整合为单一验证系统。
触发方式: 明示呼出 (explicit invocation)
源技能: context-packet, file-verifier, severity-tagger
安装
bash
openclaw install leegitw/context-verifier
依赖项: 无(基础技能)
独立使用: 本技能可完全独立运行。它提供文件完整性验证功能,套件中的其他技能均依赖于此。采用Neon Agentic Suite时请优先安装本技能。
数据处理: 本技能仅执行本地操作。哈希计算使用本地标准SHA256算法——不会将任何文件内容发送至任何模型、API或外部服务。结果将写入工作区中的output/context-packets/目录。技能仅从.openclaw/context-verifier.yaml或.claude/context-verifier.yaml读取配置。
文件访问范围: 本技能读取用户指定的文件进行哈希计算。元数据仅声明配置和输出路径——技能将读取您提供给/cv hash、/cv verify或/cv packet的任何文件路径。处理敏感文件时请谨慎。
解决的问题
AI代理有时会基于过时数据操作——编辑自读取后已发生变化的文件,或信任现已过时的缓存内容。本技能通过以下方式防止此类问题:
- 1. 在操作前后计算文件哈希
- 检测读取与写入之间的变化
- 生成带有可验证校验和的上下文包,用于审查工作流
核心理念: 信任但验证。您读取的文件可能并非即将编辑的文件。请先检查。
使用方法
/cv <子命令> [参数]
子命令
| 命令 | CJK | 逻辑 | 触发方式 |
|---|
| /cv hash | 哈希 | 文件→SHA256(内容) | 显式 |
| /cv verify |
検証 | 文件×哈希→匹配✓∨不匹配✗ | 显式 |
| /cv tag | 標記 | 文件→严重性∈{critical,important,minor} | 显式 |
| /cv packet | 包装 | 文件[]→{路径,哈希,严重性,时间戳}[] | 显式 |
参数
/cv hash
| 参数 | 必需 | 描述 |
|---|
| file | 是 | 要计算哈希的文件路径 |
| --algorithm |
否 | 哈希算法:仅sha256(MD5/SHA-1已移除——存在加密漏洞) |
/cv verify
是 | 预期的哈希值 |
| --algorithm | 否 | 哈希算法:仅sha256 |
/cv tag
| 参数 | 必需 | 描述 |
|---|
| file | 是 | 要标记的文件路径 |
| severity |
否 | 严重性级别:critical、important、minor(省略时自动检测) |
/cv packet
| 参数 | 必需 | 描述 |
|---|
| files | 是 | 逗号分隔的文件路径或glob模式 |
| --name |
否 | 包名称(默认:自动生成) |
| --include-content | 否 | 在包中包含文件内容(默认:false)——
请参阅安全部分 |
⚠️ 安全警告: --include-content标志会将文件内容存储到磁盘。
切勿对敏感文件(.env、凭据、密钥)使用此标志。
请参阅下方的安全注意事项部分。
配置
配置按以下优先级加载:
- 1. .openclaw/context-verifier.yaml(OpenClaw标准)
- .claude/context-verifier.yaml(Claude Code兼容)
- 默认值(内置模式)
安全注意事项
仅本地处理: 所有哈希计算使用本地执行的标准SHA256算法。
任何文件内容都不会发送至任何LLM、API或外部服务。代理模型仅用于解释您的命令——而非处理文件内容。
本技能不执行的操作:
- - 将文件内容发送至任何模型或API(哈希计算在本地进行)
- 调用外部API或第三方服务
- 修改源文件(仅写入output/context-packets/目录)
本技能访问的内容:
- - .openclaw/context-verifier.yaml和.claude/context-verifier.yaml中的配置文件
- 任何用户指定的文件用于哈希计算(只读)——技能读取您提供的任何路径
- 自身的输出目录output/context-packets/(写入)
⚠️ 重要提示: 与本套件中的其他技能不同,context-verifier会读取您指定的任意文件。元数据仅声明配置/输出路径。当您运行/cv hash myfile.go时,技能会读取myfile.go,即使它不在元数据中。这是设计使然——验证需要读取您想要验证的文件。
本技能处理文件元数据,并可选择处理文件内容。请遵循以下指南:
敏感文件检测(非读取)
critical_patterns(例如.env、credentials、secret*)用于:
- - 检测:识别应触发警告的文件
- 严重性标记:将文件标记为关键,以实现变更阻止行为
默认情况下,/cv hash和/cv packet计算哈希时不会将文件内容读入输出。哈希会被计算,但文件内容不会被存储。
--include-content 标志
⚠️ 警告: --include-content标志会将实际文件内容写入磁盘。
| 风险 | 缓解措施 |
|---|
| 密钥写入磁盘 | 切勿对.env、凭据或密钥文件使用--include-content |
| 敏感数据进入git |
将output/context-packets/添加到.gitignore(见下方) |
| 数据保留 | 包会无限期存储;不再需要时请手动删除 |
推荐用法:
bash
安全:仅哈希(默认)- 不存储内容
/cv packet src/*.go --name pre-refactor
有风险:包含内容 - 确保glob中无敏感文件
/cv packet docs/*.md --name docs-backup --include-content
切勿这样做:
/cv packet .env --include-content # 将密钥存储到磁盘!
必需的 .gitignore 条目
添加到您的.gitignore以防止意外提交:
gitignore
上下文验证包(可能包含敏感数据)
output/context-packets/
存储与保留
- - 位置:包存储在output/context-packets/(工作区本地)
- 格式:未加密的JSON
- 保留:无自动删除;请手动清理
- 访问:标准文件系统权限(无额外访问控制)
对于敏感环境,请考虑:
- 1. 限制output/目录权限
- 使用加密文件系统
- 定期清理旧包
来源
本技能由Live Neon(https://github.com/live-neon/skills)开发,并以leegitw账户发布到ClawHub。两者指向同一维护者。
核心逻辑
哈希计算
默认算法:SHA-256
hash(文件) = SHA256(文件.内容)
严重性分类
文件根据可配置模式自动分类:
| 严重性 | 默认模式 | 变更时的行为 |
|---|
| critical | .env、credentials、secret、项目配置 | 阻止操作 |
| important |
.go、
.ts、.md(在docs/中) | 警告用户 |
| minor |
.log、.tmp、output/* | 仅信息提示 |
关键文件模式可通过.openclaw/context-verifier.yaml配置:
yaml
.openclaw/context-verifier.yaml
critical_patterns:
- *.env
-
credentials
-
secret
- CLAUDE.md # Claude Code项目
- AGENTS.md # OpenClaw项目
- pyproject.toml # Python项目
- Cargo.toml # Rust项目
上下文包结构
json
{
id: PKT-20260215-001,
created: 2026-02-15T10:30:00Z,
files: [
{
path: src/main.go,
hash