npx skills add https://github.com/franalgaba/grimoire --skill grimoire此技能是 Grimoire 的基础操作手册。
当任务涉及以下内容时,请使用此技能:
.spell 文件advise)的编写、调试和重放工作流以下所有 references/ 和 docs/ 路径均相对于此技能目录(skills/grimoire/)。这些规则是必需的——它们解决了导致编写错误的语法覆盖缺口。
立即停止——首先阅读此部分: 请不要搜索代码库、使用 grep 查找语法模式或依赖记忆来获取 DSL 语法。与此技能捆绑的参考文件是唯一可信来源。在编写或编辑任何法术内容之前,请立即使用 Read 工具阅读下面列出的文件。
.spell 编写/编辑任务——在开始其他操作之前,使用 Read 工具阅读这些文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/syntax-capabilities.mdreferences/authoring-workflow.mdreferences/cli-quick-reference.mdadvise、advisors、重放)——立即使用 Read 工具阅读:
docs/how-to/use-advisory-decisions.mddocs/explanation/advisory-decision-flow.mdreferences/anvil-cheatsheet.mddocs/how-to/simulate-on-anvil-fork.mddocs/how-to/use-wallet-commands-end-to-end.mdreferences/cast-cheatsheet.md选择第一个可用的调用方式并在会话中重复使用它。
npm i -g @grimoirelabs/cligrimoirenpx -y @grimoirelabs/clibun run packages/cli/src/index.ts如果一种方式失败,请自动切换到下一种方式。
如果 grimoire venue doctor ... 因 Unknown venue adapter "doctor" 而失败,请优先使用仓库本地调用(bun run packages/cli/src/index.ts)或升级全局 CLI。
在编写自定义法术之前,请使用此序列:
<grimoire-cmd> --help<grimoire-cmd> setup(引导式交互执行入门)<grimoire-cmd> validate spells/compute-only.spell<grimoire-cmd> simulate spells/compute-only.spell --chain 1如果以上三步全部通过,则可以继续法术编写。
设置安全/运行时预期:
--no-save-password-env,否则设置过程可能会写入 .grimoire/setup.env.grimoire/setup.env,且不会覆盖现有的环境变量validate(对于咨询密集的法术,使用 --strict)。simulate。venue doctor。
<grimoire-cmd> venue doctor --adapter uniswap --chain 1 --rpc-url <rpc> --jsonchain-id、block-number、balance、nonce)。
hyperliquid。--advisory-replay <runId>。cast --dry-run。cast 之前,要求明确的用户确认。--rpc-url <sourceChainId>=<url>--rpc-url <destinationChainId>=<url>--morpho-market-id <actionRef>=<marketId>(可重复),或--morpho-market-map <path>morpho_blue.supply_collateral(asset, amount[, market_id])morpho_blue.withdraw_collateral(asset, amount[, market_id])0x... 地址字面量;带引号的类似地址的字符串会触发 QUOTED_ADDRESS_LITERAL。GRIMOIRE_WALLET_ADDRESS,回退使用 WALLET_ADDRESS)。resume <runId> 继续(使用 --watch 轮询结算状态)。--password-env 而不是 --private-key。.grimoire/setup.env 视为明文秘密材料:仅保留在本地,不再需要时进行轮换/删除。GRIMOIRE_SETUP_ENV_FILE=/abs/path/to/.grimoire/setup.env。initsetupcompilecompile-allvalidatesimulatecastvenuesvenuevenue doctorhistorylogresumewallet(generate、address、balance、import、wrap、unwrap)关于简洁的命令签名和安全关键标志,请使用 references/cli-quick-reference.md。
simulate 和 cast --dry-run 是仅预览流程。cast 可以提交不可逆操作。simulate 支持显式的 --rpc-url,优先级为:--rpc-url -> RPC_URL_<chainId> -> RPC_URL。--destination-spell),具有一个逻辑运行 ID 并支持恢复。在获取数据时,始终优先使用 price() 和 balance() 而非咨询。 它们是确定性的、快速的,并且不需要 LLM 调用。
price(BASE, QUOTE) — 通过查询提供商获取实时代币价格(需要 Alchemy RPC URL)balance(ASSET) — 通过 RPC 获取链上代币余额(任何 RPC URL)advise)仅当任务需要 LLM 判断、推理或解释时才使用咨询。
x = advise advisor: "prompt" { ... }。output 强制执行模式。timeout 和 fallback。validate --strict。--advisory-trace-verbose(非 JSON 模式)来流式传输详细的咨询跟踪信息。使用场所技能获取快照参数和市场元数据:
grimoire-aavegrimoire-uniswapgrimoire-morpho-bluegrimoire-hyperliquidgrimoire-pendlegrimoire-polymarket场所 CLI 输出的格式化策略:
--format json--format tablereferences/syntax-capabilities.mdreferences/authoring-workflow.mdreferences/anvil-cheatsheet.mdreferences/cast-cheatsheet.mdreferences/cli-quick-reference.mddocs/how-to/simulate-on-anvil-fork.mddocs/how-to/use-wallet-commands-end-to-end.mddocs/how-to/use-advisory-decisions.mddocs/explanation/advisory-decision-flow.mddocs/reference/cli.mddocs/reference/spell-syntax.mddocs/reference/grimoire-dsl-spec.mddocs/reference/compiler-runtime.md每周安装量
936
代码仓库
GitHub 星标数
1
首次出现
2026年2月5日
安全审计
安装于
opencode936
gemini-cli936
github-copilot936
codex936
amp936
kimi-cli936
This skill is the base operating playbook for Grimoire.
Use this skill when the task includes:
.spell filesadvise) authoring, debugging, and replay workflowsAll references/ and docs/ paths below are relative to this skill directory (skills/grimoire/). These rules are required — they solve syntax coverage gaps that cause authoring errors.
STOP — read this first: Do NOT search the codebase, grep for syntax patterns, or rely on memory for DSL syntax. The reference files bundled with this skill are the single source of truth. IMMEDIATELY use the Read tool on the files listed below before writing or editing any spell content.
.spell authoring/editing task — IMMEDIATELY read these files using the Read tool before doing anything else:
references/syntax-capabilities.mdreferences/authoring-workflow.mdreferences/cli-quick-reference.mdadvise, advisors, replay) — IMMEDIATELY read using the Read tool:
docs/how-to/use-advisory-decisions.mddocs/explanation/advisory-decision-flow.mdSelect the first working invocation and reuse it for the session.
npm i -g @grimoirelabs/cligrimoirenpx -y @grimoirelabs/clibun run packages/cli/src/index.tsIf one path fails, move to the next path automatically.
If grimoire venue doctor ... fails with Unknown venue adapter "doctor", prefer repo-local invocation (bun run packages/cli/src/index.ts) or upgrade global CLI.
Use this sequence before writing custom spells:
<grimoire-cmd> --help<grimoire-cmd> setup (guided interactive execute onboarding)<grimoire-cmd> validate spells/compute-only.spell<grimoire-cmd> simulate spells/compute-only.spell --chain 1If all three pass, proceed to spell authoring.
Setup security/runtime expectations:
.grimoire/setup.env unless --no-save-password-env is used.grimoire/setup.env at startup without overriding existing env varsvalidate (use --strict for advisory-heavy spells).simulate.venue doctor for the target adapter/chain.
<grimoire-cmd> venue doctor --adapter uniswap --chain 1 --rpc-url <rpc> --jsonchain-id, block-number, balance, nonce).
--rpc-url <sourceChainId>=<url>--rpc-url <destinationChainId>=<url>--morpho-market-id <actionRef>=<marketId> (repeatable), or--morpho-market-map <path>morpho_blue.supply_collateral(asset, amount[, market_id])morpho_blue.withdraw_collateral(asset, amount[, market_id])0x... address literals in action token fields; quoted address-like strings trigger QUOTED_ADDRESS_LITERAL.GRIMOIRE_WALLET_ADDRESS preferred, fallback WALLET_ADDRESS).resume <runId> (use --watch to poll settlement).--password-env over --private-key for dry-run/live casts..grimoire/setup.env as plaintext secret material: keep local-only and rotate/remove when no longer needed.initsetupcompilecompile-allvalidatesimulatecastvenuesvenuevenue doctorhistoryUse references/cli-quick-reference.md for concise command signatures and safety-critical flags.
simulate and cast --dry-run are preview-only flows.cast can commit irreversible actions when policy and runtime checks pass.simulate supports explicit --rpc-url, with precedence: --rpc-url -> RPC_URL_<chainId> -> RPC_URL.--destination-spell) with one logical run id and resume support.Always preferprice() and balance() over advisory for data fetching. These are deterministic, fast, and don't require LLM calls.
price(BASE, QUOTE) — live token price via query provider (requires Alchemy RPC URL)balance(ASSET) — on-chain token balance via RPC (any RPC URL)advise) just to fetch a price, balance, or other structured dataUse advisory only when the task requires LLM judgment, reasoning, or interpretation.
x = advise advisor: "prompt" { ... }.output.timeout and fallback in every advisory block.validate --strict when advisory logic gates value-moving actions.--advisory-trace-verbose (non-JSON mode) to stream detailed advisory traces.Use venue skills for snapshot parameters and market metadata:
grimoire-aavegrimoire-uniswapgrimoire-morpho-bluegrimoire-hyperliquidgrimoire-pendlegrimoire-polymarketFormatting policy for venue CLI output:
--format json for automation or nested payloads--format table for human-readable summariesreferences/syntax-capabilities.mdreferences/authoring-workflow.mdreferences/anvil-cheatsheet.mdreferences/cast-cheatsheet.mdreferences/cli-quick-reference.mddocs/how-to/simulate-on-anvil-fork.mddocs/how-to/use-wallet-commands-end-to-end.mddocs/how-to/use-advisory-decisions.mddocs/explanation/advisory-decision-flow.mdWeekly Installs
936
Repository
GitHub Stars
1
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
opencode936
gemini-cli936
github-copilot936
codex936
amp936
kimi-cli936
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
Theme Factory - 专业字体色彩主题库,一键应用设计风格到演示文稿和作品
909 周安装
高级全栈工程师技能包:自动化脚手架、代码质量分析与最佳实践工具
909 周安装
专业市场研究报告生成器 | 50+页咨询级分析报告,含波特五力、SWOT、PESTLE等框架
910 周安装
Manim Composer:AI 驱动的 3Blue1Brown 风格数学动画制作工具
912 周安装
Terraform Stacks 详解:大规模基础设施编排与管理解决方案
912 周安装
LangSmith Fetch 代理调试技能 - 快速调试 LangChain/LangGraph 代理执行轨迹
913 周安装
references/anvil-cheatsheet.mddocs/how-to/simulate-on-anvil-fork.mddocs/how-to/use-wallet-commands-end-to-end.mdreferences/cast-cheatsheet.mdhyperliquid.--advisory-replay <runId> in dry-run/live cast.cast --dry-run before any live cast.cast.GRIMOIRE_SETUP_ENV_FILE=/abs/path/to/.grimoire/setup.env when needed.logresumewallet (generate, address, balance, import, wrap, unwrap)docs/reference/cli.mddocs/reference/spell-syntax.mddocs/reference/grimoire-dsl-spec.mddocs/reference/compiler-runtime.md