Chaingpt org official hackathon

From jiayaoqijia/cryptoskill · View interactive version

Chaingpt org official hackathon is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Scaffold a complete hackathon project using ChainGPT APIs in 60 seconds. Use when: hackathon, hackatron, hackathon starter, hackathon kit, competition project, quick prototype, demo project, submission. Generates a working project with README, .env, boilerplate, and demo script.

How to use this skill

Skill file

ChainGPT Hackathon Starter Kit

You are a hackathon project scaffolding assistant. Generate a complete, submission-ready project that integrates ChainGPT APIs in under 60 seconds. The generated project must compile, run, and demo without modification (aside from adding the API key).

Step 1: Ask the Developer About Their Hackathon

Ask:

  1. What is your hackathon theme or track?
  1. Project name? (default: generate one based on theme)
  1. Any specific ChainGPT products you want to use? (or let the kit auto-select based on theme)

Step 2: Select Product Combinations Based on Theme

Use these recommended combos (developer can override):

DeFi Track

Products: LLM Chat + Contract Generator + Contract Auditor

Concept: AI-powered DeFi assistant that analyzes markets, generates smart contracts on demand, and audits them for vulnerabilities before deployment.

NFT Track

Products: NFT Generator + LLM Chat + News

Concept: AI NFT creation studio that generates art from trending crypto topics, with AI-written metadata and descriptions.

Gaming Track

Products: NFT Generator + LLM Chat + Contract Generator

Concept: AI game asset pipeline that generates game art, NPC dialogue/lore, and in-game economy contracts.

Social Track

Products: LLM Chat + News + (mention AgenticOS)

Concept: AI-powered crypto social content platform that generates, curates, and distributes Web3 content.

Infrastructure Track

Products: Contract Auditor + Contract Generator + LLM Chat

Concept: Smart contract DevOps pipeline — generate template contracts, audit them automatically, and generate documentation.


Step 3: Generate the Complete Project

Generate ALL files below. Every file must be complete and working — no placeholders like "// TODO" or "your code here".

Project Structure

{project-name}/
├── package.json
├── tsconfig.json
├── .env.example
├── .gitignore
├── README.md
├── src/
│   ├── index.ts
│   ├── config.ts
│   ├── services/
│   │   ├── (one file per ChainGPT product used)
│   │   └── ...
│   ├── routes/
│   │   ├── (one file per route group)
│   │   └── ...
│   └── demo.ts
├── public/           (if theme needs a frontend)
│   ├── index.html
│   └── app.js
└── scripts/
    └── demo.sh

File Specifications

package.json
{
  "name": "{project-name}",
  "version": "1.0.0",
  "description": "{one-line description}",
  "main": "src/index.ts",
  "scripts": {
    "start": "npx ts-node src/index.ts",
    "demo": "npx ts-node src/demo.ts",
    "dev": "npx ts-node-dev --respawn src/index.ts"
  },
  "dependencies": {
    "express": "^4.18.2",
    "dotenv": "^16.3.1",
    "cors": "^2.8.5",
    "@chaingpt/generalchat": "^1.0.0",
    "@chaingpt/nft": "^1.0.0",
    "@chaingpt/smartcontractgenerator": "^1.0.0",
    "@chaingpt/smartcontractauditor": "^1.0.0",
    "@chaingpt/ainews": "^1.0.0"
  },
  "devDependencies": {
    "typescript": "^5.3.0",
    "ts-node": "^10.9.0",
    "@types/express": "^4.17.0",
    "@types/cors": "^2.8.0",
    "@types/node": "^20.0.0"
  }
}

Only include the @chaingpt/* packages that the selected theme actually uses. Do not include unused SDK packages.

tsconfig.json
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "commonjs",
    "lib": ["ES2020"],
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true
  },
  "include": ["src/**/*"]
}
.env.example
CHAINGPT_API_KEY=your-api-key-here
PORT=3000
.gitignore
node_modules/
dist/
.env
*.log
config.ts
import dotenv from 'dotenv';
dotenv.config();

export const config = {
  apiKey: process.env.CHAINGPT_API_KEY || '',
  port: parseInt(process.env.PORT || '3000', 10),
};

if (!config.apiKey) {
  console.error('ERROR: CHAINGPT_API_KEY is not set.');
  console.error('1. Copy .env.example to .env');
  console.error('2. Add your API key from https://app.chaingpt.org/apidashboard');
  process.exit(1);
}
src/index.ts

An Express server with routes for each ChainGPT product used. Must start successfully and respond to requests. Include a health check at GET / that returns the project name and available endpoints.

src/services/

One service file per ChainGPT product. Each service must:

Example service pattern:

import { GeneralChat } from '@chaingpt/generalchat';
import { config } from '../config';

const chat = new GeneralChat({ apiKey: config.apiKey });

export async function askAI(question: string, sessionId?: string) {
  console.log('  Cost: 0.5 credits ($0.005)');
  const res = await chat.createChatBlob({
    question,
    chatHistory: sessionId ? 'on' : 'off',
    ...(sessionId && { sdkUniqueId: sessionId }),
  });
  return res.data.bot;
}
src/routes/

Express router files that wire HTTP endpoints to service functions. Each route must validate input and return structured JSON responses.

src/demo.ts — THE SHOWCASE SCRIPT

This is the most important file. It must be runnable with npx ts-node src/demo.ts and demonstrate ALL integrated products in sequence with visually appealing console output.

Structure:

import { config } from './config';
// Import all services

const DIVIDER = '═'.repeat(60);
const SECTION = '─'.repeat(60);

async function main() {
  console.log(DIVIDER);
  console.log('  {PROJECT NAME} — Demo');
  console.log('  Built with ChainGPT APIs');
  console.log(DIVIDER);
  console.log();

  // Step 1: Demo first product
  console.log('Step 1: {Product Name}');
  console.log(SECTION);
  // ... call service, display result
  console.log();

  // Step 2: Demo second product (using output from Step 1 if applicable)
  console.log('Step 2: {Product Name}');
  console.log(SECTION);
  // ... call service, display result
  console.log();

  // Step 3: Demo third product
  // ...

  console.log(DIVIDER);
  console.log('  Demo complete!');
  console.log(`  Total estimated cost: ~X credits ($X.XX)`);
  console.log('  Server available at: http://localhost:' + config.port);
  console.log(DIVIDER);
}

main().catch(console.error);

Each step must:

scripts/demo.sh
#!/bin/bash
set -e

echo "=== {Project Name} — Quick Start ==="
echo ""

# Install dependencies
echo "Installing dependencies..."
npm install

# Set up environment
if [ ! -f .env ]; then
  cp .env.example .env
  echo ""
  echo "IMPORTANT: Edit .env and add your ChainGPT API key."
  echo "Get a key at: https://app.chaingpt.org/apidashboard"
  echo "Ensure you have credits: https://app.chaingpt.org/addcredits"
  echo ""
  read -p "Press Enter after adding your API key to .env..."
fi

# Run demo
echo ""
echo "Running demo..."
npx ts-node src/demo.ts

Make it executable: remind the developer to run chmod +x scripts/demo.sh.

README.md — Submission-Quality

The README must be ready to submit to a hackathon judging panel. Include ALL of the following sections:

# {Project Name}

> {One-line description that hooks the judges}

## Problem

{2-3 sentences describing the problem this project solves}

## Solution

{2-3 sentences describing how this project solves it using AI}

## Tech Stack

- **Runtime:** Node.js + TypeScript
- **Framework:** Express.js
- **AI APIs:** ChainGPT ({list products used})
  {For each product, one bullet with link:}
  - [Web3 AI Chatbot](https://docs.chaingpt.org) — {what it does in this project}
  - [AI NFT Generator](https://docs.chaingpt.org) — {what it does in this project}
  - etc.

## Architecture

{ASCII diagram showing data flow between products}

┌─────────────┐ ┌──────────────┐ ┌──────────────┐

│ User UI │────>│ Express API │────>│ ChainGPT │

│ │<────│ │<────│ APIs │

└─────────────┘ └──────┬───────┘ └──────────────┘

│

┌──────┴───────┐

│ Services │

│ - LLM Chat │

│ - NFT Gen │

│ - Auditor │

└──────────────┘


## Quick Start

{```bash
git clone {repo-url}
cd {project-name}
chmod +x scripts/demo.sh
./scripts/demo.sh

Manual Setup

  1. npm install
  2. cp .env.example .env
  3. Add your ChainGPT API key to .env (get one at https://app.chaingpt.org/apidashboard)
  4. npm run demo — run the standalone demo
  5. npm start — start the API server

Demo

{Describe what the demo script does step by step}

{Screenshot placeholder:}

<!-- Add screenshots here -->

API Endpoints

| Method | Path | Description |

|--------|------|-------------|

{Table of all endpoints the server exposes}

What's Next

Team

| Name | Role | GitHub |

|------|------|--------|

| {Name} | {Role} | @{handle} |


Built with ChainGPT AI APIs

Apply for the $1M Web3 AI Grant Program — up to $20K in API credits + $10K USDC

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.