Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计提醒

hydra-head九头蛇头

Agent Skill

hydra-head 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

569

周安装

23

GitHub Stars

7

下载量

178
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hydra-head(九头蛇头)
来源仓库:https://github.com/flux-point-studios/cardano-agent-skills
仓库路径:skills/hydra-head
安装命令:
npx skills add https://github.com/flux-point-studios/cardano-agent-skills --skill hydra-head
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/flux-point-studios/cardano-agent-skills --skill hydra-head

简介

hydra-head 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。
  • 通过 npx 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态,注意是否触发联网或文件读写操作。
  • hydra-head 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

hydra-head

This is a guidance skill. Provides best practices and templates. For execution, use hydra-head-operator.

When to use

  • Setting up or operating hydra-node
  • Understanding Hydra Head lifecycle
  • Debugging connectivity or configuration issues

Operating rules (must follow)

  • Confirm network (mainnet/preprod/preview/devnet)
  • Use hydra.family docs as source of truth
  • Never execute—only provide guidance
  • Treat all .sk files as secrets

Docker fallback mode

If hydra-node is not installed locally, use the wrapper script in this skill folder to run hydra-node inside Docker (Hydra upstream recommends Docker images for quickest start).

chmod +x {baseDir}/scripts/hydra-node.sh
{baseDir}/scripts/hydra-node.sh --help
{baseDir}/scripts/hydra-node.sh gen-hydra-key --output-file hydra

For full multi-node Head demos, prefer the hydra.family Docker Compose demo (it's the canonical "known-good" setup).

Key concepts

Key roles

  1. Cardano keys: Identify participant on L1, pay tx fees
  2. Hydra keys: Multi-sign snapshots inside the head

Lifecycle

Init → Commit → Open → [L2 transactions] → Close → Contest → Fanout

Important parameters

  • Contestation period: Safety window for contesting after Close
  • Deposit period: Window for recognizing deposits

Setup guide

1. Generate keys

# Cardano payment keys
cardano-cli conway address key-gen \
  --verification-key-file cardano.vk \
  --signing-key-file cardano.sk

# Hydra keys
hydra-node gen-hydra-key --output-file hydra
# Creates hydra.sk and hydra.vk

chmod 600 *.sk

2. Exchange keys with peers

Each participant needs:

  • Their own cardano.sk and hydra.sk
  • All peers' cardano.vk and hydra.vk

3. Get scripts tx id

# From hydra-node release notes for your network
# Preview: <scripts-tx-id-preview>
# Preprod: <scripts-tx-id-preprod>
# Mainnet: <scripts-tx-id-mainnet>

4. Configure hydra-node

hydra-node run \
  --node-id "alice" \
  --persistence-dir ./hydra-data \
  \
  # Cardano connection (choose one):
  --node-socket /path/to/node.socket \
  --testnet-magic 1 \
  # OR:
  --blockfrost blockfrost.txt \
  \
  # Identity:
  --cardano-signing-key cardano.sk \
  --hydra-signing-key hydra.sk \
  \
  # Peers (repeat for each):
  --cardano-verification-key bob-cardano.vk \
  --hydra-verification-key bob-hydra.vk \
  --peer "bob.example.com:5001" \
  \
  # Protocol:
  --hydra-scripts-tx-id <scripts-tx-id> \
  --contestation-period 120s \
  \
  # API:
  --api-host 0.0.0.0 \
  --api-port 4001 \
  --host 0.0.0.0 \
  --port 5001

Head operations

Open a head

# Via hydra-tui
hydra-tui --connect localhost:4001

# Via API
curl -X POST localhost:4001/init
# Then each party commits
curl -X POST localhost:4001/commit \
  -H "Content-Type: application/json" \
  -d '{"utxo": {...}}'

L2 transactions

# Submit transaction
curl -X POST localhost:4001/submit \
  -H "Content-Type: application/json" \
  -d '{"transaction": "..."}'

Close and fanout

curl -X POST localhost:4001/close
# Wait for contestation period
curl -X POST localhost:4001/fanout

Examples

Example: 2-party head on preprod

User request: "Set up a 2-party Hydra head on preprod"

Response:

# === Party 1 (Alice) ===

# 1. Create directory
mkdir -p ~/hydra/alice && cd ~/hydra/alice

# 2. Generate keys
cardano-cli conway address key-gen \
  --verification-key-file cardano.vk \
  --signing-key-file cardano.sk

hydra-node gen-hydra-key --output-file hydra
chmod 600 *.sk

# 3. Get preprod scripts tx id from release notes
SCRIPTS_TX_ID="..."

# 4. Exchange keys with Bob (get bob-cardano.vk, bob-hydra.vk)

# 5. Run node
hydra-node run \
  --node-id "alice" \
  --persistence-dir ./data \
  --node-socket $CARDANO_NODE_SOCKET_PATH \
  --testnet-magic 1 \
  --cardano-signing-key cardano.sk \
  --hydra-signing-key hydra.sk \
  --cardano-verification-key bob-cardano.vk \
  --hydra-verification-key bob-hydra.vk \
  --peer "bob-host:5001" \
  --hydra-scripts-tx-id $SCRIPTS_TX_ID \
  --contestation-period 120s \
  --api-port 4001 \
  --port 5001

# === After both nodes running ===

# 6. Init head (either party)
curl -X POST localhost:4001/init

# 7. Commit funds
hydra-tui --connect localhost:4001
# Select UTxO to commit

# 8. Head opens when all commit

Verification checklist

  • All nodes same hydra-node version
  • Scripts tx id matches network
  • cardano-node fully synced and socket ready
  • All peers exchanged correct vkeys
  • PeerConnected messages in logs
  • Network ports open between peers

Common issues

See hydra-head-troubleshooter skill for:

  • "No head observed"
  • "Head doesn't make progress"
  • "Peer out of sync"
  • AckSn/PeerConnected issues

Safety / key handling

  • Never share .sk files
  • Keep separate directories per participant
  • Test on devnet/preprod first
  • Back up persistence directory

References

  • shared/PRINCIPLES.md
  • hydra-head-operator (for execution)
  • hydra-head-troubleshooter (for debugging)
  • See reference/sources.md for doc provenance

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

30.6%
按下载量换算54

Codex

24.04%
按下载量换算43

Claude Code

18.93%
按下载量换算34

windsurf

11.4%
按下载量换算20

Cursor

7.77%
按下载量换算14

Gemini CLI

3.46%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills