Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)7.8k · #13028

web3-fullstack-packaged-build

Skill này làm gì

Skill này hướng dẫn AI agent xây dựng một ứng dụng Web3 full-stack theo từng lớp rõ ràng, kết thúc bằng một sản phẩm đã đóng gói. Nó dành cho nhà phát triển muốn có một dự án hoàn chỉnh, sẵn sàng phát hành, được xây theo thứ tự cố định.

Khi nào nên dùng

  • ✓Khi bạn bắt đầu một dự án Web3 full-stack với hợp đồng, giao diện và script.
  • ✓Khi bạn muốn dự án được xây theo từng lớp có thể kiểm thử riêng từng lớp.
  • ✓Khi bạn cần dự án hoàn thiện được đóng gói thành sản phẩm giao khi kết thúc.

Liên kết skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web3-fullstack-systematic-build-enhanced/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web3-fullstack-systematic-build-enhanced/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập một dự án Web3 full-stack với hợp đồng, giao diện và script triển khai, xây dựng theo từng lớp, rồi đóng gói ở cuối.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tạo toàn bộ cấu trúc thư mục trước, rồi viết các giao diện hợp đồng trước mọi logic. Nó xây các lớp theo thứ tự và kết thúc bằng giai đoạn đóng gói để tạo ra một sản phẩm hoàn chỉnh.

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 Packaged Build

This skill provides a structured, layer-by-layer approach to building complex full-stack Web3 applications with integrated deliverable packaging. Follow this sequence to maintain clarity, reduce coupling, enable incremental testing, and ensure a complete, shippable artifact is produced 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:

  1. List all external protocols you'll integrate (e.g., Aave, Connext, Uniswap)
  2. Create interface files for each protocol's required functions
  3. Create interfaces for your own contracts' public APIs
  4. Validate interface completeness before proceeding

Phase 3: Core Contract Implementation

Implement contracts in dependency order, starting with libraries, then core logic.

Order of implementation:

  1. Libraries - Utility functions with no state dependencies
  2. Base contracts - Abstract contracts with shared logic
  3. Core contracts - Main business logic implementing interfaces
  4. 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:

  1. Implement one contract at a time
  2. Compile and test each contract before moving to the next
  3. Keep contracts focused on single responsibilities
  4. Document all state variables and functions

Phase 4: Frontend Configuration

Set up frontend infrastructure before building components.

Create these config files first:

  1. 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'
  }
};
  1. 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
};
  1. ABI imports (frontend/src/config/abis/):
// Import compiled contract ABIs here
import PrivatePoolABI from './PrivatePool.json';
export { PrivatePoolABI };

Actions:

  1. Create environment variable templates (.env.example)
  2. Set up Web3 provider configuration (ethers.js, web3.js, or wagmi)
  3. Configure wallet connection logic
  4. Create utility functions for common operations

Phase 5: Component Development

Build frontend components in this order:

  1. Utility components - Buttons, inputs, modals (no Web3 logic)
  2. Web3 wrapper components - Wallet connection, network switcher
  3. Contract interaction components - Forms that call contract functions
  4. Data display components - C
Câu hỏi thường gặp

Tại sao định nghĩa giao diện trước logic?

Skill nói giao diện đặt ra ranh giới rõ ràng, giúp các lớp khớp với nhau và dễ kiểm thử.

Những thư mục nào được tạo đầu tiên?

Skill thiết lập các thư mục contracts, frontend, scripts, zk-circuits và docs trước mọi mã.

Đóng gói có phải một phần của quy trình không?

Có, skill biến đóng gói thành giai đoạn cuối bắt buộc để tạo ra sản phẩm sẵn sàng giao.

Chi tiết

Mô tả gốc của tác giả

Systematic full-stack Web3 build with mandatory packaging and delivery phase

repo: HKUDS/AgentPilot

Độ phổ biến

Sao GitHub
7.8k
Vị trí xếp hạng
#13028
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự