Smart Ralph is a Claude Code plugin that automates spec-driven development using the Ralph Wiggum loop. It compacts specifications into executable workflows, benefiting developers and operations teams by reducing manual coding tasks. The plugin integrates with Claude Code, streamlining the development process and improving productivity.
git clone https://github.com/tzachbon/smart-ralph.gitSmart Ralph is a Claude Code plugin that automates spec-driven development using the Ralph Wiggum loop. It compacts specifications into executable workflows, benefiting developers and operations teams by reducing manual coding tasks. The plugin integrates with Claude Code, streamlining the development process and improving productivity.
[{"step":1,"action":"Install the Smart Ralph plugin in Claude Code by running `claude plugins install smart-ralph` in your terminal.","tip":"Ensure you have Claude Code installed and updated to the latest version before installing plugins."},{"step":2,"action":"Prepare your specification document containing [REQUIREMENTS], [TECH_STACK], and [EDGE_CASES]. Save it as a .md or .txt file.","tip":"Be as specific as possible about components and constraints. The plugin works best with clear, structured specifications."},{"step":3,"action":"In Claude Code, run `claude smart-ralph --spec [SPEC_FILE_PATH] --output [OUTPUT_DIR]` to generate the executable code.","tip":"Use the `--verbose` flag to see the Ralph Wiggum loop steps as they execute."},{"step":4,"action":"Review the generated code in [OUTPUT_DIR]. Test the implementation with the provided test cases and make any necessary adjustments.","tip":"The plugin generates runnable code, but always verify the output matches your security and performance requirements."},{"step":5,"action":"Integrate the generated code into your project. Commit the changes to version control and deploy the new functionality.","tip":"Use the plugin's `--diff` flag to see changes before committing if working in an existing codebase."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/tzachbon/smart-ralphCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the Smart Ralph plugin in Claude Code to automate the development of [SPECIFICATION] into executable code. Generate a Ralph Wiggum loop workflow that: 1) Parses the spec for [KEY_COMPONENTS], 2) Maps them to [TECH_STACK] components, and 3) Outputs a runnable implementation with [TEST_CASES]. Include error handling for [EDGE_CASES].
```python
# Ralph Wiggum Loop Generated by Smart Ralph
# Specification: User Authentication Module
# Tech Stack: FastAPI, SQLAlchemy, JWT
from fastapi import FastAPI, Depends, HTTPException
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import jwt
import datetime
# Database Setup
DATABASE_URL = "sqlite:///./auth.db"
engine = create_engine(DATABASE_URL)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()
# User Model
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
username = Column(String, unique=True, index=True)
hashed_password = Column(String)
Base.metadata.create_all(bind=engine)
# FastAPI App
app = FastAPI()
# Dependency
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()
# JWT Secret (In production, use environment variables)
SECRET_KEY = "your-secret-key-here"
@app.post("/register")
def register_user(username: str, password: str, db: Session = Depends(get_db)):
# Check if user exists
if db.query(User).filter(User.username == username).first():
raise HTTPException(status_code=400, detail="Username already registered")
# Hash password (simplified for example)
hashed_pw = password # In real code, use bcrypt or similar
# Create user
new_user = User(username=username, hashed_password=hashed_pw)
db.add(new_user)
db.commit()
return {"message": "User registered successfully"}
@app.post("/login")
def login_user(username: str, password: str, db: Session = Depends(get_db)):
user = db.query(User).filter(User.username == username).first()
if not user or user.hashed_password != password:
raise HTTPException(status_code=401, detail="Invalid credentials")
# Generate JWT token
token = jwt.encode({
"sub": user.username,
"exp": datetime.datetime.utcnow() + datetime.timedelta(hours=1)
}, SECRET_KEY, algorithm="HS256")
return {"access_token": token, "token_type": "bearer"}
# Test Cases
# 1. Register new user -> Success
# 2. Register existing user -> Error
# 3. Login with valid credentials -> Success
# 4. Login with invalid credentials -> Error
```
The Smart Ralph plugin generated this complete authentication module from a simple specification. The workflow automatically:
1. Identified the core components (User model, registration, login)
2. Mapped them to FastAPI and SQLAlchemy
3. Included error handling for duplicate registrations and invalid logins
4. Generated test cases as comments
The resulting code is immediately runnable with `uvicorn main:app --reload` and includes all necessary imports and dependencies. The plugin even suggested using environment variables for the JWT secret in production (commented in the code).Create and collaborate on interactive animations with powerful, user-friendly tools.
AI assistant built for thoughtful, nuanced conversation
Meet your new AI Sales Copywriter 10x Faster and 2x Better Sales Content
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan