migrate-legacy-secrets

Migrate legacy secrets from repositories into AWS Secrets Manager and purge git history.

1|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/sswapnil2/ai-config-fintech --skill migrate-legacy-secrets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-legacy-secrets
Source: https://github.com/sswapnil2/ai-config-fintech/tree/main/skills/migrate-legacy-secrets
Command: npx skills add https://github.com/sswapnil2/ai-config-fintech --skill migrate-legacy-secrets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

startup repos often have sensitive credentials committed (env files, keys) and must migrate them to AWS Secrets Manager to avoid leakage while ensuring traceability. This guide shows how to perform a controlled, time-bound migration and purge history.

Core Features & Use Cases

  • Phase-driven workflow: gate check, inventory, rotation, history purge, and prevention.
  • AWS Secrets Manager integration for centralized secret storage and rotation.
  • Human-in-the-loop with guardrails, Jira references, and PCI-aware security reviews.

Quick Start

Begin with gate check, then inventory, rotate each secret, purge git history, and enable prevention hooks.

Frequently Asked Questions about migrate-legacy-secrets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate legacy secrets from git history to AWS Secrets Manager?

To migrate legacy secrets to AWS Secrets Manager, you run a phase-driven workflow that inventories committed credentials, rotates them into centralized storage, and purges the git history. This requires a time-limited acknowledged gate and human review.

What is the best way to remove sensitive credentials committed to a startup repo?

The best way to remove sensitive credentials from a repo is a controlled migration that inventories environment or key files, rotates them into AWS Secrets Manager, and executes a git history purge. This prevents leakage while ensuring traceability.

Can I purge env files from git history without breaking existing deployments?

Yes, you can purge env files from git history safely by following a Phase 0 to Phase 4 workflow that rotates secrets into AWS Secrets Manager before rewriting history. This process coordinates credential rotation with human review to avoid deployment breaks.

Does migrating repository secrets to AWS Secrets Manager support PCI-aware security reviews?

Yes, migrating repository secrets to AWS Secrets Manager supports PCI-aware security reviews by embedding guardrail acknowledgments and Jira references throughout the rotation and history purge workflow. This ensures traceability and compliance during the migration.

What are the limitations of purging git history to remove committed secrets?

A key limitation of purging git history to remove committed secrets is the requirement for a time-limited .claude/legacy-secrets-acknowledged gate. This guardrail enforces manual review and prevents automated execution without explicit human oversight.

Do I need to rotate credentials before rewriting git history?

Yes, you need to rotate credentials before rewriting git history because existing committed secrets are already considered compromised. The workflow guides you to inventory and rotate each secret to AWS Secrets Manager before purging the repository history.