supabase
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
Automatically updates CLAUDE.md and related documentation when new features, configurations, or best practices are discovered during development sessions
Full skill instructions
This skill implements a self-improving documentation system for the MutuaPIX project. It automatically:
Documentation follows the progressive disclosure pattern:
The system should update documentation when:
Trigger: Running a bash command that solves a problem and should be remembered
Example:
# During session, you run:
ssh [email protected] 'cd /var/www/mutuapix-frontend-production && rm -rf .next && npm run build'
# Auto-update CLAUDE.md:
## Quick Commands > Frontend > Build
# Clear cache and rebuild
ssh [email protected] 'cd /var/www/mutuapix-frontend-production && rm -rf .next && npm run build'
Trigger: Discovering environment variable requirements or configuration settings
Example:
# Discovered: NEXT_PUBLIC_NODE_ENV required for production
# Auto-update: CLAUDE.md > Environment Variables section
Trigger: Identifying security issues during code review or testing
Example:
# Found: authStore initializes with mock user
# Auto-create: SECURITY_AUDIT_[DATE].md
# Auto-update: CLAUDE.md > Security > Known Issues
Trigger: Creating a new SKILL.md file
Example:
# Created: .claude/skills/pix-validation/SKILL.md
# Auto-update: CLAUDE.md > Available Skills section
Trigger: Discovering better way to perform existing task
Example:
# Old way: Manual file transfer
# New way: rsync with specific flags
# Auto-update: CLAUDE.md > Deployment section
interface UpdateTrigger {
type: 'command' | 'config' | 'security' | 'skill' | 'workflow';
source: string; // Where was this discovered?
content: string; // What should be documented?
priority: 'low' | 'medium' | 'high' | 'critical';
relatedFiles: string[]; // Which files are affected?
}
Decision Tree:
Is it a quick command/reference?
YES → Update CLAUDE.md > Quick Commands
NO → Continue
Is it detailed technical knowledge?
YES → Update or create SKILL.md
NO → Continue
Is it a security issue?
YES → Create SECURITY_AUDIT_[DATE].md + update CLAUDE.md
NO → Continue
Is it project-specific documentation?
YES → Update README.md or docs/
NO → Log for future review
CLAUDE.md Updates:
## Section Title
### Subsection (if needed)
**Description:** Brief explanation of what/why
**Command/Pattern:**
```bash
# Comment explaining what this does
command here
Related Files: path/to/file.ext
Added: 2025-10-16 (Track when added)
**SKILL.md Updates:**
```markdown
## Version History
- **1.1.0** (2025-10-16): [Description of update]
- Added: Feature X
- Fixed: Issue Y
- Updated: Section Z
Checklist:
# Auto-commit documentation updates
git add CLAUDE.md .claude/skills/
git commit -m "docs: auto-update from session [SESSION_ID]
- Added: [brief description]
- Updated: [sections modified]
- Source: [what triggered update]
Co-Authored-By: Claude <[email protected]>"
# CLAUDE.md
**Last Updated:** YYYY-MM-DD
**Location:** `/Users/lucascardoso/Desktop/MUTUA/`
**Auto-Update Enabled:** ✅
---
## 🎯 Project Overview
[Brief description, tech stack]
## 🚀 Quick Start Commands
[Most common commands for dev/deploy]
## 🏗️ Architecture
[High-level system design]
## 🔐 Security
[Critical security considerations]
## 📋 Available Skills
[List of SKILL.md files with descriptions]
## ⚙️ Configuration
[Environment variables, important settings]
## 🐛 Troubleshooting
[Common issues and solutions]
## 📚 Documentation References
[Links to detailed docs]
## 🔄 Version History
[Track major CLAUDE.md changes]
❌ BAD (Too verbose):
The MutuaPIX platform uses a comprehensive authentication system
that leverages Laravel Sanctum on the backend for secure token-based
authentication while the frontend utilizes Next.js with Zustand for
state management and localStorage for token persistence...
✅ GOOD (Concise):
## Authentication
**Stack:** Laravel Sanctum (backend) + Zustand (frontend)
**Token Lifetime:** 24 hours
**Login Flow:** CSRF token → POST /api/v1/login → Store JWT
**Quick Test:**
```bash
curl https://api.mutuapix.com/api/v1/health
Details: See .claude/skills/authentication-management/SKILL.md
## Skills Discovery
When Claude needs to find a skill:
```bash
# List all available skills
ls -la .claude/skills/
# Search skills by keyword
grep -r "PIX validation" .claude/skills/*/SKILL.md
# Read specific skill
cat .claude/skills/pix-validation/SKILL.md
Auto-discovery: Skills are automatically discovered from:
.claude/skills/ (project-level)~/.claude/skills/ (personal)Trigger:
# During debugging, discovered NEXT_PUBLIC_NODE_ENV is required
Auto-Update CLAUDE.md:
## Environment Variables
### Frontend Production (.env.production on VPS)
```bash
NEXT_PUBLIC_NODE_ENV=production # ⚠️ CRITICAL: Required for security
NEXT_PUBLIC_API_URL=https://api.mutuapix.com
NEXT_PUBLIC_USE_AUTH_MOCK=false
Why NEXT_PUBLIC_NODE_ENV is Critical:
process.env.NODE_ENV is undefined in Next.js client-side codeAdded: 2025-10-16
Related Files: frontend/src/lib/env.ts, frontend/src/stores/authStore.ts
### Example 2: New Deployment Command
**Trigger:**
```bash
# Discovered that clearing .next cache is required for env var changes
ssh [email protected] 'cd /var/www/mutuapix-frontend-production && rm -rf .next && npm run build && pm2 restart mutuapix-frontend'
Auto-Update CLAUDE.md:
## Deployment
### Frontend Deployment (Environment Variable Changes)
**⚠️ IMPORTANT:** When updating `.env.production`, must clear cache before rebuild!
```bash
# 1. Update .env.production on VPS
ssh [email protected] 'echo "NEXT_PUBLIC_NODE_ENV=production" >> /var/www/mutuapix-frontend-production/.env.production'
# 2. Clear cache + rebuild + restart
ssh [email protected] 'cd /var/www/mutuapix-frontend-production && rm -rf .next && npm run build && pm2 restart mutuapix-frontend'
# 3. Verify
curl -I https://matrix.mutuapix.com/login
Why Clear Cache:
Next.js caches compiled bundles. Without clearing .next/, old environment variables persist.
Added: 2025-10-16
### Example 3: Security Issue Found
**Trigger:**
```typescript
// Discovered: authStore has default mock user
// File: frontend/src/stores/authStore.ts:91-96
user: devLocalUser, // ❌ VULNERABILITY
Auto-Create: SECURITY_AUDIT_2025_10_16.md (full report)
Auto-Update CLAUDE.md:
## Security
### Known Issues
**🔴 CRITICAL: Default Mock User in authStore** (Found: 2025-10-16)
**Issue:** `authStore` initializes with authenticated mock admin user by default.
**Risk:** If localStorage is empty, user appears logged in without credentials.
**Fix:** See `AUTHENTICATION_AUDIT_REPORT.md` Section "Remediation Plan > Phase 1"
**Status:** 🟡 Pending fix
**Related Files:**
- `frontend/src/stores/authStore.ts:91-96`
- `.claude/skills/authentication-management/SKILL.md`
interface DocHealthMetrics {
claudeMdSize: number; // Bytes (target: <50KB)
skillsCount: number; // Number of SKILL.md files
lastUpdated: Date; // Most recent update
staleSections: string[]; // Sections >90 days old
brokenLinks: string[]; // Dead file references
todoItems: number; // Unresolved TODOs in docs
}
Target:
Before updating CLAUDE.md, verify:
When user says:
✅ Keep CLAUDE.md concise (<50KB total) ✅ Use bullet points over paragraphs ✅ Include copy-pasteable commands ✅ Cross-reference detailed docs in SKILL.md ✅ Add dates to new entries ✅ Version bump SKILL.md when updating
❌ Duplicate information across files ❌ Include verbose explanations in CLAUDE.md ❌ Commit broken/untested commands ❌ Leave TODOs unresolved for >7 days ❌ Remove historical information (archive instead)
Core Documentation:
CLAUDE.md - Main project guide (you are here).claude/skills/*/SKILL.md - Detailed skill documentationREADME.md - Public-facing project readmeAudit Reports:
AUTHENTICATION_AUDIT_REPORT.md - Security audit (2025-10-16)VPS_AUDIT_REPORT.md - Infrastructure auditCLEANUP_EXECUTION_REPORT.md - VPS cleanup logLegacy:
WORKFLOW_RULES_FOR_CLAUDE.md - Git workflow rulesdocs/ - Additional project documentationHandles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.
Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.
A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.
Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.
Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
Send, read, and manage Gmail messages, drafts, labels, and account settings.
Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.
Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.
Discover your celebrity doppelgänger with StarByFace!
GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams
Detect AI-generated voices to protect against audio fraud.
Ensure Your Content's Originality with AI Plagiarism Checker
Upscale images by 400% without quality loss
Protect your social media from copyright disputes
Accurately Detect AI-Generated Content with TheChecker.AI
Chrome extension that detects and flags AI-generated content