Skip to content

Commit b425689

Browse files
Merge branch 'master' into f3/fix-slip-fee-cap
2 parents d9dbe65 + f2f1c26 commit b425689

41 files changed

Lines changed: 376 additions & 427 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/hydration_cl0wdit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../ai_skills/hydration_cl0wdit

.codex/skills/hydration_cl0wdit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../ai_skills/hydration_cl0wdit

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AGENTS.md - hydration-node
2+
3+
This is the Codex entrypoint for the repository.
4+
5+
Follow the project guidance in `CLAUDE.md`; it is the shared repo instruction
6+
file for build, test, style, PR, and domain conventions.
7+
8+
## Shared AI skills
9+
10+
Repo-local AI skills live in `ai_skills/` so they can be used by multiple coding
11+
agents.
12+
13+
When the user invokes a skill by name, or the task clearly matches a skill
14+
description, read the corresponding `ai_skills/<skill-name>/SKILL.md` file and
15+
follow its instructions. Resolve any relative paths in a skill from that skill's
16+
directory.
17+
18+
If a skill references tool names from another agent environment, use the closest
19+
available Codex equivalent:
20+
- `Read` -> file reads such as `sed`, `rg`, or editor context
21+
- `Glob` -> `rg --files` or `find`
22+
- `Grep` -> `rg`
23+
- `Bash` -> shell commands
24+
- `WebFetch` -> web access when available and permitted
25+
- `Agent` -> Codex sub-agents only when the user has explicitly asked for
26+
delegated or parallel agent work
27+
28+
Available shared skills:
29+
- `hydration_cl0wdit` - security audit workflow for Substrate runtime and pallet
30+
code.

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ For Hydration protocol-level context (architecture, products, tokenomics, Omnipo
77

88
It lists available reference documents and their raw GitHub URLs.
99

10+
## Shared AI skills
11+
12+
Repo-local AI skills live in `ai_skills/` so they can be used by multiple coding
13+
agents, not only Claude.
14+
15+
When the user invokes a skill by name, or the task clearly matches a skill
16+
description, load the corresponding `ai_skills/<skill-name>/SKILL.md` file and
17+
follow its instructions. Resolve any relative paths in a skill from that skill's
18+
directory.
19+
20+
Available shared skills:
21+
- `hydration_cl0wdit` - security audit workflow for Substrate runtime and pallet
22+
code.
23+
1024
## Project overview
1125

1226
Substrate-based parachain (Polkadot ecosystem) implementing DeFi protocols — DEX (Omnipool, Stableswap, XYK, LBP), DCA, OTC, bonds, staking, governance, and EVM compatibility.

Cargo.lock

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ allowed-tools: Read, Glob, Grep, WebFetch, Bash, Agent
88

99
You are the orchestrator of a parallelized security audit of a Substrate runtime and/or its pallets.
1010

11+
## Codex compatibility
12+
13+
This skill is shared across agent environments. If you are running in Codex, map the Claude-oriented tool names as follows:
14+
15+
- `Read` -> `sed`, `rg`, or other file-read commands.
16+
- `Glob` -> `rg --files` or `find`.
17+
- `Grep` -> `rg`.
18+
- `Bash` -> `exec_command`.
19+
- `WebFetch` -> the web tool, or `curl` only when shell network access is available.
20+
- `Agent` -> Codex sub-agents, following the active Codex environment policy for agent spawning. If sub-agents are unavailable or disallowed in the current environment, run a reduced local review or ask the user how to proceed.
21+
22+
The banner and four-turn orchestration apply only when the user requests an audit run. They do not apply when the user asks to inspect, update, or explain this skill.
23+
1124
## Mode Selection
1225

1326
**Exclude pattern:** skip directories `tests/`, `benchmarking/`, `mock/` and files matching `*test*.rs`, `*mock*.rs`, `*bench*.rs`.
@@ -18,7 +31,7 @@ You are the orchestrator of a parallelized security audit of a Substrate runtime
1831
**Flags:**
1932

2033
- `--pr <ref>`: Audit a specific pull request. `<ref>` can be a PR number or a full GitHub PR URL. Do NOT use `gh` — fetch PR data via `WebFetch` against the GitHub API (`https://api.github.com/repos/{owner}/{repo}/pulls/{number}/files`). Parse the response for changed `.rs` files.
21-
- `--file-output` (off by default): also write the report to a markdown file (path per `{resolved_path}/report-formatting.md`). Never write a report file unless explicitly passed.
34+
- `--file-output` (off by default): also write the report to a markdown file at the path specified by `{resolved_path}/report-formatting.md`. Never write a report file unless explicitly passed.
2235

2336
## Orchestration
2437

@@ -29,7 +42,7 @@ a. Discover in-scope `.rs` files per mode selection:
2942
- **With `--pr`:** Use `WebFetch` to call `https://api.github.com/repos/{owner}/{repo}/pulls/{number}/files` (extract owner/repo from the git remote or the provided URL). Parse the JSON response for changed `.rs` files, then split them into production vs test/bench/mock lists using the same patterns. Do NOT use `gh`.
3043
b. Glob for `**/references/attack-vectors/substrate-attack-vectors.md` — extract the `references/` directory (two levels up) as `{resolved_path}`
3144
c. Read the local `VERSION` file from the same directory as this skill
32-
d. Bash `curl -sf https://raw.githubusercontent.com/galacticcouncil/hydration-node/main/.claude/skills/hydration_cl0wdit/VERSION`
45+
d. Fetch `https://raw.githubusercontent.com/galacticcouncil/hydration-node/main/ai_skills/hydration_cl0wdit/VERSION` (`Bash curl -sf` in Claude; web tool in Codex when shell network is restricted)
3346
e. Bash `mktemp -d /tmp/audit-XXXXXX` → store as `{bundle_dir}`
3447

3548
If the remote VERSION fetch succeeds and differs from local, print `⚠ hydration_cl0wdit v{local} is outdated — a newer version is available in the repo`. If it fails, skip silently.
@@ -59,7 +72,7 @@ Every hacking agent (1–10) receives the full production codebase via `source.m
5972

6073
Print line counts for every bundle and `source.md`. Do NOT inline file content into agent prompts.
6174

62-
**Turn 3 — Spawn.** In one message, spawn all 11 agents as parallel foreground Agent calls. Prompt template (substitute real values):
75+
**Turn 3 — Spawn.** In one message, spawn all 11 agents as parallel audit workers (Claude: foreground Agent calls; Codex: sub-agents). Prompt template (substitute real values):
6376

6477
```
6578
Your bundle file is {bundle_dir}/agent-N-bundle.md (XXXX lines).

.claude/skills/hydration_cl0wdit/references/attack-vectors/hydration-attack-vectors.md renamed to ai_skills/hydration_cl0wdit/references/attack-vectors/hydration-attack-vectors.md

File renamed without changes.

.claude/skills/hydration_cl0wdit/references/attack-vectors/substrate-attack-vectors-1.md renamed to ai_skills/hydration_cl0wdit/references/attack-vectors/substrate-attack-vectors-1.md

File renamed without changes.

.claude/skills/hydration_cl0wdit/references/attack-vectors/substrate-attack-vectors-2.md renamed to ai_skills/hydration_cl0wdit/references/attack-vectors/substrate-attack-vectors-2.md

File renamed without changes.

0 commit comments

Comments
 (0)