Gentleman-Skills provides community-curated AI agent skills for Claude Code, OpenCode, and other AI assistants. It enables AI to write code following specific frameworks, libraries, and patterns. Developers and operations teams benefit from standardized, reusable code patterns. It connects to AI assistants and integrates with development workflows.
git clone https://github.com/Gentleman-Programming/Gentleman-Skills.gitGentleman-Skills provides community-curated AI agent skills for Claude Code, OpenCode, and other AI assistants. It enables AI to write code following specific frameworks, libraries, and patterns. Developers and operations teams benefit from standardized, reusable code patterns. It connects to AI assistants and integrates with development workflows.
[{"step":"Identify the framework or library you're working with (e.g., FastAPI, Django, React).","action":"Specify the exact pattern or convention you want to follow (e.g., RESTful endpoints, MVC structure, or dependency injection).","tip":"Use the library's official documentation as a reference to ensure the pattern matches current best practices."},{"step":"Define the purpose of your code (e.g., user authentication, data processing pipeline).","action":"List the required methods, classes, or components that must be included in the generated code.","tip":"Break down the functionality into smaller, modular components for better maintainability."},{"step":"Run the prompt in your AI assistant (e.g., Claude Code or OpenCode) with the specified placeholders filled in.","action":"Review the generated code for correctness, style, and adherence to the specified pattern.","tip":"Cross-reference the output with the framework's official examples to validate compliance."},{"step":"Integrate the generated code into your project.","action":"Test the code thoroughly, especially edge cases and error handling scenarios.","tip":"Use the AI assistant to generate unit tests or integration tests for the new code."},{"step":"Iterate and refine the code as needed.","action":"Provide feedback to the AI assistant to improve future generations (e.g., 'Adjust the error handling to log stack traces').","tip":"Save successful patterns in a personal library for reuse in future projects."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Gentleman-Programming/Gentleman-SkillsCopy 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 Gentleman-Skills to generate a Python class following the [FRAMEWORK/LIBRARY] pattern for [PURPOSE]. Ensure the class includes [REQUIRED_METHODS] and adheres to [CODING_STANDARDS]. Include docstrings and type hints. Example: 'Generate a FastAPI route handler for a user authentication service following RESTful conventions. Include endpoints for login, logout, and token refresh. Add proper error handling and logging.'
```python
from fastapi import FastAPI, HTTPException, status, Depends
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from pydantic import BaseModel
from typing import Optional
import logging
import secrets
app = FastAPI()
logger = logging.getLogger(__name__)
# Models
class Token(BaseModel):
access_token: str
token_type: str
class User(BaseModel):
username: str
email: Optional[str] = None
# Mock database
fake_users_db = {
"admin": {
"username": "admin",
"email": "admin@example.com",
"hashed_password": "fakehashedsecret",
"disabled": False,
}
}
# OAuth2 scheme
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
# Utility functions
def verify_password(plain_password: str, hashed_password: str):
return secrets.compare_digest(plain_password, hashed_password)
def get_user(db, username: str):
if username in db:
user_dict = db[username]
return User(**user_dict)
return None
def authenticate_user(fake_db, username: str, password: str):
user = get_user(fake_db, username)
if not user or not verify_password(password, fake_db[username]["hashed_password"]):
return False
return user
def create_access_token(data: dict, expires_delta: Optional[int] = None):
to_encode = data.copy()
return "generated.jwt.token"
# Route handlers
@app.post("/token", response_model=Token)
async def login(form_data: OAuth2PasswordRequestForm = Depends()):
user = authenticate_user(fake_users_db, form_data.username, form_data.password)
if not user:
logger.warning(f"Failed login attempt for user: {form_data.username}")
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Incorrect username or password",
headers={"WWW-Authenticate": "Bearer"},
)
access_token_expires = 3600 # 1 hour
access_token = create_access_token(
data={"sub": user.username}, expires_delta=access_token_expires
)
logger.info(f"User {user.username} logged in successfully")
return {"access_token": access_token, "token_type": "bearer"}
@app.get("/users/me", response_model=User)
async def read_users_me(token: str = Depends(oauth2_scheme)):
current_user = get_user(fake_users_db, token)
if current_user is None:
raise HTTPException(status_code=404, detail="User not found")
return current_user
```
This FastAPI authentication service follows RESTful conventions with proper error handling, logging, and type safety. The class structure adheres to FastAPI's recommended patterns, including dependency injection for OAuth2 and Pydantic models for request/response validation. The mock database simulates a production-ready implementation that can be replaced with a real database connection.Create and collaborate on interactive animations with powerful, user-friendly tools.
AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
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