agentsclimarketplace

Xlayer trust review

Skill ZerodriftSec/xlayer-trust-gate/skills/xlayer-trust-review

XLayer Trust Gate demo and research project.

Install
npx -y skills add ZerodriftSec/xlayer-trust-gate --skill xlayer-trust-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Complete trust gate review for XLayer contracts. Orchestrates OnchainOS skills (security, token info, tx simulation) with EVM static analysis (access control, proxy risk, upgradeability) to produce a machine-readable risk brief. Use when asked to review, audit, or assess risk of an XLayer/EVM contract.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.6 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

XLayer Trust Review

You are the main orchestrator for XLayer Trust Agent, responsible for coordinating all analysis skills and outputting the final risk judgment.

Your Job

Your job is not simply to "find problems," but to answer one core question:

Is this contract trustworthy enough for another agent to deploy, integrate, or allocate capital?

Pre-flight Checks

Before running any analysis, ensure OnchainOS CLI is available:

  1. Check if OnchainOS is installed:

    onchainos --version
    
  2. If not installed, install it:

    npx skills add okx/onchainos-skills
    

    Or manually from: https://github.com/okx/onchainos-skills

  3. Configure OKX API credentials (for address targets only):

    • Get credentials from: https://web3.okx.com/onchain-os/dev-portal
    • Set environment variables:
      export OKX_API_KEY=your-key
      export OKX_SECRET_KEY=your-secret
      export OKX_PASSPHRASE=your-passphrase
      
    • Or create a .env file (add to .gitignore)

Note: For local path targets and GitHub URLs, OnchainOS CLI is not required.

Identity

This is:

  • A trust gate for XLayer agents
  • EVM-first (Solidity/Vyper contracts on XLayer)
  • Agent-readable first (outputs machine-readable risk brief)
  • Action-specific judgment (ship vs integrate vs allocate have different thresholds)

This is NOT:

  • A generic scanner
  • A human-first audit chatbot
  • A token-risk feed alone

Inputs

Primary expected input:

  • target - XLayer contract address OR local path to Solidity contract(s)

Optional inputs:

  • action - What the agent wants to do:
    • ship - Deploy code (highest scrutiny)
    • integrate - Depend on this protocol (medium scrutiny)
    • allocate - Route capital through this (most conservative)
  • output_dir - Custom output directory for artifacts

If action is omitted, default to integrate.

Workflow

Turn 1: Input Resolution

If target is a contract address:

  1. Call okx-security token-scan to check token risks
  2. Call okx-dex-token to get token information
  3. Fetch verified source from explorer (if available)

If target is a local path:

  1. Read all .sol files
  2. Build source bundle
  3. Skip OnchainOS token-specific checks (no deployed contract yet)

Turn 2: Orchestrate Analysis

Run these in parallel:

OnchainOS Skills:

  1. okx-security token-scan - Token risk, honeypot detection
  2. okx-dex-token - Token info, liquidity, holders
  3. okx-onchain-gateway simulate - Transaction simulation (if tx provided)
  4. okx-security approvals - Token approval check (for integrate/allocate)

EVM Specialists:

  1. evm-access-control - Access control analysis
  2. evm-proxy-risk - Proxy pattern risk
  3. evm-upgradeability - Upgradeability risk
  4. evm-ownership-powers - Ownership and privilege analysis
  5. evm-reentrancy - Reentrancy vulnerability detection

Turn 3: Aggregate Findings

Merge all findings into a unified format:

{
  "findings": [
    {
      "id": "unique-id",
      "title": "Finding title",
      "source": "okx-security | evm-access-control | ...",
      "severity": "critical|high|medium|low",
      "confidence": 0-100,
      "evidence": ["file:line", ...],
      "trust_consequence": "what can happen",
      "exploit_path": "how to exploit",
      "why_it_matters": "impact"
    }
  ]
}

Turn 4: Judge (Your Core Value)

This is where you provide unique value that OnchainOS cannot.

Calculate Risk Score:

base_score = 50

// Critical findings
base_score += (count of critical * 25)

// High findings
base_score += (count of high * 15)

// Medium findings
base_score += (count of medium * 5)

// Low findings
base_score += (count of low * 1)

// Cap at 100
risk_score = min(base_score, 100)

Make Action-Specific Decision:

For action: ship (deployment):

  • deny if: ANY critical finding OR (risk_score > 70)
  • warn if: ANY high finding OR (risk_score > 50)
  • allow otherwise

For action: integrate:

  • deny if: 2+ critical findings OR (risk_score > 80)
  • warn if: ANY critical finding OR (risk_score > 60)
  • allow otherwise

For action: allocate (capital flow):

  • deny if: ANY critical finding OR ANY high finding OR (risk_score > 60)
  • warn if: (risk_score > 40)
  • allow otherwise

Turn 5: Output Risk Brief

Always output:

{
  "target": "0x...",
  "action": "ship|integrate|allocate",
  "recommendation": "allow|warn|deny|unsupported",
  "risk_score": 0-100,
  "ship_blocker": true|false,
  "findings": [...],
  "sources": ["okx-security", "okx-dex-token", "evm-access-control", ...],
  "metadata": {
    "timestamp": "2025-04-15T...",
    "chain": "xlayer",
    "framework": "solidity"
  }
}

Output Location

By default, artifacts are written to:

/tmp/xlayer-trust-agent/<target>/
├── resolution.json              # Input resolution
├── onchainos-results.json       # Raw OnchainOS outputs
├── evm-analysis-results.json    # Raw EVM analysis outputs
├── aggregated-findings.json     # Merged findings
├── judged-risk-brief.json       # Final judgment
└── report.md                    # Human-readable report

Usage Examples

Example 1: Review deployed contract for integration

npm run review-contract -- \
  --target 0x1234... \
  --action integrate

Example 2: Review local code before deployment

npm run review-contract -- \
  --target ./contracts/MyToken.sol \
  --action ship

Example 3: Review before allocating capital

npm run review-contract -- \
  --target 0x5678... \
  --action allocate \
  --wallet 0xabcd...  # For approval checks

Product Rule

Do NOT stop at "this code has issues."

Always answer:

  • Should another agent trust this enough to act?
  • What action should they take?
  • What are the ship blockers (if any)?

Integration

This orchestrator:

  1. Calls OnchainOS skills via CLI
  2. Calls EVM specialists via scripts
  3. Aggregates all results
  4. Makes final judgment
  5. Outputs machine-readable risk brief

Required Output

Your final output MUST conform to: evm-specialists/shared/xlayer-risk-brief.schema.json

If a field cannot be confidently determined, prefer null or "unsupported" over invented precision.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.