tessl install github:daymade/claude-code-skills --skill repomix-safe-mixergithub.com/daymade/claude-code-skills
Safely package codebases with repomix by automatically detecting and removing hardcoded credentials before packing. Use when packaging code for distribution, creating reference packages, or when the user mentions security concerns about sharing code with repomix.
Review Score
87%
Validation Score
14/16
Implementation Score
85%
Activation Score
85%
Safely package codebases with repomix by automatically detecting and removing hardcoded credentials.
This skill prevents accidental credential exposure when packaging code with repomix. It scans for hardcoded secrets (API keys, database credentials, tokens), reports findings, and ensures safe packaging.
When to use: When packaging code with repomix for distribution, creating shareable reference packages, or whenever security concerns exist about hardcoded credentials in code.
Use safe_pack.py from this skill's scripts/ directory for the complete workflow: scan β report β pack.
python3 scripts/safe_pack.py <directory>What it does:
Example:
python3 scripts/safe_pack.py ./my-projectOutput if clean:
π Scanning ./my-project for hardcoded secrets...
β
No secrets detected!
π¦ Packing ./my-project with repomix...
β
Packaging complete!
Package is safe to distribute.Output if secrets found:
π Scanning ./my-project for hardcoded secrets...
β οΈ Security Scan Found 3 Potential Secrets:
π΄ supabase_url: 1 instance(s)
- src/client.ts:5
Match: https://ghyttjckzmzdxumxcixe.supabase.co
β Cannot pack: Secrets detected!Custom output file:
python3 scripts/safe_pack.py \
./my-project \
--output package.xmlWith repomix config:
python3 scripts/safe_pack.py \
./my-project \
--config repomix.config.jsonExclude patterns from scanning:
python3 scripts/safe_pack.py \
./my-project \
--exclude '.*test.*' '.*\.example'Force pack (dangerous, skip scan):
python3 scripts/safe_pack.py \
./my-project \
--force # β οΈ NOT RECOMMENDEDUse scan_secrets.py from this skill's scripts/ directory for scanning only (without packing).
python3 scripts/scan_secrets.py <directory>Use cases:
Example:
python3 scripts/scan_secrets.py ./my-projectJSON output for programmatic use:
python3 scripts/scan_secrets.py \
./my-project \
--jsonExclude patterns:
python3 scripts/scan_secrets.py \
./my-project \
--exclude '.*test.*' '.*example.*' '.*SECURITY_AUDIT\.md'The scanner detects common credential patterns including:
Cloud Providers:
AKIA...)API Keys:
sk_live_..., pk_live_...)sk-...)AIza...)Authentication:
eyJ...)-----BEGIN PRIVATE KEY-----)0x...)See references/common_secrets.md for complete list and patterns.
When secrets are found:
Examine each finding to verify it's a real credential (not a placeholder or example).
Before:
const SUPABASE_URL = "https://ghyttjckzmzdxumxcixe.supabase.co";
const API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";After:
const SUPABASE_URL = import.meta.env.VITE_SUPABASE_URL || "https://your-project-ref.supabase.co";
const API_KEY = import.meta.env.VITE_API_KEY || "your-api-key-here";
// Validation
if (!import.meta.env.VITE_SUPABASE_URL) {
console.error("β οΈ Missing VITE_SUPABASE_URL environment variable");
}# Example environment variables
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_API_KEY=your-api-key-here
# Instructions:
# 1. Copy this file to .env
# 2. Replace placeholders with real values
# 3. Never commit .env to version controlRun scanner again to confirm secrets removed:
python3 scripts/scan_secrets.py ./my-projectOnce clean, package safely:
python3 scripts/safe_pack.py ./my-projectIf credentials were already exposed (e.g., committed to git, shared publicly):
The scanner skips common false positives:
Placeholders:
your-api-key, example-key, placeholder-value<YOUR_API_KEY>, ${API_KEY}, TODO: add keyTest/Example files:
.*test.*, .*example.*, .*sample.*Comments:
//, #, /*, *Environment variable references (correct usage):
process.env.API_KEYimport.meta.env.VITE_API_KEYDeno.env.get('API_KEY')Use --exclude to skip additional patterns if needed.
This skill works with standard repomix:
Default usage (no config):
python3 scripts/safe_pack.py ./projectWith repomix config:
python3 scripts/safe_pack.py \
./project \
--config repomix.config.jsonCustom output location:
python3 scripts/safe_pack.py \
./project \
--output ~/Downloads/package-clean.xmlThe skill runs repomix internally after security validation, passing through config and output options.
# Scan and pack in one command
python3 scripts/safe_pack.py \
~/workspace/my-project \
--output ~/Downloads/my-project-package.xml# Step 1: Scan to discover secrets
python3 scripts/scan_secrets.py ~/workspace/my-project
# Step 2: Review findings and replace credentials with env vars
# (Edit files manually or with automation)
# Step 3: Verify cleanup
python3 scripts/scan_secrets.py ~/workspace/my-project
# Step 4: Package safely
python3 scripts/safe_pack.py \
~/workspace/my-project \
--output ~/Downloads/my-project-clean.xml# Pre-commit hook: scan for secrets
python3 scripts/scan_secrets.py . --json
# Exit code 1 if secrets found (blocks commit)
# Exit code 0 if clean (allows commit)References:
references/common_secrets.md - Complete credential pattern catalogScripts:
scripts/scan_secrets.py - Standalone security scannerscripts/safe_pack.py - Complete scan β pack workflowRelated Skills:
repomix-unmixer - Extracts files from repomix packagesskill-creator - Creates new Claude Code skillsThis skill detects common patterns but may not catch all credential types. Always:
Not a replacement for: Secret scanning in CI/CD, git history scanning, or comprehensive security audits.