replit-known-pitfalls

Featured

Avoid the top Replit anti-patterns: ephemeral filesystem, public secrets, port binding, Nix gotchas, and database limits. Use when reviewing Replit code, onboarding developers, or auditing existing Replit apps for common mistakes. Trigger with phrases like "replit mistakes", "replit anti-patterns", "replit pitfalls", "replit what not to do", "replit code review".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Replit Known Pitfalls ## Overview Real gotchas when building on Replit. Each pitfall includes what goes wrong, why, and the correct pattern. Based on common failures in Replit's ephemeral container model, Nix-based environment, and cloud hosting platform. ## Pitfall Reference ### 1. Writing to Local Filesystem for Persistence **What happens:** Data is lost when the container restarts, deploys, or sleeps. ```python # BAD — files disappear on container restart with open("user_data.json", "w") as f: json.dump(data, f) # GOOD — use Replit's persistent storage from replit import db db["user_data"] = data # For files, use Object Storage from replit.object_storage import Client storage = Client() storage.upload_from_text("user_data.json", json.dumps(data)) ``` **Rule:** Anything written to the filesystem is ephemeral. Use PostgreSQL, KV Database, or Object Storage for data that must survive restarts. --- ### 2. Hardcoding Secrets in Source Code **What happens:** Secrets are visible to anyone who views your Repl (public by default on free plans). Replit's Secret Scanner catches some cases but not all. ```python # BAD — exposed in public Repl API_KEY = "sk-live-abc123" DATABASE_URL = "postgresql://user:password@host/db" # GOOD — use Replit Secrets (lock icon in sidebar) import os API_KEY = os.environ["API_KEY"] DATABASE_URL = os.environ["DATABASE_URL"] ``` --- ### 3. Binding to localhost Instead of 0.0.0.0 **What happens:** App starts but Webview is blank. Replit's ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

replit-common-errors

Diagnose and fix the top Replit errors: container sleep, port binding, Nix failures, DB limits. Use when encountering Replit errors, debugging failed deployments, or troubleshooting workspace and hosting issues. Trigger with phrases like "replit error", "fix replit", "replit not working", "debug replit", "replit broken", "replit deploy failed".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-security-basics

Apply Replit security best practices: Secrets management, REPL_IDENTITY tokens, Auth headers, and public Repl safety. Use when securing API keys, validating request identity, or auditing Replit security configuration. Trigger with phrases like "replit security", "replit secrets", "secure replit", "replit public safety", "replit identity token".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-policy-guardrails

Enforce security and resource policies for Replit-hosted apps: secrets exposure prevention, resource limits, deployment visibility, and database access controls. Use when hardening a Replit app for production, auditing security posture, or setting up guardrails for team development. Trigger with phrases like "replit policy", "replit guardrails", "replit security audit", "replit hardening", "replit best practices check".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-reference-architecture

Implement Replit reference architecture with best-practice project layout, data layer, and deployment. Use when designing new Replit apps, reviewing project structure, or establishing architecture standards for production Replit applications. Trigger with phrases like "replit architecture", "replit best practices", "replit project structure", "how to organize replit", "replit production layout".

2,266 Updated today
jeremylongshore
AI & Automation Featured

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".

2,266 Updated today
jeremylongshore