docs(genlayer-cli): add Bradbury testnet faucet link#6
docs(genlayer-cli): add Bradbury testnet faucet link#6acastellana wants to merge 4 commits intogenlayerlabs:mainfrom
Conversation
- All patterns test-verified (u256 arithmetic, nested collections, address handling, validator result types, run_nondet_unsafe vs run_nondet) - _parse_llm_json helper included verbatim (handles dict/str/markdown fence) - Equivalence principle: 4 patterns with clear when-to-use guidance - Error prefix convention ([EXPECTED]/[EXTERNAL]/[TRANSIENT]) - Testing section: validator agree/disagree examples, run_validator() usage - Reference index: 13 URLs covering all major docs/SDK pages - Removed unverified patterns; leaner overall (~230 lines vs prior)
…, EVM interop patterns
Add the official Testnet Bradbury faucet URL to the network configuration section of the genlayer-cli skill, co-located with the testnet-bradbury network setup commands. Faucet: https://testnet-faucet.genlayer.foundation/
📝 WalkthroughWalkthroughTwo SKILL.md documentation files were updated. The genlayer-cli file received a minor addition documenting the Testnet Bradbury faucet URL. The write-contract file underwent comprehensive restructuring, transitioning from narrative guidance to a detailed, pattern-based implementation guide with new sections covering storage types, decorators, error handling, and best practices. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugins/genlayer-dev/skills/genlayer-cli/SKILL.md`:
- Around line 32-34: The repository's genlayer-cli skill is missing the required
machine-readable metadata files (skill.yaml, validations.yaml, sharp-edges.yaml,
collaboration.yaml) and the SKILL.md faucet instruction ("Testnet Bradbury
faucet") lacks a synchronized procedure in skill.yaml; add a skill.yaml that
declares a "get_testnet_gen" or similarly named procedure matching the SKILL.md
faucet steps (description, inputs, outputs, steps, and any CLI/URL used), create
validations.yaml to validate inputs/outputs for that procedure, add
sharp-edges.yaml documenting known limitations/risks for the faucet flow, and
add collaboration.yaml describing expected collaborators/owners; ensure names
match the SKILL.md wording so the human docs and machine-readable procedure stay
in sync (reference SKILL.md faucet text and the new procedure id like
get_testnet_gen).
In `@plugins/genlayer-dev/skills/write-contract/SKILL.md`:
- Around line 399-402: The fenced code block containing the example calls to
search_docs(library="genlayer-docs", query="<topic>") and
search_docs(library="genlayer-sdk", query="<topic>") needs a language tag to
satisfy markdown linting; update that triple-backtick fence in SKILL.md to
include a language (e.g., ```text) so the block reads ```text ... ``` to ensure
consistent markdown linting and formatting.
- Around line 251-258: The guidance text and example conflict: the paragraph
says "no web fetching" but the example calls gl.nondet.web.get; update them to
be consistent by either removing the web fetch from the example (replace the
lambda with a static/local input or a previously fetched value) or by amending
the guidance to explicitly allow web fetching when its output is verifiable (and
add the necessary caveat). Locate the example using
gl.eq_principle.prompt_non_comparative and the web call gl.nondet.web.get and
apply the chosen fix so the guidance and example match.
- Around line 9-10: SKILL.md describes the write-contract procedure but the
machine-readable companion files are missing; create a skill.yaml and the
supporting validations.yaml, sharp-edges.yaml, and collaboration.yaml in the
same directory so the procedure is fully specified. Ensure skill.yaml encodes
the same procedure name/description, inputs, outputs, tools, storage patterns,
decorators, and error-handling logic found in SKILL.md (match symbols/sections
used in SKILL.md), and populate validations.yaml, sharp-edges.yaml, and
collaboration.yaml with the corresponding validation rules, edge-case notes, and
collaboration expectations reflected in SKILL.md; use the complete skill
structure from existing examples (commit, pr-create) as a template and mirror
the same filenames and keys so genlayer-cli and
genlayer-dev/skills/write-contract stay in sync.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 45741ccb-e828-453d-9014-01795db3fee7
📒 Files selected for processing (2)
plugins/genlayer-dev/skills/genlayer-cli/SKILL.mdplugins/genlayer-dev/skills/write-contract/SKILL.md
| **Testnet Bradbury faucet** (get free testnet GEN): | ||
| https://testnet-faucet.genlayer.foundation/ | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify skill.yaml exists and inspect relevant sections
cat plugins/genlayer-dev/skills/genlayer-cli/skill.yaml | sed -n '1,260p'
# Compare network/faucet-related wording between SKILL.md and skill.yaml
rg -n "testnet-bradbury|faucet|network" \
plugins/genlayer-dev/skills/genlayer-cli/SKILL.md \
plugins/genlayer-dev/skills/genlayer-cli/skill.yamlRepository: genlayerlabs/skills
Length of output: 146
🏁 Script executed:
# Find SKILL.md files for genlayer-cli
fd -type f -name "SKILL.md" | grep -i genlayer-cli
# Find skill.yaml files for genlayer-cli
fd -type f -name "skill.yaml" | grep -i genlayer-cliRepository: genlayerlabs/skills
Length of output: 404
🏁 Script executed:
# Find all SKILL.md files in the repository
fd SKILL.md | head -20
# Find all skill.yaml files in the repository
fd skill.yaml | head -20
# List the structure under skills directory
ls -la plugins/genlayer-dev/skills/ 2>/dev/null || ls -la skills/ 2>/dev/null || fd -type d genlayer-cliRepository: genlayerlabs/skills
Length of output: 883
🏁 Script executed:
# Check what files exist in the genlayer-cli skill directory
ls -la plugins/genlayer-dev/skills/genlayer-cli/
# Read the SKILL.md file around lines 32-34
echo "=== SKILL.md lines 25-40 ==="
sed -n '25,40p' plugins/genlayer-dev/skills/genlayer-cli/SKILL.md
# Check if skill.yaml exists for genlayer-cli
test -f plugins/genlayer-dev/skills/genlayer-cli/skill.yaml && echo "skill.yaml EXISTS" || echo "skill.yaml NOT FOUND"Repository: genlayerlabs/skills
Length of output: 817
🏁 Script executed:
# Check what files should be in a skill directory per the learnings
echo "=== Files in genlayer-cli directory ==="
ls -la plugins/genlayer-dev/skills/genlayer-cli/
# Check what files exist in another skill for comparison (genlayernode has skill.yaml)
echo ""
echo "=== Files in genlayernode directory (for comparison) ==="
ls -la plugins/genlayernode/skills/genlayernode/
# List expected files per the coding guidelines
echo ""
echo "=== Expected files per coding guidelines ==="
echo "SKILL.md, skill.yaml, validations.yaml, sharp-edges.yaml, collaboration.yaml"Repository: genlayerlabs/skills
Length of output: 1328
Create skill.yaml for genlayer-cli skill with machine-readable procedure definition.
The genlayer-cli skill directory is missing all required supporting files including skill.yaml, validations.yaml, sharp-edges.yaml, and collaboration.yaml. Per coding guidelines, each skill must contain these files in addition to SKILL.md. The faucet guidance in SKILL.md (lines 32-34) needs a corresponding machine-readable procedure definition in skill.yaml that stays synchronized with the documentation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/genlayer-dev/skills/genlayer-cli/SKILL.md` around lines 32 - 34, The
repository's genlayer-cli skill is missing the required machine-readable
metadata files (skill.yaml, validations.yaml, sharp-edges.yaml,
collaboration.yaml) and the SKILL.md faucet instruction ("Testnet Bradbury
faucet") lacks a synchronized procedure in skill.yaml; add a skill.yaml that
declares a "get_testnet_gen" or similarly named procedure matching the SKILL.md
faucet steps (description, inputs, outputs, steps, and any CLI/URL used), create
validations.yaml to validate inputs/outputs for that procedure, add
sharp-edges.yaml documenting known limitations/risks for the faucet flow, and
add collaboration.yaml describing expected collaborators/owners; ensure names
match the SKILL.md wording so the human docs and machine-readable procedure stay
in sync (reference SKILL.md faucet text and the new procedure id like
get_testnet_gen).
| - mcp__genlayer-docs__search_docs | ||
| - mcp__genlayer-docs__fetch_url |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect machine-readable skill definition
cat plugins/genlayer-dev/skills/write-contract/skill.yaml | sed -n '1,320p'
# Compare key concepts/tools between SKILL.md and skill.yaml
rg -n "allowed-tools|mcp__genlayer-docs__search_docs|mcp__genlayer-docs__fetch_url|equivalence|run_nondet|storage|error" \
plugins/genlayer-dev/skills/write-contract/SKILL.md \
plugins/genlayer-dev/skills/write-contract/skill.yamlRepository: genlayerlabs/skills
Length of output: 148
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find write-contract skill directory and its files
fd -t d "write-contract" --search-path . | head -20
# Also search for any SKILL.md and skill.yaml files in skills directories
echo "=== Searching for SKILL.md files ==="
fd "SKILL\.md" --search-path . | grep -i write-contract || echo "No SKILL.md found for write-contract"
echo "=== Searching for skill.yaml files ==="
fd "skill\.yaml" --search-path . | grep -i write-contract || echo "No skill.yaml found for write-contract"
# Check the structure of skills directory
echo "=== Skills directory structure ==="
find . -type d -name "skills" | head -5 | xargs -I {} find {} -maxdepth 2 -type d | head -30Repository: genlayerlabs/skills
Length of output: 813
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# List all files in write-contract directory
echo "=== Files in write-contract skill directory ==="
ls -la ./plugins/genlayer-dev/skills/write-contract/ || echo "Directory not found"
# Check file sizes to understand what to read
echo "=== File details ==="
wc -l ./plugins/genlayer-dev/skills/write-contract/SKILL.md
# Read the SKILL.md file
echo "=== SKILL.md content ==="
cat -n ./plugins/genlayer-dev/skills/write-contract/SKILL.mdRepository: genlayerlabs/skills
Length of output: 17390
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check files in a reference skill directory to understand structure
echo "=== Reference skill (commit) files ==="
ls -la ./.claude/skills/commit/ 2>/dev/null || echo "commit skill not found"
echo "=== Reference skill (pr-create) files ==="
ls -la ./.claude/skills/pr-create/ 2>/dev/null || echo "pr-create skill not found"
echo "=== Reference skill (genlayer-cli) files ==="
ls -la ./plugins/genlayer-dev/skills/genlayer-cli/ 2>/dev/null || echo "genlayer-cli skill not found"
# Check if write-contract is a new addition
echo "=== Checking git status for write-contract ==="
git -C . ls-files plugins/genlayer-dev/skills/write-contract/ 2>/dev/null || echo "Not in git"
# Count skill files across the repository
echo "=== Summary: skill.yaml files in skills directories ==="
find ./plugins -name "skill.yaml" -o -name "SKILL.md" 2>/dev/null | sortRepository: genlayerlabs/skills
Length of output: 1750
Create missing skill.yaml with machine-readable procedure definition — SKILL.md requires supporting files.
The write-contract skill is incomplete. Per coding guidelines, SKILL.md and skill.yaml must be kept in sync describing the same procedure. Currently only SKILL.md exists (427 lines with tools, storage patterns, decorators, equivalence principles, error handling). The corresponding skill.yaml and supporting files (validations.yaml, sharp-edges.yaml, collaboration.yaml) are missing.
Reference complete skills (commit, pr-create) contain all five files. See genlayer-cli which exhibits the same incompleteness.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/genlayer-dev/skills/write-contract/SKILL.md` around lines 9 - 10,
SKILL.md describes the write-contract procedure but the machine-readable
companion files are missing; create a skill.yaml and the supporting
validations.yaml, sharp-edges.yaml, and collaboration.yaml in the same directory
so the procedure is fully specified. Ensure skill.yaml encodes the same
procedure name/description, inputs, outputs, tools, storage patterns,
decorators, and error-handling logic found in SKILL.md (match symbols/sections
used in SKILL.md), and populate validations.yaml, sharp-edges.yaml, and
collaboration.yaml with the corresponding validation rules, edge-case notes, and
collaboration expectations reflected in SKILL.md; use the complete skill
structure from existing examples (commit, pr-create) as a template and mirror
the same filenames and keys so genlayer-cli and
genlayer-dev/skills/write-contract stay in sync.
| Validators judge the leader's output against criteria without re-running the task. Use **only** for open-ended tasks with no web fetching (validators can't verify fetched data): | ||
|
|
||
| ```python | ||
| result = gl.nondet.exec_prompt(task, response_format="json") | ||
| result = gl.eq_principle.prompt_non_comparative( | ||
| lambda: gl.nondet.web.get(url).body.decode(), | ||
| task="Summarize in 2-3 sentences", | ||
| criteria="Must capture the main point. Must be 2-3 sentences.", | ||
| ) |
There was a problem hiding this comment.
Pattern 4 guidance contradicts its own example.
Line 251 says this pattern should be used with no web fetching, but Line 255 directly fetches from the web. This is misleading for contract authors and should be made consistent.
Suggested doc fix
-### Pattern 4 — Non-Comparative
-
-Validators judge the leader's output against criteria without re-running the task. Use **only** for open-ended tasks with no web fetching (validators can't verify fetched data):
+### Pattern 4 — Non-Comparative
+
+Validators judge the leader's output against criteria without re-running the task. Use this only for open-ended tasks where approximate quality checks are acceptable.
@@
-result = gl.eq_principle.prompt_non_comparative(
- lambda: gl.nondet.web.get(url).body.decode(),
+result = gl.eq_principle.prompt_non_comparative(
+ lambda: pre_fetched_text,
task="Summarize in 2-3 sentences",
criteria="Must capture the main point. Must be 2-3 sentences.",
)
@@
-⚠️ Never use for oracle/price/data contracts — validators only check if output looks reasonable, not if the fetched data is correct.
+⚠️ Never use for oracle/price/data contracts — validators only check if output looks reasonable, not whether external facts are correct.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugins/genlayer-dev/skills/write-contract/SKILL.md` around lines 251 - 258,
The guidance text and example conflict: the paragraph says "no web fetching" but
the example calls gl.nondet.web.get; update them to be consistent by either
removing the web fetch from the example (replace the lambda with a static/local
input or a previously fetched value) or by amending the guidance to explicitly
allow web fetching when its output is verifiable (and add the necessary caveat).
Locate the example using gl.eq_principle.prompt_non_comparative and the web call
gl.nondet.web.get and apply the chosen fix so the guidance and example match.
| ``` | ||
| search_docs(library="genlayer-docs", query="<topic>") | ||
| search_docs(library="genlayer-sdk", query="<topic>") | ||
| ``` |
There was a problem hiding this comment.
Add a language to this fenced code block.
The block at Line 399 should declare a language to satisfy markdown linting consistency.
Suggested doc fix
-```
+```text
search_docs(library="genlayer-docs", query="<topic>")
search_docs(library="genlayer-sdk", query="<topic>")</details>
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>
[warning] 399-399: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In @plugins/genlayer-dev/skills/write-contract/SKILL.md around lines 399 - 402,
The fenced code block containing the example calls to
search_docs(library="genlayer-docs", query="") and
search_docs(library="genlayer-sdk", query="") needs a language tag to
satisfy markdown linting; update that triple-backtick fence in SKILL.md to
include a language (e.g., text) so the block reads text ... ``` to ensure
consistent markdown linting and formatting.
</details>
<!-- fingerprinting:phantom:triton:hawk -->
<!-- This is an auto-generated comment by CodeRabbit -->
Adds the official Testnet Bradbury faucet URL to the network configuration section of the
genlayer-cliskill.Co-located right after the
testnet-bradburynetwork listing so it's easy to find when switching to Bradbury.Faucet: https://testnet-faucet.genlayer.foundation/
Summary by CodeRabbit