web3-fullstack-systematic-build
Skill này làm gì
Skill này giúp AI agent xây dựng một ứng dụng Web3 phức tạp từng lớp một. Nó dành cho nhà phát triển muốn có ranh giới rõ ràng và các phần có thể kiểm thử.
Khi nào nên dùng
- ✓Khi bạn đang xây dựng ứng dụng Web3 full-stack với hợp đồng thông minh và giao diện.
- ✓Khi bạn muốn giao diện được định nghĩa trước khi bắt đầu triển khai.
- ✓Khi các lỗi công cụ có khả năng xảy ra và công việc vẫn phải tiến triển theo thứ tự.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web3-fullstack-systematic-build/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xây dựng ứng dụng Web3 của tôi từng lớp một, bắt đầu từ cấu trúc thư mục và các giao diện hợp đồng token.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước hết tạo toàn bộ cấu trúc thư mục bằng mkdir -p, rồi định nghĩa các giao diện hợp đồng. Sau đó nó triển khai từng lớp để các phần có thể được kiểm thử từng cái một.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Web3 Full-Stack Systematic Build
This skill provides a structured, layer-by-layer approach to building complex full-stack Web3 applications. Follow this sequence to maintain clarity, reduce coupling, and enable incremental testing even when tool failures occur.
Phase 1: Project Structure
First, establish the complete directory structure before writing any code:
project-name/
├── contracts/
│ ├── interfaces/
│ ├── core/
│ ├── libraries/
│ └── deployment/
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── hooks/
│ │ ├── config/
│ │ └── utils/
│ └── public/
├── scripts/
│ ├── deploy/
│ └── test/
├── zk-circuits/
└── docs/
Action: Create all directories upfront using:
mkdir -p contracts/{interfaces,core,libraries,deployment}
mkdir -p frontend/src/{components,hooks,config,utils}
mkdir -p frontend/public
mkdir -p scripts/{deploy,test}
mkdir -p zk-circuits docs
Phase 2: Interface Contracts First
Define all interface contracts before implementing logic. This establishes clear API boundaries.
Example interface structure:
// contracts/interfaces/IToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IToken {
function transfer(address to, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
}
Actions:
- List all external protocols you'll integrate (e.g., Aave, Connext, Uniswap)
- Create interface files for each protocol's required functions
- Create interfaces for your own contracts' public APIs
- Validate interface completeness before proceeding
Phase 3: Core Contract Implementation
Implement contracts in dependency order, starting with libraries, then core logic.
Order of implementation:
- Libraries - Utility functions with no state dependencies
- Base contracts - Abstract contracts with shared logic
- Core contracts - Main business logic implementing interfaces
- Integration contracts - Contracts that bridge multiple protocols
Example:
// contracts/core/PrivatePool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../interfaces/IToken.sol";
import "../libraries/SafeMath.sol";
contract PrivatePool {
using SafeMath for uint256;
IToken public token;
mapping(address => uint256) private balances;
constructor(address _token) {
token = IToken(_token);
}
function deposit(uint256 amount) external {
token.transferFrom(msg.sender, address(this), amount);
balances[msg.sender] = balances[msg.sender].add(amount);
}
}
Actions:
- Implement one contract at a time
- Compile and test each contract before moving to the next
- Keep contracts focused on single responsibilities
- Document all state variables and functions
Phase 4: Frontend Configuration
Set up frontend infrastructure before building components.
Create these config files first:
- Network configuration (
frontend/src/config/networks.js):
export const networks = {
mainnet: {
chainId: 1,
rpcUrl: process.env.REACT_APP_MAINNET_RPC,
explorer: 'https://etherscan.io'
},
testnet: {
chainId: 5,
rpcUrl: process.env.REACT_APP_TESTNET_RPC,
explorer: 'https://goerli.etherscan.io'
}
};
- Contract addresses (
frontend/src/config/contracts.js):
export const contractAddresses = {
PrivatePool: process.env.REACT_APP_PRIVATE_POOL_ADDRESS,
Token: process.env.REACT_APP_TOKEN_ADDRESS
};
- ABI imports (
frontend/src/config/abis/):
// Import compiled contract ABIs here
import PrivatePoolABI from './PrivatePool.json';
export { PrivatePoolABI };
Actions:
- Create environment variable templates (
.env.example) - Set up Web3 provider configuration (ethers.js, web3.js, or wagmi)
- Configure wallet connection logic
- Create utility functions for common operations
Phase 5: Component Development
Build frontend components in this order:
- Utility components - Buttons, inputs, modals (no Web3 logic)
- Web3 wrapper components - Wallet connection, network switcher
- Contract interaction components - Forms that call contract functions
- Data display components - Components showing on-chain data
- Page components - Assembling everything into pages
Câu hỏi thường gặp
Bước đầu tiên là gì?
Skill tạo toàn bộ cấu trúc thư mục dự án trước khi viết bất kỳ mã nào.
Tại sao định nghĩa giao diện trước?
Giao diện đặt ranh giới API rõ ràng, giảm sự phụ thuộc giữa các lớp.
Có thể kiểm thử từng lớp riêng không?
Có, cách tiếp cận theo lớp nhằm cho phép kiểm thử tăng dần.
Chi tiết
Mô tả gốc của tác giả
Systematic approach to building full-stack Web3 applications layer by layer
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #13029
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.