Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ node_modules/

stash
docs-audit.md
docs-audit.txt
docs-audit.txt
docs-anchor.json
product-docs.json
tabs-docs.json
5 changes: 5 additions & 0 deletions .mintlifyignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
node_modules/
ai-tools/skills/
ai-tools/prompts/
ai-tools/.claude-plugin/
ai-tools/scripts/
ai-tools/README.md
225 changes: 225 additions & 0 deletions ai-tools/guide.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
---
title: "AI Tools Guide"
description: "Guidance to AI tools when working with ZK Compression. Includes Agent Skill, MCP server, DeepWiki, and AI Search guides."
---

# For Docs

- **Docs AI Search** - Search documentation with AI in the search bar.
- **Markdown Export** - Append `.md` to any page URL for raw markdown.
* **View [`/llms.txt`](https://zkcompression.com/llms.txt)** for an index of the docs - It lists key pages with descriptions
so agents can navigate to answers quickly.

# For Development

## Agent Skills

View or install [`/skill.md`](https://zkcompression.com/skill.md), a structured capability file that tells agents what they can do
with Light Protocol and ZK Compression. If you're building with agents, start here.

```bash
npx skills add https://zkcompression.com
```

Install or view dedicated agent skills:

| Use case | Skill |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| Build DeFi programs (AMMs, vaults, lending) with Anchor or Pinocchio | [defi-program](https://github.com/Lightprotocol/skills/tree/main/skills/defi-program) |
| Integrate rent-free markets into routers and aggregators | [defi-router](https://github.com/Lightprotocol/skills/tree/main/skills/defi-router) |
| Stream account state via Laserstream gRPC | [data-streaming](https://github.com/Lightprotocol/skills/tree/main/skills/data-streaming) |
| Wallets and payment flows with light-token. Includes privy, wallet adapter, mobile wallet adapter signing. Optional nullifier to prevent your onchain instruction from being executed more than once. | [payments-and-wallets](https://github.com/Lightprotocol/skills/tree/main/skills/payments-and-wallets) |
| Airdrops, DePIN, token distribution | [airdrop](https://github.com/Lightprotocol/skills/tree/main/skills/airdrop) |
| Anti-double-spend nullifiers for Privacy-preserving ZK programs | [zk-nullifier](https://github.com/Lightprotocol/skills/tree/main/skills/zk-nullifier) |
| Testing programs and clients on localnet, devnet, mainnet | [testing](https://github.com/Lightprotocol/skills/tree/main/skills/testing) |
| Help with Debugging and Questions via DeepWiki MCP | [ask-mcp](https://github.com/Lightprotocol/skills/tree/main/skills/ask-mcp) |

> View all skills here: https://github.com/Lightprotocol/skills.

All skills are included and are auto-discovered based on context. Ask about light-token, defi, payments, or program migration and the agent uses the relevant skill automatically.

<Tabs>
<Tab title="Claude Code">
Add the marketplace and install:

```
/plugin marketplace add Lightprotocol/skills
/plugin install solana-rent-free-dev
```
</Tab>
<Tab title="Cursor">
1. Open Settings (**Cmd+Shift+J** / **Ctrl+Shift+J**)
2. Navigate to **Rules & Commands** → **Project Rules** → **Add Rule** → **Remote Rule (GitHub)**
3. Enter: `https://github.com/Lightprotocol/skills.git`

</Tab>
<Tab title="Any Agent">
```
npx skills add Lightprotocol/skills
```
</Tab>
</Tabs>

## MCP

The Model Context Protocol (MCP) is an open standard to connect AI apps to data sources and tools. The DeepWiki MCP server provides access to the Light Protocol repository with its search capabilities (AskDevin).

### Installation

<Tabs>
<Tab title="Claude Code">

```bash
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp
claude mcp add -s user -t http zkcompression https://www.zkcompression.com/mcp
```

<Tip>
**We recommend to create a command** that includes the tools listed below. <br /> Simply **copy paste this snippet**.
</Tip>

```markdown expandable
---
argument-hint: <question>
description: Query Light Protocol repository and Solana resources via DeepWiki MCP for precise technical answers and help with debugging
allowed-tools: mcp__deepwiki__*
---

# /ask-deepwiki

Answer: $ARGUMENTS

Use DeepWiki MCP to provide precise technical answers.

## Step 1: Identify Repository Scope

1. **State understanding and plan**

2. **If question is vague, ask for clarification:**
- What specific component or feature?
- What problem are you solving?
- What level of detail needed (overview vs implementation)?

3. **Repository mapping:**
- ZK Compression/Light Protocol: `Lightprotocol/light-protocol`
- Solana fundamentals: `solana-labs/solana`
- Anchor framework: `solana-foundation/anchor`
- Complex questions: Query multiple repositories

4. **Refine question to use:**
- Exact component names: `CompressedAccountMeta` not "account metadata"
- Specific operations: "verifies proof" not "handles proof"
- Concrete function names or error messages when available

## Step 2: Query DeepWiki

For the identified repository, call in sequence:

1. `mcp__deepwiki__read_wiki_structure("repo-owner/repo-name")`
2. `mcp__deepwiki__read_wiki_contents("repo-owner/repo-name")`
3. `mcp__deepwiki__ask_question("repo-owner/repo-name", refined_question)`

Query multiple repositories if question spans different systems.

## Step 3: Format Response

**Structure:**
1. Direct answer with technical explanation
2. Specific implementations and data structures
3. Code examples with inline comments
4. Source references (`file:line` from DeepWiki)
5. Related concepts if relevant

**Language precision:**

NEVER use vague verbs:
- "handles", "manages", "processes", "enables", "provides"

ALWAYS use exact names:
- Functions: `LightAccount::new_init()`, `derive_address()`
- Types: `CompressedAccountMeta`, `ValidityProof`, `PackedAddressTreeInfo`
- Operations: "nullifies hash", "appends to state tree", "verifies proof"
- Fields: `tree_info`, `address`, `output_state_tree_index`

Include `file:line` references from DeepWiki responses.

## Notes

- Always include source file references from DeepWiki responses
- Provide runnable code examples for implementation questions
- Ask follow-up questions to DeepWiki for clarification when needed
```

</Tab>

<Tab title="Codex">

```bash
codex mcp add zkcompression -- npx -y mcp-remote@latest https://www.zkcompression.com/mcp
codex mcp add deepwiki -- npx -y mcp-remote@latest https://mcp.deepwiki.com/mcp
```

</Tab>

<Tab title="Most Clients (Windsurf, Cursor, ...)">
```json
{
"mcpServers": {
"deepwiki": {
"serverUrl": "https://mcp.deepwiki.com/sse"
},
"zkcompression": {
"command": "npx",
"args": ["-y", "mcp-remote@latest", "https://www.zkcompression.com/mcp"]
}
}
}
```
</Tab>
</Tabs>

### DeepWiki MCP-Tools

- **read\_wiki\_structure** - Get a list of documentation topics for a GitHub repository

```bash
mcp__deepwiki__read_wiki_structure("Lightprotocol/light-protocol")
```

- **read\_wiki\_contents** - View documentation about a GitHub repository

```bash
mcp__deepwiki__read_wiki_contents("Lightprotocol/light-protocol")
```

- **ask\_question** - Ask any question about the GitHub repository and get a context-grounded response

```bash
mcp__deepwiki__ask_question("Lightprotocol/light-protocol", "your question")
```

<Tip>
You can specify any public GitHub repo that is indexed with DeepWiki. When you connect to the MCP, you specify the repository when calling the tools. Learn more [here](https://docs.devin.ai/work-with-devin/deepwiki-mcp).
</Tip>

<div style={{ display: 'flex', alignItems: 'center', gap: '0.5em' }}>
<h3 style={{ margin: 0 }}>Alternative: DeepWiki Web</h3>
<a href="https://deepwiki.com/Lightprotocol/light-protocol" style={{ margin: 0 }}>
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" style={{ marginTop: 0, marginBottom: 0, verticalAlign: 'middle' }} />
</a>
</div>

If you don't have the MCP installed we recommend to use AskDevin in your browser.

<Frame>
<iframe
width="100%"
height="420"
src="https://drive.google.com/file/d/1irbZC4NpSE6F1XctIel0yXyVmwvRsjaU/preview"
title="DeepWiki Video"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe>
</Frame>
149 changes: 0 additions & 149 deletions ai-tools/skills/airdrop/SKILL.md

This file was deleted.

Loading