xiaohongshu
xiaohongshu
ln-724-replit-cleaner
Removes all Replit artifacts from exported projects (configs, packages, code comments)
Full skill instructions
Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-720-structure-migrator
Completely removes Replit-specific artifacts from projects exported from Replit, preparing them for production deployment elsewhere.
| Aspect | Details |
|---|---|
| Input | Project directory (Replit export) |
| Output | Clean project without Replit dependencies |
| Duration | ~2-5 minutes |
| Invocation | Called from ln-720-structure-migrator or user-invocable |
| Category | Artifacts | Action |
|---|---|---|
| Config Files | .replit, replit.nix, .replit.nix | DELETE |
| Directories | .local/, .cache/, .upm/, .breakpoints | DELETE |
| NPM Packages | @replit/vite-plugin-* | REMOVE from package.json |
| Vite Config | Imports, plugins, REPL_ID checks | MODIFY vite.config.ts |
| Custom Plugins | vite-plugin-meta-images.ts (Replit-specific) | DELETE |
| Code Comments | // @replit annotations | REMOVE |
| .gitignore | .replit entry | REMOVE line |
Phase 1: Scan
|
v
Phase 2: Preview
|
v
Phase 3: Confirm
|
v
Phase 4: Execute
|
+---> 4.1 Delete files/directories
+---> 4.2 Modify package.json
+---> 4.3 Modify vite.config.ts
+---> 4.4 Remove @replit comments
+---> 4.5 Modify .gitignore
|
v
Phase 5: Verify & Report
Detect all Replit artifacts in the project.
Files:
- Glob: .replit, replit.nix, .replit.nix
- Glob: vite-plugin-meta-images.ts (if uses REPLIT_* env vars)
Directories:
- Glob: .local/, .cache/, .upm/, .breakpoints
Package.json:
- Grep: "@replit/" in devDependencies
Vite Config:
- Grep: "@replit/" imports
- Grep: "REPL_ID" or "REPLIT_" environment checks
Code:
- Grep: "// @replit" comments in *.tsx, *.ts, *.jsx, *.js
.gitignore:
- Grep: "^\.replit$" line
Scan Results:
Files Found: 2
- .replit (729 bytes)
- vite-plugin-meta-images.ts (2333 bytes)
Directories Found: 1
- .local/ (6 files, 589KB)
Package Dependencies: 3
- @replit/vite-plugin-cartographer
- @replit/vite-plugin-dev-banner
- @replit/vite-plugin-runtime-error-modal
Vite Config Modifications: 4
- Import: runtimeErrorOverlay
- Import: metaImagesPlugin
- Plugin: runtimeErrorOverlay()
- Block: REPL_ID conditional (lines 14-24)
Code Comments: 10
- button.tsx: 5 comments
- badge.tsx: 5 comments
Gitignore Entries: 1
- .replit
Show detailed preview of changes.
Will DELETE files:
- .replit (729 bytes)
- vite-plugin-meta-images.ts (2333 bytes)
Will DELETE directories:
- .local/ (6 files, 589KB)
Will MODIFY files:
- package.json: Remove 3 @replit/* devDependencies
- vite.config.ts: Remove 4 imports/plugins/blocks
- client/src/components/ui/button.tsx: Remove 5 @replit comments
- client/src/components/ui/badge.tsx: Remove 5 @replit comments
- .gitignore: Remove ".replit" line
Summary: 2 files deleted, 1 directory deleted, 5 files modified
Request user confirmation before making changes.
Proceed with Replit cleanup? [Y/n]
Options:
# Delete config files
rm -f .replit replit.nix .replit.nix
# Delete Replit-specific plugin
rm -f vite-plugin-meta-images.ts
# Delete Replit directories
rm -rf .local/ .cache/ .upm/ .breakpoints
Remove from devDependencies:
{
"devDependencies": {
"@replit/vite-plugin-cartographer": "^0.4.4",
"@replit/vite-plugin-dev-banner": "^0.1.1",
"@replit/vite-plugin-runtime-error-modal": "^0.0.4"
}
}
Method: JSON parse, filter keys starting with @replit/, serialize.
Remove imports:
// REMOVE
import runtimeErrorOverlay from "@replit/vite-plugin-runtime-error-modal";
import { metaImagesPlugin } from "./vite-plugin-meta-images";
Remove from plugins array:
// REMOVE
runtimeErrorOverlay(),
metaImagesPlugin(),
Remove REPL_ID conditional block:
// REMOVE entire block
...(process.env.NODE_ENV !== "production" &&
process.env.REPL_ID !== undefined
? [
await import("@replit/vite-plugin-cartographer").then((m) =>
m.cartographer(),
),
await import("@replit/vite-plugin-dev-banner").then((m) =>
m.devBanner(),
),
]
: []),
Pattern: // @replit.*$
Files: **/*.tsx, **/*.ts, **/*.jsx, **/*.js
Method: Read file, remove lines containing // @replit, preserve indentation and structure.
Remove line: .replit
Cleanup Complete!
Deleted:
- .replit
- vite-plugin-meta-images.ts
- .local/ (6 files)
Modified:
- package.json (removed 3 dependencies)
- vite.config.ts (removed 4 imports/plugins)
- button.tsx (removed 5 comments)
- badge.tsx (removed 5 comments)
- .gitignore (removed 1 line)
Next Steps:
1. Run `npm install` to update package-lock.json
2. Run `npm run build` to verify build works
3. Commit: git add . && git commit -m "chore: remove Replit artifacts"
| Case | Handling |
|---|---|
| No Replit artifacts found | Report "Project is clean" and exit |
| Project uses Webpack (not Vite) | Search webpack.config.* instead |
| Project uses other bundlers | Search common config patterns |
| No package.json | Skip NPM cleanup phase |
| Protected files | Ask user before modifying |
| Error | Action |
|---|---|
| Permission denied | Log error, suggest chmod or admin rights |
| File in use | Retry after delay, then warn user |
| JSON parse error | Log error, suggest manual fix |
| Vite config syntax error | Log error, suggest manual fix |
Called as first step before restructuring:
ln-720-structure-migrator:
Phase 1: Detect project type
Phase 2: Clean Replit artifacts (ln-724-replit-cleaner) # THIS SKILL
Phase 3: Restructure frontend (ln-721)
Phase 4: Generate backend (ln-722)
Phase 5: Migrate mock data (ln-723)
User: Clean my project from Replit
Claude: Invokes ln-724-replit-cleaner
Version: 1.0.0 Last Updated: 2026-01-10
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience