axelar-gmp — Claude Code skill: what it does, how to install
Guides cross-chain contract calls between Hedera and EVM networks via Axelar GMP. Useful for setting up gateway calls, receivers, and HSS loops.
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-codeWhat axelar-gmp does
This skill guides agent development for Axelar General Message Passing on Hedera. It decouples bridge transport from downstream business logic. The source chain relies on an authorized sender contract, while destination contracts extend AxelarExecutable and filter incoming callers using lowercase keccak256 comparisons.
Gas sequence is strict. Contracts must execute payNativeGasForContractCall with native value before calling callContract on the gateway. Gas refunds must return to the orchestrator rather than an arbitrary account. Numeric chain IDs fail. Axelar requires string identifiers such as "hedera" or "ethereum-sepolia".
Recurring workflows integrate directly with the Hedera Schedule Service precompile (0x16b). The contract validates schedule capacity, triggers dispatch, and flags failures for manual recovery if rescheduling cannot complete.
What it helps with
- wire
IAxelarGatewayandIAxelarGasServicewith upfront native gas payments - build
AxelarExecutablereceivers with case-insensitive source allowlists - separate cross-chain transport interfaces from destination business handlers
- automate recurring message dispatches via Hedera Schedule Service (
0x16b)
Example prompts for the agent
- Write a Hedera bridge sender contract that pays Axelar gas before calling the gateway
- Create an AxelarExecutable receiver contract that validates source chain and address
- Build an orchestrator using HSS (0x16b) to automate recurring GMP dispatches to EVM
How to install axelar-gmp
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-code2Manually: put the files in place
~/.claude/skills/axelar-gmp/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/axelar-gmp/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a codex2Manually: put the files in place
.agents/skills/axelar-gmp/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a cursor2Manually: put the files in place
.cursor/skills/axelar-gmp/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hedera-dev/hedera-skills axelar-gmp2Manually: put the files in place
.github/skills/axelar-gmp/SKILL.md1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a gemini-cli2Platform CLI
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/cross-chain/skills/axelar-gmpManually: put the files in place
.devin/skills/axelar-gmp/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about axelar-gmp
How to install axelar-gmp in Claude Code?
Run npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-code. The skill will be saved to ~/.claude/skills/axelar-gmp/SKILL.md.
What does the axelar-gmp skill do?
It equips the agent with implementation patterns for Hedera and EVM contract messaging using the Axelar Gateway, Gas Service, and HSS precompiles.
How does Axelar GMP identify target networks?
Axelar relies on exact string IDs like "hedera" or "ethereum-sepolia". Supplying standard EVM numeric IDs breaks message routing.
Source text
SKILL.md · Apache-2.0
---
name: axelar-gmp
description: >
Axelar General Message Passing (GMP) on Hedera. Use when sending or receiving cross-chain
contract calls via Axelar Gateway (callContract, payNativeGasForContractCall), building
AxelarExecutable receivers, wiring Hedera↔EVM destinations, or separating bridge transport
from destination handlers (orchestrated / scheduled flows).
---
# Axelar GMP (Hedera)
**GMP pattern:** encode a payload on the source chain, pay Axelar gas in native token, call the Gateway, then decode and act on the destination behind an allowlisted source.
```text
Source app → BridgeSender (pay gas + gateway.callContract)
→ Axelar relayers
→ AxelarExecutable._execute → Handler
```
On Hedera, orchestration often pairs GMP with **HSS** (`0x16b`) so a contract can self-reschedule and dispatch each cycle. Keep bridge transport behind a thin sender interface so the orchestrator stays bridge-agnostic.
## Quick Reference
| Piece | Role |
| ----- | ---- |
| `IAxelarGateway` | `callContract(destChain, destAddress, payload)` |
| `IAxelarGasService` | `payNativeGasForContractCall{value}` before the gateway call |
| `AxelarExecutable` | Destination base; override `_execute(...)` |
| Chain names | Axelar string IDs — e.g. `"hedera"`, `"ethereum-sepolia"` (not numeric chain IDs) |
| Addresses | EVM string form of the peer contract (checksummed `0x…`) |
See [references/hedera-axelar.md](references/hedera-axelar.md) for chain-name conventions and SDK imports. See [references/examples.md](references/examples.md) for sender / receiver sketches.
## Critical: Gas Then Gateway
Always pay gas **before** `callContract`. Use `msg.value > 0` for relay fees; refund address should be the funded orchestrator (or plan owner), not a random EOA.
```solidity
gasService.payNativeGasForContractCall{ value: msg.value }(
address(this), // sender contract
destinationChain, // Axelar name string
destinationAddress, // receiver 0x… as string
payload,
refundAddress // usually authorizedCaller / orchestrator
);
gateway.callContract(destinationChain, destinationAddress, payload);
```
## Critical: Authorize And Allowlist
| Side | Guard |
| ---- | ----- |
| Source sender | Only `authorizedCaller` (orchestrator) may `send` |
| Destination receiver | Validate `srcChain` + `srcAddress` (case-insensitive) before handling |
| Destination handler | Only the receiver may call business logic (`authorizedCaller`) |
Compare Axelar chain/address strings with a shared lowercase hash — Axelar may vary casing.
```solidity
require(
keccak256(bytes(_toLower(srcChain))) == keccak256(bytes(_toLower(expectedSourceChain))),
"invalid source chain"
);
require(
keccak256(bytes(_toLower(srcAddress))) == keccak256(bytes(_toLower(expectedSourceAddress))),
"invalid source address"
);
```
## Architecture: Split Transport From Business Logic
```text
Source chain Destination chain
───────────────────────────── ─────────────────────────────
Orchestrator ──send──► MessageReceiver (_execute)
│ BridgeSender iface │ Handler iface
BridgeSender Handler (swap / settle / …)
```
1. Deploy **handler** first (no bridge knowledge).
2. Deploy **receiver** with gateway + expected source + handler.
3. Deploy **sender** with gateway + gas service + destination chain/address.
4. Deploy **orchestrator** with sender address; authorize orchestrator on sender.
5. **Wire** after both deploys: set destination on sender; set expected source on receiver.
6. Fund orchestrator (native for Axelar gas) and handler (tokens/capital for destination work).
## Payload Contract
Agree a single ABI encode/decode on both sides. Keep payloads versionable if you evolve fields — mismatched decode bricks the route.
```solidity
bytes memory payload = abi.encode(/* agreed fields… */);
// receiver:
(/* fields… */) = abi.decode(payload, (/* matching types… */));
```
## Hedera Orchestration Hook (HSS)
When the source app schedules itself via HSS (`0x16b`), each cycle should:
1. Enforce interval / plan active
2. Call the bridge sender with native value for Axelar gas
3. Reschedule next expiry with `hasScheduleCapacity` + `scheduleCall` (SUCCESS = `22`)
If scheduling fails, mark a recovery flag and expose a manual reschedule for the plan owner.
## Checklist
- [ ] Gas paid with native value before `callContract`
- [ ] Destination chain name matches Axelar’s ID (string, not numeric chain ID)
- [ ] Peer addresses set after both contracts deploy (wire step)
- [ ] Source allowlist + authorized callers on both ends
- [ ] Payload encode/decode identical
- [ ] Orchestrator funded for relay gas; destination handler funded for work
- [ ] Demo vs production: clarify who owns destination proceeds
## References
- [references/examples.md](references/examples.md) — sender / receiver / allowlist sketches
- [references/hedera-axelar.md](references/hedera-axelar.md) — chain names vs IDs, SDK imports
- [Axelar GMP overview](https://docs.axelar.dev/dev/general-message-passing/overview)
- [axelar-gmp-sdk-solidity](https://github.com/axelarnetwork/axelar-gmp-sdk-solidity)
© hedera-dev · Apache-2.0 · hedera-dev/hedera-skills