replit-hello-world
Create a minimal working Replit app with database, object storage, and auth. Use when starting a new Replit project, testing your setup, or learning Replit's built-in services (DB, Auth, Object Storage). Trigger with phrases like "replit hello world", "replit starter", "replit quick start", "first replit app", "replit example".
Best use case
replit-hello-world is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create a minimal working Replit app with database, object storage, and auth. Use when starting a new Replit project, testing your setup, or learning Replit's built-in services (DB, Auth, Object Storage). Trigger with phrases like "replit hello world", "replit starter", "replit quick start", "first replit app", "replit example".
Teams using replit-hello-world should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/replit-hello-world/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How replit-hello-world Compares
| Feature / Agent | replit-hello-world | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create a minimal working Replit app with database, object storage, and auth. Use when starting a new Replit project, testing your setup, or learning Replit's built-in services (DB, Auth, Object Storage). Trigger with phrases like "replit hello world", "replit starter", "replit quick start", "first replit app", "replit example".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Replit Hello World
## Overview
Build a working Replit app that demonstrates core platform services: Express/Flask server, Replit Database (key-value store), Object Storage (file uploads), Auth (user login), and PostgreSQL. Produces a running app you can deploy.
## Prerequisites
- Replit App created (template or blank)
- `.replit` and `replit.nix` configured (see `replit-install-auth`)
- Node.js 18+ or Python 3.10+
## Instructions
### Step 1: Node.js — Express + Replit Database
```typescript
// index.ts
import express from 'express';
import Database from '@replit/database';
const app = express();
const db = new Database();
app.use(express.json());
// Health check with Replit env vars
app.get('/health', (req, res) => {
res.json({
status: 'ok',
repl: process.env.REPL_SLUG,
owner: process.env.REPL_OWNER,
timestamp: new Date().toISOString(),
});
});
// Replit Key-Value Database CRUD
// Limits: 50 MiB total, 5,000 keys, 1 KB per key, 5 MiB per value
app.post('/api/items', async (req, res) => {
const { key, value } = req.body;
await db.set(key, value);
res.json({ stored: key });
});
app.get('/api/items/:key', async (req, res) => {
const value = await db.get(req.params.key);
if (value === null) return res.status(404).json({ error: 'Not found' });
res.json({ key: req.params.key, value });
});
app.get('/api/items', async (req, res) => {
const prefix = (req.query.prefix as string) || '';
const keys = await db.list(prefix);
res.json({ keys });
});
app.delete('/api/items/:key', async (req, res) => {
await db.delete(req.params.key);
res.json({ deleted: req.params.key });
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
console.log(`Repl: ${process.env.REPL_SLUG} by ${process.env.REPL_OWNER}`);
});
```
**package.json dependencies:**
```json
{
"dependencies": {
"@replit/database": "^2.0.0",
"express": "^4.18.0"
},
"devDependencies": {
"@types/express": "^4.17.0",
"typescript": "^5.0.0"
}
}
```
### Step 2: Python — Flask + Replit Database
```python
# main.py
from flask import Flask, request, jsonify
from replit import db
import os
app = Flask(__name__)
@app.route('/health')
def health():
return jsonify({
'status': 'ok',
'repl': os.environ.get('REPL_SLUG'),
'owner': os.environ.get('REPL_OWNER'),
})
# Replit DB works like a Python dict
@app.route('/api/items', methods=['POST'])
def create_item():
data = request.json
db[data['key']] = data['value']
return jsonify({'stored': data['key']})
@app.route('/api/items/<key>')
def get_item(key):
if key not in db:
return jsonify({'error': 'Not found'}), 404
return jsonify({'key': key, 'value': db[key]})
@app.route('/api/items')
def list_items():
prefix = request.args.get('prefix', '')
keys = db.prefix(prefix) if prefix else list(db.keys())
return jsonify({'keys': keys})
@app.route('/api/items/<key>', methods=['DELETE'])
def delete_item(key):
if key in db:
del db[key]
return jsonify({'deleted': key})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 3000)))
```
### Step 3: Add Object Storage (File Uploads)
```typescript
// storage.ts — Replit Object Storage (App Storage)
import { Client } from '@replit/object-storage';
const storage = new Client();
// Upload text content
await storage.uploadFromText('notes/hello.txt', 'Hello from Replit!');
// Upload from file on disk
await storage.uploadFromFilename('uploads/photo.jpg', '/tmp/photo.jpg');
// Download as text
const { value } = await storage.downloadAsText('notes/hello.txt');
console.log(value); // "Hello from Replit!"
// Download as bytes
const { value: bytes } = await storage.downloadAsBytes('uploads/photo.jpg');
// List objects with prefix
const objects = await storage.list({ prefix: 'notes/' });
for (const obj of objects) {
console.log(obj.name); // "notes/hello.txt"
}
// Check existence
const { exists } = await storage.exists('notes/hello.txt');
// Copy object
await storage.copy('notes/hello.txt', 'archive/hello-backup.txt');
// Delete object
await storage.delete('notes/hello.txt');
```
**Python Object Storage:**
```python
from replit.object_storage import Client
storage = Client()
# Upload text
storage.upload_from_text('notes/hello.txt', 'Hello from Replit!')
# Download
content = storage.download_as_text('notes/hello.txt')
# List with prefix
objects = storage.list(prefix='notes/')
# Delete
storage.delete('notes/hello.txt')
# Check existence
exists = storage.exists('notes/hello.txt')
```
### Step 4: Add Auth-Protected Route
```typescript
// Add to index.ts
app.get('/api/me', (req, res) => {
const userId = req.headers['x-replit-user-id'];
if (!userId) return res.status(401).json({ error: 'Login required' });
res.json({
id: userId,
name: req.headers['x-replit-user-name'],
image: req.headers['x-replit-user-profile-image'],
});
});
// Client-side: fetch('/__replauthuser') returns current user
```
### Step 5: `.replit` for This App
```toml
entrypoint = "index.ts"
run = "npx tsx index.ts"
modules = ["nodejs-20:v8-20230920-bd784b9"]
[nix]
channel = "stable-24_05"
[env]
PORT = "3000"
[deployment]
run = ["sh", "-c", "npx tsx index.ts"]
deploymentTarget = "autoscale"
```
## Output
After running, verify at these endpoints:
- `GET /health` — returns Repl metadata
- `POST /api/items` — stores key-value data
- `GET /api/items?prefix=` — lists keys
- `GET /api/me` — returns authenticated user (when deployed)
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `Cannot find module '@replit/database'` | Not installed | `npm install @replit/database` |
| `db.set is not a function` | Wrong import | Use `new Database()` not `import db` |
| `REPLIT_DB_URL undefined` | Not on Replit | DB only available inside a Repl |
| Object Storage 403 | No bucket provisioned | Create bucket in Object Storage pane |
| Auth headers empty | Running in dev | Auth works only on deployed `.replit.app` |
## Resources
- [Replit Database](https://docs.replit.com/cloud-services/storage-and-databases/replit-database)
- [Object Storage Overview](https://docs.replit.com/cloud-services/storage-and-databases/object-storage/overview)
- [Object Storage TypeScript SDK](https://docs.replit.com/cloud-services/storage-and-databases/object-storage/typescript-api-reference)
- [Replit Auth](https://docs.replit.com/replit-workspace/replit-auth)
## Next Steps
Deploy with `replit-deploy-integration` or add PostgreSQL with `replit-data-handling`.Related Skills
workhuman-hello-world
Workhuman hello world for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman hello world".
wispr-hello-world
Wispr Flow hello world for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr hello world".
windsurf-hello-world
Create your first Windsurf Cascade interaction and Supercomplete experience. Use when starting with Windsurf, testing your setup, or learning basic Cascade and Supercomplete workflows. Trigger with phrases like "windsurf hello world", "windsurf example", "windsurf quick start", "first windsurf project", "try windsurf".
webflow-hello-world
Create a minimal working Webflow Data API v2 example. Use when starting a new Webflow integration, testing your setup, or learning basic Webflow API patterns — list sites, read CMS collections, create items. Trigger with phrases like "webflow hello world", "webflow example", "webflow quick start", "simple webflow code", "first webflow API call".
vercel-hello-world
Create a minimal working Vercel deployment with a serverless API route. Use when starting a new Vercel project, testing your setup, or learning basic Vercel deployment and API route patterns. Trigger with phrases like "vercel hello world", "vercel example", "vercel quick start", "simple vercel project", "first vercel deploy".
veeva-hello-world
Veeva Vault hello world with REST API and VQL. Use when integrating with Veeva Vault for life sciences document management. Trigger: "veeva hello world".
vastai-hello-world
Rent your first GPU instance on Vast.ai and run a workload. Use when starting a new Vast.ai integration, testing your setup, or learning basic Vast.ai GPU rental patterns. Trigger with phrases like "vastai hello world", "vastai example", "vastai quick start", "rent first gpu", "vastai first instance".
twinmind-hello-world
Create your first TwinMind meeting transcription and AI summary. Use when starting with TwinMind, testing your setup, or learning basic transcription and summary patterns. Trigger with phrases like "twinmind hello world", "first twinmind meeting", "twinmind quick start", "test twinmind transcription".
together-hello-world
Run inference with Together AI -- chat completions, streaming, and model selection. Use when testing open-source models, comparing model performance, or learning the Together AI API. Trigger: "together hello world, together AI example, run llama".
techsmith-hello-world
Capture a screenshot with Snagit COM API and produce a Camtasia video. Use when automating screen captures, batch-processing recordings, or building documentation pipelines with TechSmith tools. Trigger: "techsmith hello world, snagit capture, camtasia render".
supabase-hello-world
Run your first Supabase query — insert a row and read it back. Use when starting a new Supabase project, verifying your connection works, or learning the basic insert-then-select pattern with @supabase/supabase-js. Trigger with phrases like "supabase hello world", "first supabase query", "supabase quick start", "test supabase connection", "supabase insert and select".
stackblitz-hello-world
Boot a WebContainer, mount files, install npm packages, and run a dev server in the browser. Use when learning WebContainers, building browser-based IDEs, or running Node.js without a backend server. Trigger: "stackblitz hello world", "webcontainer example", "run node in browser".