codegraphtheory/chainforge
GitHub: codegraphtheory/chainforge
ChainForge 是一个基于 Hermes Agent 框架的区块链工程专用配置文件,为智能合约开发、安全审计和跨链架构设计提供生产级 AI 辅助。
Stars: 8 | Forks: 3
# ChainForge
ChainForge 是一个专为严谨的区块链工程设计的 Hermes Agent 配置文件。
模板谱系:基于 [codegraphtheory/hermes-profile-template](https://github.com/codegraphtheory/hermes-profile-template) 构建。
[](https://github.com/codegraphtheory/hermes-profile-template)
它专为那些在智能合约、协议架构、tokenomics、安全审查、审计和部署规划方面需要生产级协助的开发者而设计。ChainForge 对抗性系统保持高度警惕,并对财务完整性要求极其严格。
## ChainForge 的用途
当你需要以下方面的协助时,请使用 ChainForge:
- Solidity、Foundry、Hardhat、OpenZeppelin、Solady 和 EVM 协议开发。
- 智能合约的实现、审查、测试和强化。
- 针对合约、协议、跨链桥、治理、预言机和代币系统的威胁模型。
- Tokenomics 和激励机制设计。
- 审计准备和安全检查清单。
- 包含 multisig、timelock、验证、监控和事件响应的部署计划。
- 在提供足够上下文的情况下,涵盖 EVM、Solana、Move、CosmWasm 和 Octra 的跨链架构。
- Octra 钱包和客户端工作流,包括 `octra_pre_client`、`webcli`、钱包生成、水龙头使用、加密的本地钱包存储、交易审查和 RPC 集成。
ChainForge 绝不会协助构建 rug pull、隐藏的管理员陷阱、针对真实用户的漏洞利用工具、虚假的审计声明或具有欺骗性的 tokenomics。
## 安装
```
hermes profile install github.com/codegraphtheory/chainforge --alias
chainforge chat
```
如果你不想使用别名:
```
hermes profile install github.com/codegraphtheory/chainforge --name chainforge
hermes -p chainforge chat
```
## 配置模型凭证
ChainForge 包含带有可选提供商密钥的 `.env.EXAMPLE` 文件。如果你默认的 Hermes 设置中已经配置了模型凭证,你可能不需要添加任何内容。
如有需要:
```
cp ~/.hermes/profiles/chainforge/.env.EXAMPLE ~/.hermes/profiles/chainforge/.env
# 编辑 ~/.hermes/profiles/chainforge/.env
```
切勿提交 `.env` 文件或真实凭证。
## 示例提示词
```
Review this Solidity repository for reentrancy, role-control, oracle, and upgradeability risks. Run the relevant tests and summarize findings by severity.
```
```
Design an ERC-4626 vault with guarded deposits, pausable emergency controls, and Foundry fuzz tests. Explain the accounting invariants.
```
```
Threat model this bridge architecture. Focus on validator compromise, replay, finality assumptions, message ordering, and economic security.
```
```
Analyze this tokenomics design for emissions sustainability, governance capture, liquidity risks, and user incentive alignment.
```
```
Review this Octra webcli checkout for wallet encryption, local-server exposure, transaction construction, OpenSSL usage, and private-key handling risks.
```
## 验证配置文件
在此存储库中运行:
```
python3 scripts/validate_profile.py .
```
## 本地开发
克隆并在本地安装:
```
git clone https://github.com/codegraphtheory/chainforge.git
cd chainforge
python3 scripts/validate_profile.py .
hermes profile install . --name chainforge-local --yes
hermes -p chainforge-local chat
```
## 生成相关配置文件
ChainForge 基于 CodeGraphTheory Hermes 配置文件模板,并包含确定性的配置文件生成器。
编辑 `templates/profile.params.yaml`,然后运行:
```
python3 scripts/generate_profile.py \
--params templates/profile.params.yaml \
--output ../my-blockchain-profile
cd ../my-blockchain-profile
python3 scripts/validate_profile.py .
```
## 可自定义的文件
- `SOUL.md`:ChainForge 的身份、操作原则、范围、拒绝策略和输出契约。
- `distribution.yaml`:Hermes 配置文件的分发元数据。
- `config.yaml`:模型、工具集、终端、内存、安全和审批的默认设置。
- `.env.EXAMPLE`:仅用于环境变量的说明文档。
- `skills/`:随配置文件附带的可重用流程。
- `AGENTS.md`:针对维护此存储库的 AI 编码代理的指令。
## 许可证
MIT。详情请参阅 `LICENSE`。
标签:AI配置, Solidity, 代币经济学, 区块链架构, 去中心化金融, 智能合约, 逆向工具