Agent Skills¶
The Almanak SDK ships with an agent skill -- a structured knowledge file that teaches AI coding agents how to build DeFi strategies. Install it into your project so your AI assistant understands the IntentStrategy API, intent vocabulary, market data methods, and CLI commands.
Quick Install¶
The fastest way to get started:
This auto-detects which AI coding tools you use (by checking for .claude/, .cursor/, .github/, etc.) and installs the skill into each platform's native skills directory.
Platform-Specific Instructions¶
Claude Code¶
Claude Code discovers skills from .claude/skills/ subdirectories.
Result: .claude/skills/almanak-strategy-builder/SKILL.md
OpenAI Codex¶
Codex discovers project skills from .codex/skills/ subdirectories.
Result: .codex/skills/almanak-strategy-builder/SKILL.md
Cursor¶
Cursor reads custom rules from .cursor/rules/ as .mdc files with glob-based scoping.
The installed file includes YAML frontmatter that activates the skill when editing strategy.py or config.json files:
Result: .cursor/rules/almanak-strategy-builder.mdc
GitHub Copilot¶
Copilot reads scoped instructions from .github/instructions/ with applyTo frontmatter.
The installed file includes frontmatter scoped to strategy files:
Result: .github/instructions/almanak-strategy-builder.instructions.md
Windsurf¶
Windsurf reads rules from .windsurf/rules/.
Result: .windsurf/rules/almanak-strategy-builder.md
Cline¶
Cline reads rules from .clinerules/.
Result: .clinerules/almanak-strategy-builder.md
Roo Code¶
Roo Code reads rules from .roo/rules/.
Result: .roo/rules/almanak-strategy-builder.md
Aider¶
Aider discovers skills from .aider/skills/ subdirectories.
Result: .aider/skills/almanak-strategy-builder/SKILL.md
Amazon Q¶
Amazon Q reads rules from .amazonq/rules/.
Result: .amazonq/rules/almanak-strategy-builder.md
OpenClaw¶
OpenClaw discovers skills from .openclaw/skills/ subdirectories.
Result: .openclaw/skills/almanak-strategy-builder/SKILL.md
Install All Platforms¶
To install for every supported platform at once:
Global Install¶
Install into your home directory (~/) so the skill is available in every project without per-project setup:
This writes to ~/.claude/skills/, ~/.codex/skills/, ~/.cursor/rules/, etc. Platforms that only support project-scoped rules (Copilot, Cline, Roo Code, Amazon Q) are automatically skipped.
You can also target specific platforms:
To check or update global installs:
Note
Most platforms let local (project) skills override global ones. If you have both, the project-level skill takes precedence.
Install via npx (skills.sh)¶
If you use the skills.sh registry, you can install directly from GitHub:
This discovers the almanak-strategy-builder skill from the public repo and installs it for your detected platform.
Managing Installed Skills¶
Check Status¶
See which platforms have the skill installed and whether they are up to date:
Example output:
Agent skill status (SDK v2.0.0):
claude up to date (v2.0.0)
codex not installed
cursor outdated (v1.9.0 -> v2.0.0)
copilot not installed
...
Installed: 1 Outdated: 1 Missing: 7
Update¶
After upgrading the SDK (pip install --upgrade almanak), update your installed skill files to match:
This scans for all installed platform files and replaces their content with the current SDK version.
Dry Run¶
Preview what install would do without writing any files:
Custom Directory¶
Install into a specific project directory:
Per-Strategy Guides¶
When you scaffold a new strategy with almanak strat new, an AGENTS.md file is automatically generated inside the strategy directory. This lightweight guide is tailored to the template you chose -- it lists only the intent types and patterns relevant to that specific strategy.
almanak strat new --template mean_reversion --name my_rsi --chain arbitrum
# Creates my_rsi/AGENTS.md alongside strategy.py and config.json
What the Skill Teaches¶
The bundled skill covers:
| Section | What it covers |
|---|---|
| Quick Start | Install, scaffold, run |
| Core Concepts | IntentStrategy, decide(), MarketSnapshot |
| Intent Reference | All intent types with signatures and examples |
| Market Data API | price(), balance(), rsi(), macd(), bollinger_bands(), and 10+ indicators |
| State Management | self.state persistence, on_intent_executed callback |
| Configuration | config.json format, .env secrets, anvil_funding |
| Token Resolution | get_token_resolver(), resolve_for_swap() |
| Backtesting | PnL simulation, paper trading, parameter sweeps |
| CLI Commands | strat new/run/demo/backtest, gateway, agent |
| Chains & Protocols | 12 chains, 10 protocols with enum names |
| Common Patterns | Rebalancing, alerting, teardown, IntentSequence |
| Troubleshooting | Common errors and fixes |
Reading the Skill Directly¶
To view or grep the raw skill content: