scaffold-project
Skill15 starsChanged 58 days agoMITView on GitHub
- Category: chain - SDK: ethers 6.13.1, @0gfoundation/0g-storage-ts-sdk ^1.2.12, @0gfoundation/0g-compute-ts-sdk ^0.9.0 - Activation Triggers: "new project", "scaffold", "initialize", "create 0G app", "setup project" Initialize a new 0G dApp project with the correct SDK versions, TypeScript configuration, environment setup, and boilerplate code for storage, compute, and/or chain interactions.
- Reads credentials
- Installs packages
11 other projects use a version of this.
Adopted by
Most recently taken up by
- mxrsv/agents-skillstheir own version, first seen Nov 1, 2026
- ankit4479/outbound-builder-plugintheir own version, first seen Oct 20, 2026
- MartinKChen/harness-claude-codetheir own version, first seen Oct 20, 2026
- navjyotnishant/nj-agentstheir own version, first seen Oct 15, 2026
- plugin87/ux-ui-agent-skillstheir own version, first seen Oct 13, 2026
- tejastn10/workbenchtheir own version, first seen Oct 13, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- plugin87/ux-ui-agent-skills★ 3.1ksame name
- sendaifun/solana-new★ 178same name
- faizkhairi/claude-code-blueprint★ 73same name
- cardano-foundation/cardano-dev-skills★ 38same name
- eldermoraes/quarkus-agentic-scaffolding★ 27same name
- mxrsv/agents-skills★ 11same name
- navjyotnishant/nj-agents★ 1same name
- tejastn10/workbench★ 1same name
- ankit4479/outbound-builder-plugin★ 0same name
- MartinKChen/harness-claude-code★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-accountsSkill
- agent-reputationSkill
- deploy-agentSkill
- interact-agentSkill
- manage-agentSkill
- deploy-contractSkill
- interact-contractSkill
- account-managementSkill
- embeddingsSkill
- fine-tuningSkill
- image-editingSkill
- provider-discoverySkill
- speech-to-textSkill
- streaming-chatSkill
- text-to-imageSkill
- video-generationSkill
- compute-plus-storageSkill
- storage-plus-chainSkill
- 0g-pc-setupSkill
- 0g-pc-switch-modelSkill
- 0g-pc-uninstallSkill
- download-fileSkill
- merkle-verificationSkill
- upload-fileSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Create project directory and initialize npm
- Very specific: line 25
Create .env template and .gitignore
- Distinctive: line 26
Create boilerplate source files
- Distinctive: line 33
Use ethers v6 (6.13.1), never v5
- Very specific: line 34
Use evmVersion: "cancun" for Hardhat/Foundry configs
- Very specific: line 35
Create .env with placeholder values (never real keys)
- Very specific: line 36
Add .env to .gitignore
- Very specific: line 37
Use dotenv/config for environment variable loading
- Distinctive: line 44
Use CommonJS — prefer ES modules with TypeScript
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scaffold 0G Project
Metadata
- Category: chain
- SDK:
ethers6.13.1,@0gfoundation/0g-storage-ts-sdk^1.2.12,@0gfoundation/0g-compute-ts-sdk^0.9.0 - Activation Triggers: "new project", "scaffold", "initialize", "create 0G app", "setup project"
Purpose
Initialize a new 0G dApp project with the correct SDK versions, TypeScript configuration, environment setup, and boilerplate code for storage, compute, and/or chain interactions.
Prerequisites
- Node.js >= 18
- npm or pnpm
Quick Workflow
- Create project directory and initialize npm
- Install dependencies based on project type
- Configure TypeScript
- Create
.envtemplate and.gitignore - Create boilerplate source files
- Initialize git repository
Core Rules
ALWAYS
- Use ethers v6 (6.13.1), never v5
- Use
evmVersion: "cancun"for Hardhat/Foundry configs - Create
.envwith placeholder values (never real keys) - Add
.envto.gitignore - Use
dotenv/configfor environment variable loading
NEVER
- Install ethers v5
- Hardcode private keys in boilerplate
- Skip
.gitignorecreation - Use CommonJS — prefer ES modules with TypeScript
Code Examples
Full-Stack 0G Project
# Create and initialize project
mkdir my-0g-app && cd my-0g-app
npm init -y
# Install all 0G SDKs
npm install @0gfoundation/0g-storage-ts-sdk @0gfoundation/0g-compute-ts-sdk ethers dotenv
# Install dev dependencies
npm install -D typescript tsx @types/nodetsconfig.json
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"strict": true,
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"resolveJsonModule": true,
"skipLibCheck": true
},
"include": ["src/**/*"]
}.env
# Network
RPC_URL=https://evmrpc-testnet.0g.ai
CHAIN_ID=16602
# Wallet (NEVER commit real keys)
PRIVATE_KEY=your_private_key_here
# Storage
STORAGE_INDEXER=https://indexer-storage-testnet-turbo.0g.ai
# Compute
PROVIDER_ADDRESS=your_provider_address.gitignore
node_modules/
dist/
.env
.env.local
.env.*.local
*.logpackage.json scripts
{
"scripts": {
"build": "tsc",
"start": "tsx src/index.ts",
"dev": "tsx watch src/index.ts"
}
}Storage-Only Project
npm install @0gfoundation/0g-storage-ts-sdk ethers dotenv
npm install -D typescript tsx @types/node// src/index.ts
import { ZgFile, Indexer } from '@0gfoundation/0g-storage-ts-sdk';
import { ethers } from 'ethers';
import 'dotenv/config';
async function main() {
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
const indexer = new Indexer(process.env.STORAGE_INDEXER!);
console.log('0G Storage client initialized');
console.log('Wallet:', wallet.address);
}
main().catch(console.error);Compute-Only Project
npm install @0gfoundation/0g-compute-ts-sdk ethers dotenv
npm install -D typescript tsx @types/node// src/index.ts
import { ethers } from 'ethers';
import { createZGComputeNetworkBroker } from '@0gfoundation/0g-compute-ts-sdk';
import 'dotenv/config';
async function main() {
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
const broker = await createZGComputeNetworkBroker(wallet);
console.log('0G Compute broker initialized');
const services = await broker.inference.listService();
console.log(`Available services: ${services.length}`);
}
main().catch(console.error);Hardhat Smart Contract Project
mkdir my-0g-contracts && cd my-0g-contracts
npm init -y
npm install -D hardhat @nomicfoundation/hardhat-toolbox dotenv typescript tsx
npx hardhat init # Choose TypeScript project// hardhat.config.ts
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import 'dotenv/config';
const config: HardhatUserConfig = {
solidity: {
version: '0.8.24',
settings: {
optimizer: { enabled: true, runs: 200 },
evmVersion: 'cancun', // REQUIRED for 0G Chain
},
},
networks: {
'0g-testnet': {
url: 'https://evmrpc-testnet.0g.ai',
chainId: 16602,
accounts: [process.env.PRIVATE_KEY!],
},
'0g-mainnet': {
url: 'https://evmrpc.0g.ai',
chainId: 16661,
accounts: [process.env.PRIVATE_KEY!],
},
},
};
export default config;Project Type Reference
| Project Type | Dependencies | Use Case |
| Full-Stack | All 3 SDKs | Complete dApp |
| Storage Only | @0gfoundation/0g-storage-ts-sdk, ethers | File/KV storage |
| Compute Only | @0gfoundation/0g-compute-ts-sdk, ethers | AI inference |
| Smart Contracts | hardhat, toolbox, ethers | On-chain logic |
Anti-Patterns
# BAD: Installing ethers v5
npm install ethers@5 # WRONG — use v6
# BAD: Missing evmVersion in Hardhat config
# solidity: { version: "0.8.24" } # Missing evmVersion: "cancun"// BAD: Hardcoded credentials in boilerplate
const wallet = new ethers.Wallet('0xabc...', provider);
// BAD: ethers v5 pattern
import { providers } from 'ethers'; // v5 pattern!Common Errors & Fixes
| Error | Cause | Fix |
Cannot find module | Dependencies not installed | Run npm install |
invalid opcode | Wrong evmVersion | Set evmVersion: "cancun" |
PRIVATE_KEY not set | Missing .env file | Create .env with credentials |
ethers v5 import error | Wrong ethers version | npm install ethers@6.13.1 |
Related Skills
- Deploy Contract — deploy after scaffolding
- Upload File — storage operations
- Streaming Chat — compute operations
References
- Network Config
- Chain Patterns
- Security Patterns
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

