better-auth-add-plugin
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Consult OpenAI Codex (GPT 5.2) for repo-aware code analysis and OpenAI reasoning. Use when need general code review, refactoring suggestions, or different AI perspective.
$ npx -y skills add secondsky/claude-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/consult-codexContext preview
What this command does when you run it.
Consult OpenAI Codex (GPT 5.2) for repo-aware code analysis and OpenAI reasoning. Use when need general code review, refactoring suggestions, or different AI perspective.
name: multi-ai-consultant:consult-codex description: Consult OpenAI Codex (GPT 5.2) for repo-aware code analysis and OpenAI reasoning. Use when need general code review, refactoring suggestions, or different AI perspective. allowed-tools: - Bash
You are being asked to consult OpenAI's GPT 5.2 via the Codex CLI for a second opinion on a coding problem or architectural decision.
1. **Pre-flight Check**: Verify OpenAI API key is valid 2. **Navigate to Project**: Change to project directory (Codex is repo-aware) 3. **Build Prompt**: Create a clear, specific question 4. **Execute Consultation**: Call Codex with auto-approval flags 5. **Parse Response**: Read output from file 6. **Synthesize**: Compare Codex's analysis with your own reasoning 7. **Present**: Show 5-part synthesis to user 8. **Log Cost**: Track tokens and cost
---
# Test if OpenAI API key is valid
if ! command -v openai &>/dev/null; then
echo "⚠️ OpenAI CLI not installed (optional for pre-flight check)"
echo "Attempting Codex consultation anyway..."
else
if ! openai api models.list &>/dev/null 2>&1; then
echo "❌ OpenAI API key not working"
echo ""
echo "Possible issues:"
echo "1. API key not set: export OPENAI_API_KEY='sk-...'"
echo "2. API key invalid: Check https://platform.openai.com/api-keys"
echo ""
echo "After fixing, try the consultation again."
exit 1
fi
fi
# Check if Codex CLI is installed
if ! command -v codex &>/dev/null; then
echo "❌ Codex CLI not installed"
echo ""
echo "Install with: npm install -g codex"
echo "Docs: https://www.npmjs.com/package/codex"
echo ""
exit 1
fiIf pre-flight check fails, stop here and show the error message to the user.
---
**Codex is repo-aware**: It automatically scans the current directory for context.
# Get current project directory PROJECT_DIR=$(pwd) # Ensure we're in the right place echo "📂 Consulting on project: $PROJECT_DIR"
**Context behavior**:
---
The prompt must include: 1. **Problem statement**: What's wrong or what decision is needed 2. **Question**: Specific question for Codex 3. **Your analysis**: What you've tried or considered 4. **Note about codebase access**: Remind Codex it has access
**Format**:
Problem: [Brief description] Question: [Specific question] I've tried: [Your attempts] Current status: [What's happening now] (You have access to the codebase in this directory.)
**Note**: No need to specify files - Codex automatically has access to the repo.
---
**Required flags for non-interactive use**:
**Recommended model**: `gpt-5.2` (latest)
**Full command pattern**:
PROMPT=$(cat <<'EOF' [Your formatted prompt here] EOF ) # Create temp file for output RESPONSE_FILE="/tmp/codex-response-$(date +%s).txt" # Execute Codex (use --yolo to prevent hanging) echo "$PROMPT" | codex exec - \ -m gpt-5.2 \ --yolo \ --output-last-message "$RESPONSE_FILE" \ --skip-git-repo-check EXIT_CODE=$? if [ $EXIT_CODE -ne 0 ]; then echo "❌ Codex CLI failed (exit code: $EXIT_CODE)" echo "Check your API key and internet connection" exit 1 fi # Read response if [ ! -f "$RESPONSE_FILE" ] || [ ! -s "$RESPONSE_FILE" ]; then echo "❌ Codex response file is empty or missing" exit 1 fi ANALYSIS=$(cat "$RESPONSE_FILE") # Clean up rm -f "$RESPONSE_FILE"
---
**Note**: Codex CLI doesn't return token counts in output. Estimate for logging.
# Rough estimation (4 chars = 1 token)
INPUT_TOKENS=$(echo "$PROMPT" | wc -c | awk '{print int($1/4)}')
OUTPUT_TOKENS=$(echo "$ANALYSIS" | wc -c | awk '{print int($1/4)}')
# Add codebase size estimate
CODEBASE_SIZE=$(find . -type f -not -path '*/\.*' -not -path '*/node_modules/*' | xargs wc -c 2>/dev/null | tail -1 | awk '{print int($1/4)}')
INPUT_TOKENS=$((INPUT_TOKENS + CODEBASE_SIZE))---
You MUST compare Codex's analysis with your own reasoning. DO NOT just parrot Codex's response.
**Required sections**:
**End with**: "Should I proceed with this approach?"
---
# Calculate cost (GPT 5.2 pricing) # Input: $0.00001/token, Output: $0.00003/token (example rates, verify current) COST=$(echo "scale=4; ($INPUT_TOKENS * 0.00001) + ($OUTPUT_TOKENS * 0.00003)" | bc) # Create log directory if needed mkdir -p ~/.claude/ai-consultations # Log consultation echo "$(date -Iseconds),codex,gpt-5.2,$INPUT_TOKENS,$OUTPUT_TOKENS,$COST,$(pwd)" \ >> ~/.claude/ai-consultations/consultations.log # Show cost to user echo "" echo "---" echo "Cost: \$$COST (~$INPUT_TOKENS input + $OUTPUT_TOKENS output tokens, estimated)" echo "Consu
145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).
Repo: secondsky/claude-skills
Add a better-auth plugin to an existing project. Configures server and client plugins with proper imports.
Interactive setup wizard for better-auth authentication. Guides through database, framework, OAuth providers, and plugin configuration.
Explain Better Auth error codes and provide solutions with code examples
Display Better Auth available authentication providers and their configuration