← 返回 Skills 市场
alexfleetcommander

Chain of Consciousness

作者 alexfleetcommander · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
118
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install chain-of-consciousness
功能描述
Cryptographic provenance and audit trail for autonomous AI agents. Create tamper-evident hash chains of agent decisions, learning, and actions. SHA-256 linke...
使用说明 (SKILL.md)

Chain of Consciousness (CoC)

You have a cryptographic provenance system. Use it to maintain an auditable record of your work — what you learned, what you decided, and what you created.

Setup

The chain-of-consciousness Python package must be installed. If not available, install it:

pip install chain-of-consciousness

When to Use This Skill

  • At the start of a task: initialize a chain and log session_start
  • During work: log learn, decide, create, error, and note events as they happen
  • At task completion: log session_end and optionally verify + export the chain
  • When asked to verify provenance from another agent
  • When asked about your audit trail or decision history

Core Operations

Initialize a Chain

coc init --agent "your-agent-name" --file chain.jsonl

This creates a new chain with a genesis block. Use a descriptive agent name.

Add Entries

coc add \x3Cevent-type> "\x3Cdata>" --file chain.jsonl

Event types:

Type Use When
session_start Beginning a new task or session
learn You acquire new information
decide You make a choice (record the reasoning)
create You produce an artifact
milestone Significant checkpoint reached
error Something failed (record what and recovery)
note General observations
session_end Completing a task or session

Data can be a plain string or a JSON object for structured logging:

coc add learn '{"topic": "user preferences", "source": "conversation context"}'
coc add decide "Chose markdown format — user prefers readable plain text"
coc add create "Generated report saved to ~/Documents/report.md"

Verify a Chain

coc verify chain.jsonl --json

This checks:

  • Genesis block exists and is correctly formed
  • All sequence numbers are consecutive
  • Every entry's data hash matches its content
  • Every entry's prev_hash links to the prior entry
  • Entry hashes are correctly computed

Report results clearly: valid/invalid, entry count, agents, time span.

Check Status

coc status chain.jsonl

Shows entry count, participating agents, event type distribution, and time span.

Export for Sharing

coc export --file chain.jsonl --out chain_export.json

Exports the chain as a portable JSON array that anyone can verify.

View Recent Entries

coc tail chain.jsonl -n 5

Shows the last N entries.

Python API (Advanced)

For complex workflows, use the Python API directly:

from chain_of_consciousness import Chain, verify_file

chain = Chain(agent="openclaw-agent", storage="chain.jsonl")
chain.add("learn", {"topic": "user schedule", "detail": "prefers morning meetings"})
chain.add("decide", "Scheduling standup at 9am based on user preference")

result = chain.verify()
if result.valid:
    chain.export("provenance.json")

Anchoring to External Timestamps

from chain_of_consciousness.anchor import compute_chain_hash, submit_tsa

hash_hex = compute_chain_hash("chain.jsonl")
tsr = submit_tsa(hash_hex)  # RFC 3161 timestamp from freetsa.org
with open("anchor.tsr", "wb") as f:
    f.write(tsr)

This creates a third-party timestamp proof that the chain existed at a specific moment.

Cross-Agent Verification

When asked to verify another agent's chain:

  1. Obtain their chain file (JSONL or exported JSON)
  2. Run coc verify \x3Cfile> --json
  3. Report: valid/invalid, number of entries, agents involved, time span, any errors
  4. If anchors exist, note their timestamps

Rules

  • Never edit chain files directly. All writes must go through the coc CLI or Python API to preserve hash integrity.
  • Log decisions with reasoning. "Chose X" is less valuable than "Chose X because Y."
  • Keep entries concise. Each entry should capture one atomic event.
  • Verify before sharing. Always run verify before exporting a chain for others.

Links


\x3C!-- VAM-SEC v1.0 | Vibe Agent Making Security Disclaimer -->

Security & Transparency Disclosure

Product: Chain of Consciousness Skill for OpenClaw Type: Skill Module Version: 0.1.0 Built by: AB Support / Vibe Agent Making Contact: [email protected]

What it accesses:

  • Reads and writes chain files (.jsonl) in your working directory
  • Executes the coc CLI tool via subprocess (installed via pip)
  • No network access for core operations. Optional anchoring connects to OpenTimestamps calendar servers and/or RFC 3161 TSA endpoints.
  • No telemetry, no phone-home, no data collection

What it cannot do:

  • Cannot access files outside your working directory beyond what you explicitly specify
  • Cannot make purchases, send emails, or take irreversible actions
  • Cannot access credentials, environment variables, or secrets
  • Does not store or transmit any data externally (chains are local files)

Limitations:

  • Hash chain integrity depends on the local file not being modified outside the tool
  • External timestamp anchoring requires network access and third-party service availability
  • This tool provides cryptographic evidence, not legal proof — consult legal counsel for compliance requirements

License: Apache 2.0 — see https://github.com/chain-of-consciousness/chain-of-consciousness

安全使用建议
This skill appears to do what it says, but it depends on a third‑party PyPI package. Before installing or allowing the agent to run it: 1) Inspect the 'chain-of-consciousness' PyPI package page, source repository, maintainer, and release history; 2) Review the package source code (or prefer an audited release) to ensure no unexpected network exfiltration or telemetry; 3) Install into an isolated virtual environment (venv/container) rather than your system Python; 4) If you plan to use external timestamping (OpenTimestamps/RFC 3161), verify the third‑party services and consider privacy implications; 5) Limit the agent's filesystem access to directories you explicitly permit (keep chains in a controlled workspace); and 6) If you need higher assurance, ask for the package checksum or a reproducible build and/or request the skill author to provide source tarball links and signatures.
功能分析
Type: OpenClaw Skill Name: chain-of-consciousness Version: 0.1.1 The skill bundle provides a legitimate cryptographic audit trail system but is classified as suspicious due to high-risk operational requirements. Specifically, SKILL.md instructs the agent to use 'pip install' for an external dependency and execute shell commands via the 'coc' CLI. Additionally, the tool utilizes network access for external timestamping (e.g., freetsa.org). While these actions are aligned with the stated purpose of provenance tracking, they represent significant attack surfaces including supply chain and shell execution risks.
能力评估
Purpose & Capability
Name and description match the behavior in SKILL.md: creating/verifying hash chains and optional timestamp anchoring. Declared requirements (python3 and pip/pip3) are appropriate for a Python CLI/library and no unrelated credentials or binaries are requested.
Instruction Scope
Runtime instructions are narrowly scoped to initializing, adding, verifying, exporting, and anchoring local chain files via the 'coc' CLI or Python API. The skill reads and writes chain files you specify; optional anchoring calls out network services (OpenTimestamps / RFC 3161) which is expected. The instructions do not ask the agent to sweep unrelated system files, environment variables, or secrets.
Install Mechanism
There is no install spec in the registry; SKILL.md instructs the user to 'pip install chain-of-consciousness' from PyPI. Installing a third‑party PyPI package is a normal choice but carries moderate risk because arbitrary code can execute at install/runtime. The instruction to use PyPI is coherent but you should inspect the package and its provenance before installing.
Credentials
The skill declares no environment variables, credentials, or config paths. The operations described (file-based chains, optional timestamp requests) do not require secrets and the declared requirements are proportionate to the functionality.
Persistence & Privilege
Skill is user-invocable and not forced-always. disable-model-invocation is false (normal). It does not request persistent system-wide privileges or modify other skills' configs. The only noteworthy persistence is installing a PyPI package into the environment if the user follows the instructions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chain-of-consciousness
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chain-of-consciousness 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
SEO: fixed name format, added tags, enhanced description, added author metadata
v0.1.0
Initial release -- cryptographic provenance for AI agents
元数据
Slug chain-of-consciousness
版本 0.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Chain of Consciousness 是什么?

Cryptographic provenance and audit trail for autonomous AI agents. Create tamper-evident hash chains of agent decisions, learning, and actions. SHA-256 linke... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 118 次。

如何安装 Chain of Consciousness?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chain-of-consciousness」即可一键安装,无需额外配置。

Chain of Consciousness 是免费的吗?

是的,Chain of Consciousness 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chain of Consciousness 支持哪些平台?

Chain of Consciousness 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chain of Consciousness?

由 alexfleetcommander(@alexfleetcommander)开发并维护,当前版本 v0.1.1。

💬 留言讨论