# Send Lsp28 Grid to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "lsp28-grid",
    "name": "Lsp28 Grid",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/LUKSOAgent/lsp28-grid",
    "canonicalUrl": "https://clawhub.ai/LUKSOAgent/lsp28-grid",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/lsp28-grid",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lsp28-grid",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/lsp28-spec.md",
      "scripts/update-grid.js"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "lsp28-grid",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T03:24:36.687Z",
      "expiresAt": "2026-05-12T03:24:36.687Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lsp28-grid",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lsp28-grid",
        "contentDisposition": "attachment; filename=\"lsp28-grid-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "lsp28-grid"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/lsp28-grid"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/lsp28-grid",
    "downloadUrl": "https://openagent3.xyz/downloads/lsp28-grid",
    "agentUrl": "https://openagent3.xyz/skills/lsp28-grid/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lsp28-grid/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lsp28-grid/agent.md"
  }
}
```
## Documentation

### LSP28 The Grid Skill

Manage LSP28 The Grid on Universal Profiles. Create grid layouts with mini-apps, iframes, and external links.

### 1. Configure Environment

Set these environment variables or edit the scripts:

export UP_PRIVATE_KEY="your_controller_private_key"
export UP_ADDRESS="your_universal_profile_address"
export KEY_MANAGER="your_key_manager_address"

### 2. Update Grid Layout

const { ethers } = require('ethers');

// Grid data structure
const gridData = {
  isEditable: true,
  items: [
    {
      type: 'miniapp',
      id: 'app1',
      title: 'My App',
      backgroundColor: '#1a1a2e',
      textColor: '#ffffff',
      text: 'Click me'
    },
    {
      type: 'iframe',
      src: 'https://example.com/embed',
      id: 'frame1',
      title: 'External Content'
    },
    {
      type: 'external',
      url: 'https://example.com',
      id: 'link1',
      title: 'Visit Site'
    }
  ]
};

// Encode as VerifiableURI
const jsonString = JSON.stringify(gridData);
const base64Data = Buffer.from(jsonString).toString('base64');
const verifiableUri = \`data:application/json;base64,${base64Data}\`;

### 3. Execute Transaction

// LSP28 Grid data key
const LSP28_GRID_KEY = '0x31cf14955c5b0052c1491ec06644438ec7c14454be5eb6cb9ce4e4edef647423';

// Minimal ABIs
const LSP0_ABI = ['function setData(bytes32 dataKey, bytes dataValue) external'];
const LSP6_ABI = ['function execute(bytes calldata payload) external payable returns (bytes memory)'];

// Setup provider and wallet
const provider = new ethers.JsonRpcProvider('https://rpc.mainnet.lukso.network');
const wallet = new ethers.Wallet(process.env.UP_PRIVATE_KEY, provider);

// Encode setData call on UP
const upInterface = new ethers.Interface(LSP0_ABI);
const executeData = upInterface.encodeFunctionData('setData', [
  LSP28_GRID_KEY,
  ethers.toUtf8Bytes(verifiableUri)
]);

// Send via KeyManager
const keyManager = new ethers.Contract(process.env.KEY_MANAGER, LSP6_ABI, wallet);
const tx = await keyManager.execute(executeData);
const receipt = await tx.wait();
console.log('Grid updated in block:', receipt.blockNumber);

### Grid Item Types

Mini-App (type: 'miniapp')

{
  type: 'miniapp',
  id: 'unique-id',          // Required: unique identifier
  title: 'App Title',       // Required: display title
  text: 'Button text',      // Required: button label
  backgroundColor: '#fe005b',  // Required: hex color
  textColor: '#ffffff',     // Required: hex color for text
  size: 'medium'            // Optional: 'small', 'medium', 'large'
}

IFrame (type: 'iframe')

{
  type: 'iframe',
  id: 'unique-id',          // Required: unique identifier
  title: 'Frame Title',     // Required: display title
  src: 'https://example.com/embed'  // Required: iframe URL
}

External Link (type: 'external')

{
  type: 'external',
  id: 'unique-id',          // Required: unique identifier
  title: 'Link Title',      // Required: display title
  url: 'https://example.com'  // Required: external URL
}

### Full Grid Structure

{
  isEditable: true,  // Boolean: allows editing
  items: [
    // Array of grid items (see types above)
  ]
}

### Important Constants

ConstantValueDescriptionLSP28_GRID_KEY0x31cf14955c5b0052c1491ec06644438ec7c14454be5eb6cb9ce4e4edef647423Data key for grid storageChain ID42LUKSO MainnetRPC URLhttps://rpc.mainnet.lukso.networkPublic RPC endpoint

### Color Contrast Requirements

Ensure text is readable on background colors:

BackgroundText ColorResult#1a1a2e (dark)#ffffff (white)Good contrast#ffffff (white)#000000 (black)Good contrast#fe005b (pink)#ffffff (white)Good contrast#000000 (black)#fe005b (pink)Good contrast

### Common Mistakes

❌ Wrong property names:

// WRONG:
{ color: '#fe005b', content: 'Click me' }

// CORRECT:
{ backgroundColor: '#fe005b', text: 'Click me' }

❌ Missing required fields:

All items need: type, id, title
Mini-apps additionally need: text, backgroundColor, textColor

❌ Wrong encoding:

// WRONG - toUtf8String instead of toUtf8Bytes:
setData(key, ethers.toUtf8String(uri))

// CORRECT:
setData(key, ethers.toUtf8Bytes(uri))

### Transaction Flow

Controller Key 
    ↓
KeyManager.execute(payload)
    ↓
UP.setData(LSP28_GRID_KEY, verifiableUri)
    ↓
Grid updated on-chain

### CLI Usage

Use the provided script:

# Use example grid
node scripts/update-grid.js --example

# Load from JSON file
node scripts/update-grid.js --file my-grid.json

### References

references/lsp28-spec.md - Full LSP28 specification
scripts/update-grid.js - Complete working example
LSP28 Standard: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-28-TheGrid.md
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: LUKSOAgent
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T03:24:36.687Z
- Expires at: 2026-05-12T03:24:36.687Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/lsp28-grid)
- [Send to Agent page](https://openagent3.xyz/skills/lsp28-grid/agent)
- [JSON manifest](https://openagent3.xyz/skills/lsp28-grid/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/lsp28-grid/agent.md)
- [Download page](https://openagent3.xyz/downloads/lsp28-grid)