supabase
Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...
git-leak-recovery
This skill provides guidance for recovering secrets or sensitive data from git repositories (including orphaned commits, reflog, and unreachable objects) and subsequently cleaning up those secrets from git history. It should be used when tasks involve finding leaked credentials, recovering data f...
Full skill instructions
This skill covers two related but distinct operations: (1) recovering secrets or data that may exist in orphaned commits, reflog entries, or unreachable git objects, and (2) thoroughly cleaning repositories to ensure sensitive data cannot be recovered. Both operations require understanding git's internal storage mechanisms beyond standard high-level commands.
Is the goal to RECOVER or CLEAN UP a secret?
│
├─► RECOVER secret from git history
│ └─► Follow "Recovery Workflow" section
│
└─► CLEAN UP / ensure secret is removed
└─► Follow "Cleanup Workflow" section
└─► CRITICAL: Follow "Verification Workflow" - superficial checks are insufficient
Search these locations in order of likelihood:
Reflog - Records all ref updates, even after commits are "deleted"
git reflog --all
git reflog show HEAD
Unreachable/Orphaned commits - Commits not referenced by any branch
git fsck --unreachable --no-reflogs
git fsck --lost-found # Creates refs in .git/lost-found/
Dangling objects - Objects not referenced by anything
git fsck --dangling
Stashes - Often forgotten storage location
git stash list
git stash show -p stash@{N}
Git notes - Metadata attached to commits
git notes list
Once object hashes are identified:
# View commit content
git show <commit-hash>
# View any object type
git cat-file -p <object-hash>
# Determine object type
git cat-file -t <object-hash>
After locating the secret:
# Save specific file from a commit
git show <commit>:<path/to/file> > recovered_file.txt
# Or checkout the entire commit temporarily
git checkout <commit> -- <path/to/file>
Remove all references that point to commits containing the secret:
# Delete reflog entries
git reflog expire --expire=now --all
# Remove backup refs (created by filter-branch, etc.)
rm -rf .git/refs/original/
# Remove stashes if they contain secrets
git stash drop stash@{N}
# Remove notes if applicable
git notes remove <commit>
Force immediate garbage collection:
git gc --prune=now --aggressive
Pack files may retain objects even after gc:
# Repack aggressively
git repack -a -d -f --depth=250 --window=250
# Or for thorough cleanup, unpack and repack
mv .git/objects/pack/*.pack .
git unpack-objects < *.pack
rm *.pack
git gc --prune=now
CRITICAL: Standard verification commands are often insufficient. Follow this thorough approach.
These commands are NOT sufficient for security-sensitive cleanup:
# INSUFFICIENT: Only searches working directory, not git objects
grep -r "secret" .
# INSUFFICIENT: Greps fsck output (SHA hashes), not object content
git fsck --unreachable | grep "secret"
Search all reachable commit content:
git log --all -p -S "secret_pattern" --
Search unreachable objects content (see references/verification_commands.md):
# List all objects and search their content
git rev-list --all --objects | cut -d' ' -f1 | while read obj; do
git cat-file -p "$obj" 2>/dev/null | grep -l "secret_pattern" && echo "Found in: $obj"
done
Search loose objects directly:
find .git/objects -type f -name '[0-9a-f]*' | while read f; do
dir=$(dirname "$f" | xargs basename)
file=$(basename "$f")
hash="${dir}${file}"
git cat-file -p "$hash" 2>/dev/null | grep "secret_pattern" && echo "Found in loose object: $hash"
done
Search pack files:
for pack in .git/objects/pack/*.idx; do
git verify-pack -v "$pack" 2>/dev/null | awk '{print $1}' | while read obj; do
git cat-file -p "$obj" 2>/dev/null | grep "secret_pattern" && echo "Found in pack: $obj"
done
done
Verify no backup refs exist:
ls -la .git/refs/original/ 2>/dev/null
find .git -name "*.orig" -o -name "*_BACKUP_*"
Check for any remaining refs:
git for-each-ref --format='%(refname)'
| Pitfall | Why It Happens | Solution |
|---|---|---|
| Grepping fsck output | git fsck outputs hashes, not content | Use git cat-file -p on each object |
| Missing pack files | Objects may be packed, not loose | Search both loose objects and pack files |
| Forgetting reflog | Reflog preserves "deleted" commits | git reflog expire --expire=now --all |
| Ignoring backup refs | filter-branch creates refs/original/ | Remove .git/refs/original/ |
| Overlooking stashes | Stashes are separate ref namespace | Check git stash list |
| Missing git notes | Notes attach to commits separately | Check git notes list |
| Shallow verification | Working directory != git object store | Search object store directly |
verification_commands.md - Comprehensive verification scripts for thorough cleanup verificationThese references provide ready-to-use command sequences for the verification workflow, which is the most error-prone part of git leak recovery tasks.
Handles 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