grimoire
173
总安装量
7
周安装量
#2848
全站排名
安装命令
npx skills add https://github.com/franalgaba/grimoire --skill grimoire
Agent 安装分布
amp
7
pi
7
opencode
7
cursor
7
codex
7
Skill 文档
Grimoire CLI Skill
This skill is the base operating playbook for Grimoire.
When To Use
Use this skill when the task includes:
- install/setup of Grimoire tooling
- creating or editing
.spellfiles - syntax questions about DSL capability
- advisory (
advise) authoring, debugging, and replay workflows - compile/validate/simulate/cast workflows
- debugging spell compile/runtime failures
Mandatory Loading Rules
These rules are required and solve syntax coverage gaps.
- For any
.spellauthoring/editing task:- first read
references/syntax-capabilities.md - then read
references/authoring-workflow.md
- first read
- For CLI flag details:
- read
references/cli-quick-reference.md
- read
- For any advisory task (
advise,advisors, replay):- read
docs/how-to/use-advisory-decisions.md - read
docs/explanation/advisory-decision-flow.md
- read
- Do not rely on memory for DSL syntax when authoring; use the references above.
- For local fork preview workflows:
- read
docs/how-to/simulate-on-anvil-fork.md
- read
- For wallet setup and execution key flows:
- read
docs/how-to/use-wallet-commands-end-to-end.md
- read
Installation Resolution
Select the first working invocation and reuse it for the session.
- Global:
npm i -g @grimoirelabs/cli- command prefix:
grimoire
- No-install:
- command prefix:
npx -y @grimoirelabs/cli
- command prefix:
- Repo-local:
- command prefix:
bun run packages/cli/src/index.ts
- command prefix:
If one path fails, move to the next path automatically.
Fast Start (Immediate Success Path)
Use this sequence before writing custom spells:
<grimoire-cmd> --help<grimoire-cmd> validate spells/compute-only.spell<grimoire-cmd> simulate spells/compute-only.spell --chain 1
If all three pass, proceed to spell authoring.
Authoring and Execution Policy
- Read syntax references first (mandatory rule above).
- Author/update spell.
- Run
validate(use--strictfor advisory-heavy spells). - Fix errors/warnings and re-run until validation passes.
- Run
simulate. - For advisory steps intended for deterministic execution, record and then use
--advisory-replay <runId>in dry-run/live cast. - If spell includes irreversible actions, require
cast --dry-runbefore any live cast. - Ask for explicit user confirmation before live value-moving
cast.
Command Surface (Core)
initcompilecompile-allvalidatesimulatecastvenuesvenuehistorylogwallet(generate,address,balance,import,wrap,unwrap)
Use references/cli-quick-reference.md for concise command signatures and safety-critical flags.
Runtime Behavior Model
- One runtime semantics: preview first, commit only for execute paths.
simulateandcast --dry-runare preview-only flows.- Live
castcan commit irreversible actions when policy and runtime checks pass.
Advisory Operating Rules
- Advisory must be explicit statement form:
x = advise advisor: "prompt" { ... }. - Treat advisory outputs as typed contracts; enforce schema with
output. - Require
timeoutandfallbackin every advisory block. - Prefer
validate --strictwhen advisory logic gates value-moving actions. - Use replay for determinism when moving from preview/dry-run to live execution.
Venue Metadata and Snapshots
Use venue skills for snapshot parameters and market metadata:
grimoire-aavegrimoire-uniswapgrimoire-morpho-bluegrimoire-hyperliquid
References
references/syntax-capabilities.mdreferences/authoring-workflow.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