claude-code-templates 1.21.6 → 1.21.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/components/agents/ai-specialists/ai-ethics-advisor.md +0 -195
- package/components/agents/ai-specialists/hackathon-ai-strategist.md +0 -46
- package/components/agents/ai-specialists/llms-maintainer.md +0 -94
- package/components/agents/ai-specialists/model-evaluator.md +0 -150
- package/components/agents/ai-specialists/prompt-engineer.md +0 -112
- package/components/agents/ai-specialists/search-specialist.md +0 -59
- package/components/agents/ai-specialists/task-decomposition-expert.md +0 -97
- package/components/agents/api-graphql/graphql-architect.md +0 -208
- package/components/agents/api-graphql/graphql-performance-optimizer.md +0 -357
- package/components/agents/api-graphql/graphql-security-specialist.md +0 -519
- package/components/agents/blockchain-web3/smart-contract-auditor.md +0 -32
- package/components/agents/blockchain-web3/smart-contract-specialist.md +0 -32
- package/components/agents/blockchain-web3/web3-integration-specialist.md +0 -32
- package/components/agents/business-marketing/business-analyst.md +0 -194
- package/components/agents/business-marketing/content-marketer.md +0 -36
- package/components/agents/business-marketing/customer-support.md +0 -36
- package/components/agents/business-marketing/legal-advisor.md +0 -50
- package/components/agents/business-marketing/marketing-attribution-analyst.md +0 -352
- package/components/agents/business-marketing/payment-integration.md +0 -33
- package/components/agents/business-marketing/product-strategist.md +0 -212
- package/components/agents/business-marketing/risk-manager.md +0 -42
- package/components/agents/business-marketing/sales-automator.md +0 -36
- package/components/agents/data-ai/ai-engineer.md +0 -33
- package/components/agents/data-ai/computer-vision-engineer.md +0 -562
- package/components/agents/data-ai/data-engineer.md +0 -33
- package/components/agents/data-ai/data-scientist.md +0 -337
- package/components/agents/data-ai/ml-engineer.md +0 -33
- package/components/agents/data-ai/mlops-engineer.md +0 -58
- package/components/agents/data-ai/nlp-engineer.md +0 -680
- package/components/agents/data-ai/quant-analyst.md +0 -33
- package/components/agents/database/database-admin.md +0 -33
- package/components/agents/database/database-architect.md +0 -590
- package/components/agents/database/database-optimization.md +0 -33
- package/components/agents/database/database-optimizer.md +0 -33
- package/components/agents/database/nosql-specialist.md +0 -708
- package/components/agents/database/supabase-schema-architect.md +0 -138
- package/components/agents/deep-research-team/academic-researcher.md +0 -33
- package/components/agents/deep-research-team/agent-overview.md +0 -235
- package/components/agents/deep-research-team/competitive-intelligence-analyst.md +0 -530
- package/components/agents/deep-research-team/data-analyst.md +0 -112
- package/components/agents/deep-research-team/fact-checker.md +0 -553
- package/components/agents/deep-research-team/query-clarifier.md +0 -73
- package/components/agents/deep-research-team/report-generator.md +0 -108
- package/components/agents/deep-research-team/research-brief-generator.md +0 -108
- package/components/agents/deep-research-team/research-coordinator.md +0 -94
- package/components/agents/deep-research-team/research-orchestrator.md +0 -119
- package/components/agents/deep-research-team/research-synthesizer.md +0 -109
- package/components/agents/deep-research-team/technical-researcher.md +0 -95
- package/components/agents/development-team/backend-architect.md +0 -31
- package/components/agents/development-team/cli-ui-designer.md +0 -405
- package/components/agents/development-team/devops-engineer.md +0 -886
- package/components/agents/development-team/frontend-developer.md +0 -32
- package/components/agents/development-team/fullstack-developer.md +0 -1205
- package/components/agents/development-team/ios-developer.md +0 -36
- package/components/agents/development-team/mobile-developer.md +0 -33
- package/components/agents/development-team/ui-ux-designer.md +0 -36
- package/components/agents/development-tools/code-reviewer.md +0 -30
- package/components/agents/development-tools/command-expert.md +0 -422
- package/components/agents/development-tools/context-manager.md +0 -65
- package/components/agents/development-tools/debugger.md +0 -31
- package/components/agents/development-tools/dx-optimizer.md +0 -64
- package/components/agents/development-tools/error-detective.md +0 -33
- package/components/agents/development-tools/mcp-expert.md +0 -259
- package/components/agents/development-tools/performance-profiler.md +0 -799
- package/components/agents/development-tools/test-engineer.md +0 -936
- package/components/agents/devops-infrastructure/cloud-architect.md +0 -33
- package/components/agents/devops-infrastructure/deployment-engineer.md +0 -33
- package/components/agents/devops-infrastructure/devops-troubleshooter.md +0 -33
- package/components/agents/devops-infrastructure/monitoring-specialist.md +0 -36
- package/components/agents/devops-infrastructure/network-engineer.md +0 -33
- package/components/agents/devops-infrastructure/security-engineer.md +0 -971
- package/components/agents/devops-infrastructure/terraform-specialist.md +0 -36
- package/components/agents/devops-infrastructure/vercel-deployment-specialist.md +0 -357
- package/components/agents/documentation/api-documenter.md +0 -33
- package/components/agents/documentation/changelog-generator.md +0 -37
- package/components/agents/documentation/docusaurus-expert.md +0 -52
- package/components/agents/documentation/technical-writer.md +0 -37
- package/components/agents/expert-advisors/agent-expert.md +0 -477
- package/components/agents/expert-advisors/architect-review.md +0 -50
- package/components/agents/expert-advisors/dependency-manager.md +0 -45
- package/components/agents/expert-advisors/documentation-expert.md +0 -47
- package/components/agents/ffmpeg-clip-team/audio-mixer.md +0 -37
- package/components/agents/ffmpeg-clip-team/audio-quality-controller.md +0 -100
- package/components/agents/ffmpeg-clip-team/podcast-content-analyzer.md +0 -60
- package/components/agents/ffmpeg-clip-team/podcast-metadata-specialist.md +0 -46
- package/components/agents/ffmpeg-clip-team/podcast-transcriber.md +0 -68
- package/components/agents/ffmpeg-clip-team/social-media-clip-creator.md +0 -69
- package/components/agents/ffmpeg-clip-team/timestamp-precision-specialist.md +0 -98
- package/components/agents/ffmpeg-clip-team/video-editor.md +0 -37
- package/components/agents/game-development/3d-artist.md +0 -37
- package/components/agents/game-development/game-designer.md +0 -37
- package/components/agents/game-development/unity-game-developer.md +0 -110
- package/components/agents/game-development/unreal-engine-developer.md +0 -128
- package/components/agents/mcp-dev-team/mcp-deployment-orchestrator.md +0 -101
- package/components/agents/mcp-dev-team/mcp-integration-engineer.md +0 -37
- package/components/agents/mcp-dev-team/mcp-protocol-specialist.md +0 -37
- package/components/agents/mcp-dev-team/mcp-registry-navigator.md +0 -112
- package/components/agents/mcp-dev-team/mcp-security-auditor.md +0 -70
- package/components/agents/mcp-dev-team/mcp-server-architect.md +0 -74
- package/components/agents/mcp-dev-team/mcp-testing-engineer.md +0 -106
- package/components/agents/modernization/architecture-modernizer.md +0 -37
- package/components/agents/modernization/cloud-migration-specialist.md +0 -37
- package/components/agents/modernization/legacy-modernizer.md +0 -33
- package/components/agents/obsidian-ops-team/Scripts/daily_notes_connector.py +0 -306
- package/components/agents/obsidian-ops-team/Scripts/enhance_tag_standardizer.py +0 -343
- package/components/agents/obsidian-ops-team/Scripts/find_keyword_connections.py +0 -216
- package/components/agents/obsidian-ops-team/Scripts/fix_quoted_tags.py +0 -82
- package/components/agents/obsidian-ops-team/Scripts/implement_entity_connections.py +0 -195
- package/components/agents/obsidian-ops-team/Scripts/link_suggester.py +0 -301
- package/components/agents/obsidian-ops-team/Scripts/metadata_adder.py +0 -197
- package/components/agents/obsidian-ops-team/Scripts/moc_generator.py +0 -296
- package/components/agents/obsidian-ops-team/Scripts/parse_keyword_connections.py +0 -122
- package/components/agents/obsidian-ops-team/Scripts/tag_standardizer.py +0 -387
- package/components/agents/obsidian-ops-team/connection-agent.md +0 -67
- package/components/agents/obsidian-ops-team/content-curator.md +0 -81
- package/components/agents/obsidian-ops-team/metadata-agent.md +0 -51
- package/components/agents/obsidian-ops-team/moc-agent.md +0 -112
- package/components/agents/obsidian-ops-team/review-agent.md +0 -94
- package/components/agents/obsidian-ops-team/tag-agent.md +0 -92
- package/components/agents/obsidian-ops-team/vault-optimizer.md +0 -76
- package/components/agents/ocr-extraction-team/document-structure-analyzer.md +0 -37
- package/components/agents/ocr-extraction-team/markdown-syntax-formatter.md +0 -58
- package/components/agents/ocr-extraction-team/ocr-grammar-fixer.md +0 -36
- package/components/agents/ocr-extraction-team/ocr-preprocessing-optimizer.md +0 -37
- package/components/agents/ocr-extraction-team/ocr-quality-assurance.md +0 -62
- package/components/agents/ocr-extraction-team/text-comparison-validator.md +0 -60
- package/components/agents/ocr-extraction-team/visual-analysis-ocr.md +0 -52
- package/components/agents/performance-testing/load-testing-specialist.md +0 -37
- package/components/agents/performance-testing/performance-engineer.md +0 -33
- package/components/agents/performance-testing/react-performance-optimization.md +0 -65
- package/components/agents/performance-testing/test-automator.md +0 -33
- package/components/agents/performance-testing/web-vitals-optimizer.md +0 -37
- package/components/agents/podcast-creator-team/academic-research-synthesizer.md +0 -61
- package/components/agents/podcast-creator-team/comprehensive-researcher.md +0 -49
- package/components/agents/podcast-creator-team/episode-orchestrator.md +0 -52
- package/components/agents/podcast-creator-team/guest-outreach-coordinator.md +0 -37
- package/components/agents/podcast-creator-team/market-research-analyst.md +0 -54
- package/components/agents/podcast-creator-team/podcast-editor.md +0 -37
- package/components/agents/podcast-creator-team/podcast-trend-scout.md +0 -60
- package/components/agents/podcast-creator-team/project-supervisor-orchestrator.md +0 -48
- package/components/agents/podcast-creator-team/seo-podcast-optimizer.md +0 -58
- package/components/agents/podcast-creator-team/social-media-copywriter.md +0 -57
- package/components/agents/podcast-creator-team/twitter-ai-influencer-manager.md +0 -62
- package/components/agents/programming-languages/c-pro.md +0 -36
- package/components/agents/programming-languages/c-sharp-pro.md +0 -40
- package/components/agents/programming-languages/cpp-pro.md +0 -39
- package/components/agents/programming-languages/golang-pro.md +0 -33
- package/components/agents/programming-languages/javascript-pro.md +0 -36
- package/components/agents/programming-languages/php-pro.md +0 -44
- package/components/agents/programming-languages/python-pro.md +0 -33
- package/components/agents/programming-languages/rust-pro.md +0 -36
- package/components/agents/programming-languages/shell-scripting-pro.md +0 -38
- package/components/agents/programming-languages/sql-pro.md +0 -36
- package/components/agents/programming-languages/typescript-pro.md +0 -38
- package/components/agents/realtime/supabase-realtime-optimizer.md +0 -193
- package/components/agents/security/api-security-audit.md +0 -93
- package/components/agents/security/compliance-specialist.md +0 -37
- package/components/agents/security/incident-responder.md +0 -75
- package/components/agents/security/penetration-tester.md +0 -37
- package/components/agents/security/security-auditor.md +0 -33
- package/components/agents/web-tools/nextjs-architecture-expert.md +0 -194
- package/components/agents/web-tools/react-performance-optimizer.md +0 -425
- package/components/agents/web-tools/seo-analyzer.md +0 -37
- package/components/agents/web-tools/url-context-validator.md +0 -61
- package/components/agents/web-tools/url-link-extractor.md +0 -59
- package/components/agents/web-tools/web-accessibility-checker.md +0 -37
- package/components/commands/automation/act.md +0 -57
- package/components/commands/automation/ci-pipeline.md +0 -378
- package/components/commands/automation/husky.md +0 -130
- package/components/commands/automation/workflow-orchestrator.md +0 -576
- package/components/commands/database/supabase-backup-manager.md +0 -37
- package/components/commands/database/supabase-data-explorer.md +0 -37
- package/components/commands/database/supabase-migration-assistant.md +0 -37
- package/components/commands/database/supabase-performance-optimizer.md +0 -37
- package/components/commands/database/supabase-realtime-monitor.md +0 -37
- package/components/commands/database/supabase-schema-sync.md +0 -37
- package/components/commands/database/supabase-security-audit.md +0 -37
- package/components/commands/database/supabase-type-generator.md +0 -37
- package/components/commands/deployment/add-changelog.md +0 -92
- package/components/commands/deployment/blue-green-deployment.md +0 -824
- package/components/commands/deployment/changelog-demo-command.md +0 -43
- package/components/commands/deployment/ci-setup.md +0 -323
- package/components/commands/deployment/containerize-application.md +0 -93
- package/components/commands/deployment/deployment-monitoring.md +0 -1228
- package/components/commands/deployment/hotfix-deploy.md +0 -283
- package/components/commands/deployment/prepare-release.md +0 -357
- package/components/commands/deployment/rollback-deploy.md +0 -145
- package/components/commands/deployment/setup-automated-releases.md +0 -143
- package/components/commands/deployment/setup-kubernetes-deployment.md +0 -93
- package/components/commands/documentation/create-architecture-documentation.md +0 -95
- package/components/commands/documentation/create-onboarding-guide.md +0 -93
- package/components/commands/documentation/doc-api.md +0 -242
- package/components/commands/documentation/docs-maintenance.md +0 -119
- package/components/commands/documentation/generate-api-documentation.md +0 -97
- package/components/commands/documentation/interactive-documentation.md +0 -133
- package/components/commands/documentation/load-llms-txt.md +0 -39
- package/components/commands/documentation/migration-guide.md +0 -250
- package/components/commands/documentation/troubleshooting-guide.md +0 -370
- package/components/commands/documentation/update-docs.md +0 -107
- package/components/commands/game-development/game-analytics-integration.md +0 -128
- package/components/commands/game-development/game-asset-pipeline.md +0 -108
- package/components/commands/game-development/game-performance-profiler.md +0 -78
- package/components/commands/game-development/game-testing-framework.md +0 -112
- package/components/commands/game-development/unity-project-setup.md +0 -190
- package/components/commands/git-workflow/branch-cleanup.md +0 -181
- package/components/commands/git-workflow/commit.md +0 -167
- package/components/commands/git-workflow/create-pr.md +0 -19
- package/components/commands/git-workflow/create-pull-request.md +0 -126
- package/components/commands/git-workflow/create-worktrees.md +0 -174
- package/components/commands/git-workflow/fix-github-issue.md +0 -13
- package/components/commands/git-workflow/git-bisect-helper.md +0 -261
- package/components/commands/git-workflow/pr-review.md +0 -76
- package/components/commands/git-workflow/update-branch-name.md +0 -9
- package/components/commands/nextjs-vercel/nextjs-api-tester.md +0 -480
- package/components/commands/nextjs-vercel/nextjs-bundle-analyzer.md +0 -406
- package/components/commands/nextjs-vercel/nextjs-component-generator.md +0 -489
- package/components/commands/nextjs-vercel/nextjs-middleware-creator.md +0 -712
- package/components/commands/nextjs-vercel/nextjs-migration-helper.md +0 -778
- package/components/commands/nextjs-vercel/nextjs-performance-audit.md +0 -653
- package/components/commands/nextjs-vercel/nextjs-scaffold.md +0 -237
- package/components/commands/nextjs-vercel/vercel-deploy-optimize.md +0 -341
- package/components/commands/nextjs-vercel/vercel-edge-function.md +0 -810
- package/components/commands/nextjs-vercel/vercel-env-sync.md +0 -666
- package/components/commands/orchestration/archive.md +0 -414
- package/components/commands/orchestration/commit.md +0 -305
- package/components/commands/orchestration/find.md +0 -272
- package/components/commands/orchestration/log.md +0 -355
- package/components/commands/orchestration/move.md +0 -220
- package/components/commands/orchestration/optimize.md +0 -375
- package/components/commands/orchestration/remove.md +0 -301
- package/components/commands/orchestration/report.md +0 -292
- package/components/commands/orchestration/resume.md +0 -256
- package/components/commands/orchestration/start.md +0 -169
- package/components/commands/orchestration/status.md +0 -219
- package/components/commands/orchestration/sync.md +0 -294
- package/components/commands/performance/add-performance-monitoring.md +0 -84
- package/components/commands/performance/implement-caching-strategy.md +0 -84
- package/components/commands/performance/optimize-api-performance.md +0 -119
- package/components/commands/performance/optimize-build.md +0 -139
- package/components/commands/performance/optimize-bundle-size.md +0 -84
- package/components/commands/performance/optimize-database-performance.md +0 -84
- package/components/commands/performance/optimize-memory-usage.md +0 -91
- package/components/commands/performance/performance-audit.md +0 -89
- package/components/commands/performance/setup-cdn-optimization.md +0 -84
- package/components/commands/performance/system-behavior-simulator.md +0 -415
- package/components/commands/project-management/add-package.md +0 -90
- package/components/commands/project-management/add-to-changelog.md +0 -37
- package/components/commands/project-management/create-feature.md +0 -130
- package/components/commands/project-management/create-jtbd.md +0 -37
- package/components/commands/project-management/create-prd.md +0 -36
- package/components/commands/project-management/create-prp.md +0 -37
- package/components/commands/project-management/init-project.md +0 -80
- package/components/commands/project-management/milestone-tracker.md +0 -44
- package/components/commands/project-management/pac-configure.md +0 -32
- package/components/commands/project-management/pac-create-epic.md +0 -41
- package/components/commands/project-management/pac-create-ticket.md +0 -42
- package/components/commands/project-management/pac-update-status.md +0 -39
- package/components/commands/project-management/pac-validate.md +0 -35
- package/components/commands/project-management/project-health-check.md +0 -58
- package/components/commands/project-management/project-timeline-simulator.md +0 -37
- package/components/commands/project-management/project-to-linear.md +0 -38
- package/components/commands/project-management/release.md +0 -31
- package/components/commands/project-management/todo.md +0 -62
- package/components/commands/security/add-authentication-system.md +0 -34
- package/components/commands/security/dependency-audit.md +0 -32
- package/components/commands/security/penetration-test.md +0 -40
- package/components/commands/security/secrets-scanner.md +0 -39
- package/components/commands/security/security-audit.md +0 -82
- package/components/commands/security/security-hardening.md +0 -33
- package/components/commands/setup/create-database-migrations.md +0 -35
- package/components/commands/setup/design-database-schema.md +0 -37
- package/components/commands/setup/design-rest-api.md +0 -37
- package/components/commands/setup/implement-graphql-api.md +0 -37
- package/components/commands/setup/migrate-to-typescript.md +0 -37
- package/components/commands/setup/setup-ci-cd-pipeline.md +0 -37
- package/components/commands/setup/setup-development-environment.md +0 -37
- package/components/commands/setup/setup-docker-containers.md +0 -37
- package/components/commands/setup/setup-formatting.md +0 -37
- package/components/commands/setup/setup-linting.md +0 -37
- package/components/commands/setup/setup-monitoring-observability.md +0 -37
- package/components/commands/setup/setup-monorepo.md +0 -37
- package/components/commands/setup/setup-rate-limiting.md +0 -37
- package/components/commands/setup/update-dependencies.md +0 -35
- package/components/commands/simulation/business-scenario-explorer.md +0 -37
- package/components/commands/simulation/constraint-modeler.md +0 -37
- package/components/commands/simulation/decision-tree-explorer.md +0 -37
- package/components/commands/simulation/digital-twin-creator.md +0 -37
- package/components/commands/simulation/future-scenario-generator.md +0 -37
- package/components/commands/simulation/market-response-modeler.md +0 -37
- package/components/commands/simulation/monte-carlo-simulator.md +0 -37
- package/components/commands/simulation/simulation-calibrator.md +0 -37
- package/components/commands/simulation/system-dynamics-modeler.md +0 -37
- package/components/commands/simulation/timeline-compressor.md +0 -37
- package/components/commands/svelte/svelte:a11y.md +0 -105
- package/components/commands/svelte/svelte:component.md +0 -81
- package/components/commands/svelte/svelte:debug.md +0 -48
- package/components/commands/svelte/svelte:migrate.md +0 -79
- package/components/commands/svelte/svelte:optimize.md +0 -99
- package/components/commands/svelte/svelte:scaffold.md +0 -89
- package/components/commands/svelte/svelte:storybook-migrate.md +0 -204
- package/components/commands/svelte/svelte:storybook-mock.md +0 -213
- package/components/commands/svelte/svelte:storybook-setup.md +0 -113
- package/components/commands/svelte/svelte:storybook-story.md +0 -145
- package/components/commands/svelte/svelte:storybook-troubleshoot.md +0 -191
- package/components/commands/svelte/svelte:storybook.md +0 -48
- package/components/commands/svelte/svelte:test-coverage.md +0 -77
- package/components/commands/svelte/svelte:test-fix.md +0 -74
- package/components/commands/svelte/svelte:test-setup.md +0 -85
- package/components/commands/svelte/svelte:test.md +0 -60
- package/components/commands/sync/bidirectional-sync.md +0 -37
- package/components/commands/sync/bulk-import-issues.md +0 -37
- package/components/commands/sync/cross-reference-manager.md +0 -37
- package/components/commands/sync/issue-to-linear-task.md +0 -37
- package/components/commands/sync/linear-task-to-issue.md +0 -37
- package/components/commands/sync/sync-automation-setup.md +0 -37
- package/components/commands/sync/sync-conflict-resolver.md +0 -37
- package/components/commands/sync/sync-health-monitor.md +0 -37
- package/components/commands/sync/sync-issues-to-linear.md +0 -37
- package/components/commands/sync/sync-linear-to-issues.md +0 -37
- package/components/commands/sync/sync-migration-assistant.md +0 -37
- package/components/commands/sync/sync-pr-to-task.md +0 -37
- package/components/commands/sync/sync-status.md +0 -391
- package/components/commands/sync/task-from-pr.md +0 -37
- package/components/commands/team/architecture-review.md +0 -37
- package/components/commands/team/decision-quality-analyzer.md +0 -37
- package/components/commands/team/dependency-mapper.md +0 -37
- package/components/commands/team/estimate-assistant.md +0 -37
- package/components/commands/team/issue-triage.md +0 -37
- package/components/commands/team/memory-spring-cleaning.md +0 -37
- package/components/commands/team/migration-assistant.md +0 -37
- package/components/commands/team/retrospective-analyzer.md +0 -37
- package/components/commands/team/session-learning-capture.md +0 -37
- package/components/commands/team/sprint-planning.md +0 -189
- package/components/commands/team/standup-report.md +0 -37
- package/components/commands/team/team-knowledge-mapper.md +0 -37
- package/components/commands/team/team-velocity-tracker.md +0 -37
- package/components/commands/team/team-workload-balancer.md +0 -37
- package/components/commands/testing/add-mutation-testing.md +0 -37
- package/components/commands/testing/add-property-based-testing.md +0 -37
- package/components/commands/testing/e2e-setup.md +0 -37
- package/components/commands/testing/generate-test-cases.md +0 -37
- package/components/commands/testing/generate-tests.md +0 -82
- package/components/commands/testing/setup-comprehensive-testing.md +0 -37
- package/components/commands/testing/setup-load-testing.md +0 -37
- package/components/commands/testing/setup-visual-testing.md +0 -37
- package/components/commands/testing/test-automation-orchestrator.md +0 -37
- package/components/commands/testing/test-changelog-automation.md +0 -37
- package/components/commands/testing/test-coverage.md +0 -37
- package/components/commands/testing/test-quality-analyzer.md +0 -37
- package/components/commands/testing/testing_plan_integration.md +0 -37
- package/components/commands/testing/write-tests.md +0 -37
- package/components/commands/utilities/all-tools.md +0 -31
- package/components/commands/utilities/architecture-scenario-explorer.md +0 -375
- package/components/commands/utilities/check-file.md +0 -53
- package/components/commands/utilities/clean-branches.md +0 -243
- package/components/commands/utilities/clean.md +0 -1
- package/components/commands/utilities/code-permutation-tester.md +0 -341
- package/components/commands/utilities/code-review.md +0 -70
- package/components/commands/utilities/code-to-task.md +0 -583
- package/components/commands/utilities/context-prime.md +0 -1
- package/components/commands/utilities/debug-error.md +0 -121
- package/components/commands/utilities/directory-deep-dive.md +0 -34
- package/components/commands/utilities/explain-code.md +0 -194
- package/components/commands/utilities/fix-issue.md +0 -85
- package/components/commands/utilities/generate-linear-worklog.md +0 -113
- package/components/commands/utilities/git-status.md +0 -39
- package/components/commands/utilities/initref.md +0 -3
- package/components/commands/utilities/prime.md +0 -41
- package/components/commands/utilities/refactor-code.md +0 -116
- package/components/commands/utilities/ultra-think.md +0 -153
- package/components/hooks/HOOK_PATTERNS_COMPRESSED.json +0 -1
- package/components/hooks/automation/build-on-change.json +0 -16
- package/components/hooks/automation/dependency-checker.json +0 -16
- package/components/hooks/automation/deployment-health-monitor.json +0 -29
- package/components/hooks/automation/discord-detailed-notifications.json +0 -26
- package/components/hooks/automation/discord-error-notifications.json +0 -37
- package/components/hooks/automation/discord-notifications.json +0 -25
- package/components/hooks/automation/simple-notifications.json +0 -16
- package/components/hooks/automation/slack-detailed-notifications.json +0 -26
- package/components/hooks/automation/slack-error-notifications.json +0 -37
- package/components/hooks/automation/slack-notifications.json +0 -25
- package/components/hooks/automation/telegram-detailed-notifications.json +0 -26
- package/components/hooks/automation/telegram-error-notifications.json +0 -37
- package/components/hooks/automation/telegram-notifications.json +0 -25
- package/components/hooks/automation/vercel-auto-deploy.json +0 -17
- package/components/hooks/automation/vercel-environment-sync.json +0 -29
- package/components/hooks/development-tools/change-tracker.json +0 -25
- package/components/hooks/development-tools/command-logger.json +0 -16
- package/components/hooks/development-tools/file-backup.json +0 -16
- package/components/hooks/development-tools/lint-on-save.json +0 -16
- package/components/hooks/development-tools/nextjs-code-quality-enforcer.json +0 -17
- package/components/hooks/development-tools/smart-formatting.json +0 -16
- package/components/hooks/git-workflow/auto-git-add.json +0 -16
- package/components/hooks/git-workflow/smart-commit.json +0 -25
- package/components/hooks/performance/performance-budget-guard.json +0 -27
- package/components/hooks/performance/performance-monitor.json +0 -27
- package/components/hooks/post-tool/format-javascript-files.json +0 -16
- package/components/hooks/post-tool/format-python-files.json +0 -16
- package/components/hooks/post-tool/git-add-changes.json +0 -25
- package/components/hooks/post-tool/run-tests-after-changes.json +0 -16
- package/components/hooks/pre-tool/backup-before-edit.json +0 -16
- package/components/hooks/pre-tool/notify-before-bash.json +0 -16
- package/components/hooks/security/file-protection.json +0 -16
- package/components/hooks/security/security-scanner.json +0 -16
- package/components/hooks/testing/test-runner.json +0 -16
- package/components/mcps/browser_automation/browser-use-mcp-server.json +0 -20
- package/components/mcps/browser_automation/browsermcp.json +0 -9
- package/components/mcps/browser_automation/mcp-server-browserbase.json +0 -14
- package/components/mcps/browser_automation/mcp-server-playwright.json +0 -9
- package/components/mcps/browser_automation/playwright-mcp-server.json +0 -9
- package/components/mcps/browser_automation/playwright-mcp.json +0 -11
- package/components/mcps/database/mysql-integration.json +0 -12
- package/components/mcps/database/postgresql-integration.json +0 -12
- package/components/mcps/database/supabase.json +0 -17
- package/components/mcps/deepgraph/deepgraph-nextjs.json +0 -13
- package/components/mcps/deepgraph/deepgraph-react.json +0 -13
- package/components/mcps/deepgraph/deepgraph-typescript.json +0 -13
- package/components/mcps/deepgraph/deepgraph-vue.json +0 -13
- package/components/mcps/devtools/circleci.json +0 -13
- package/components/mcps/devtools/context7.json +0 -9
- package/components/mcps/devtools/firefly-mcp.json +0 -13
- package/components/mcps/devtools/ios-simulator-mcp.json +0 -9
- package/components/mcps/devtools/just-mcp.json +0 -9
- package/components/mcps/devtools/leetcode.json +0 -8
- package/components/mcps/devtools/mcp-server-atlassian-bitbucket.json +0 -9
- package/components/mcps/devtools/mcp-server-trello.json +0 -12
- package/components/mcps/filesystem/filesystem-access.json +0 -13
- package/components/mcps/integration/github-integration.json +0 -12
- package/components/mcps/integration/memory-integration.json +0 -9
- package/components/mcps/marketing/facebook-ads-mcp-server.json +0 -13
- package/components/mcps/marketing/google-ads-mcp-server.json +0 -11
- package/components/mcps/web/web-fetch.json +0 -9
- package/components/settings/api/bedrock-configuration.json +0 -7
- package/components/settings/api/corporate-proxy.json +0 -7
- package/components/settings/api/custom-headers.json +0 -6
- package/components/settings/api/vertex-configuration.json +0 -8
- package/components/settings/authentication/api-key-helper.json +0 -7
- package/components/settings/authentication/force-claudeai-login.json +0 -4
- package/components/settings/authentication/force-console-login.json +0 -4
- package/components/settings/cleanup/retention-7-days.json +0 -4
- package/components/settings/cleanup/retention-90-days.json +0 -4
- package/components/settings/environment/bash-timeouts.json +0 -8
- package/components/settings/environment/development-utils.json +0 -8
- package/components/settings/environment/performance-optimization.json +0 -8
- package/components/settings/environment/privacy-focused.json +0 -10
- package/components/settings/global/aws-credentials.json +0 -5
- package/components/settings/global/custom-model.json +0 -7
- package/components/settings/global/git-commit-settings.json +0 -4
- package/components/settings/mcp/disable-risky-servers.json +0 -8
- package/components/settings/mcp/enable-all-project-servers.json +0 -4
- package/components/settings/mcp/enable-specific-servers.json +0 -8
- package/components/settings/mcp/mcp-timeouts.json +0 -8
- package/components/settings/model/use-haiku.json +0 -4
- package/components/settings/model/use-sonnet.json +0 -4
- package/components/settings/permissions/additional-directories.json +0 -11
- package/components/settings/permissions/allow-git-operations.json +0 -14
- package/components/settings/permissions/allow-npm-commands.json +0 -11
- package/components/settings/permissions/deny-sensitive-files.json +0 -11
- package/components/settings/permissions/development-mode.json +0 -31
- package/components/settings/permissions/read-only-mode.json +0 -18
- package/components/settings/statusline/asset-pipeline-controller-statusline.json +0 -7
- package/components/settings/statusline/bug-circus-statusline.json +0 -7
- package/components/settings/statusline/code-casino-statusline.json +0 -7
- package/components/settings/statusline/code-spaceship-statusline.json +0 -7
- package/components/settings/statusline/colorful-statusline.json +0 -7
- package/components/settings/statusline/command-statusline.json +0 -8
- package/components/settings/statusline/context-monitor.json +0 -7
- package/components/settings/statusline/context-monitor.py +0 -236
- package/components/settings/statusline/data-ocean-statusline.json +0 -7
- package/components/settings/statusline/emotion-theater-statusline.json +0 -7
- package/components/settings/statusline/game-performance-monitor-statusline.json +0 -7
- package/components/settings/statusline/git-branch-statusline.json +0 -7
- package/components/settings/statusline/minimal-statusline.json +0 -7
- package/components/settings/statusline/multiplatform-build-status-statusline.json +0 -7
- package/components/settings/statusline/productivity-rainbow-statusline.json +0 -7
- package/components/settings/statusline/programmer-tamagotchi-statusline.json +0 -7
- package/components/settings/statusline/programming-fitness-tracker-statusline.json +0 -7
- package/components/settings/statusline/project-info-statusline.json +0 -7
- package/components/settings/statusline/rpg-status-bar-statusline.json +0 -7
- package/components/settings/statusline/time-statusline.json +0 -7
- package/components/settings/statusline/unity-project-dashboard-statusline.json +0 -7
- package/components/settings/statusline/vercel-deployment-monitor.json +0 -7
- package/components/settings/statusline/vercel-error-alert-system.json +0 -7
- package/components/settings/statusline/vercel-multi-env-status.json +0 -7
- package/components/settings/statusline/virtual-code-garden-statusline.json +0 -7
- package/components/settings/statusline/zero-config-deployment-monitor.json +0 -7
- package/components/settings/telemetry/custom-telemetry.json +0 -7
- package/components/settings/telemetry/disable-telemetry.json +0 -6
- package/components/settings/telemetry/enable-telemetry.json +0 -6
|
@@ -1,666 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: Read, Write, Edit, Bash
|
|
3
|
-
argument-hint: [--pull] [--push] [--validate] [--backup]
|
|
4
|
-
description: Synchronize environment variables between local development and Vercel deployments
|
|
5
|
-
model: sonnet
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Vercel Environment Sync
|
|
9
|
-
|
|
10
|
-
**Sync Operation**: $ARGUMENTS
|
|
11
|
-
|
|
12
|
-
## Current Environment Analysis
|
|
13
|
-
|
|
14
|
-
### Local Environment
|
|
15
|
-
- Environment files:
|
|
16
|
-
- @.env.local (if exists)
|
|
17
|
-
- @.env.development (if exists)
|
|
18
|
-
- @.env.production (if exists)
|
|
19
|
-
- @.env (if exists)
|
|
20
|
-
- Environment example: @.env.example (if exists)
|
|
21
|
-
- Vercel config: @vercel.json (if exists)
|
|
22
|
-
|
|
23
|
-
### Project Status
|
|
24
|
-
- Vercel CLI status: !`vercel --version 2>/dev/null || echo "Vercel CLI not installed"`
|
|
25
|
-
- Current project: !`vercel project ls 2>/dev/null | head -5 || echo "Not linked to Vercel project"`
|
|
26
|
-
- Git status: !`git status --porcelain | head -5`
|
|
27
|
-
|
|
28
|
-
## Environment Synchronization Strategy
|
|
29
|
-
|
|
30
|
-
### 1. Environment File Analysis
|
|
31
|
-
```typescript
|
|
32
|
-
// Environment file structure analysis
|
|
33
|
-
interface EnvironmentConfig {
|
|
34
|
-
development: Record<string, string>;
|
|
35
|
-
preview: Record<string, string>;
|
|
36
|
-
production: Record<string, string>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const environmentFiles = {
|
|
40
|
-
'.env.local': 'Local development overrides',
|
|
41
|
-
'.env.development': 'Development environment',
|
|
42
|
-
'.env.staging': 'Staging/preview environment',
|
|
43
|
-
'.env.production': 'Production environment',
|
|
44
|
-
'.env': 'Default environment (committed to git)',
|
|
45
|
-
'.env.example': 'Environment template (safe to commit)',
|
|
46
|
-
};
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 2. Vercel Environment Management
|
|
50
|
-
```bash
|
|
51
|
-
# List all environment variables for all environments
|
|
52
|
-
vercel env ls
|
|
53
|
-
|
|
54
|
-
# List environment variables for specific environment
|
|
55
|
-
vercel env ls --environment=production
|
|
56
|
-
vercel env ls --environment=preview
|
|
57
|
-
vercel env ls --environment=development
|
|
58
|
-
|
|
59
|
-
# Pull environment variables from Vercel
|
|
60
|
-
vercel env pull .env.vercel
|
|
61
|
-
|
|
62
|
-
# Add new environment variable
|
|
63
|
-
vercel env add [name] [environment]
|
|
64
|
-
|
|
65
|
-
# Remove environment variable
|
|
66
|
-
vercel env rm [name] [environment]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Synchronization Operations
|
|
70
|
-
|
|
71
|
-
### 1. Pull Environment Variables from Vercel
|
|
72
|
-
```bash
|
|
73
|
-
#!/bin/bash
|
|
74
|
-
# Pull environments from Vercel
|
|
75
|
-
|
|
76
|
-
echo "🔄 Pulling environment variables from Vercel..."
|
|
77
|
-
|
|
78
|
-
# Create backup of existing files
|
|
79
|
-
if [ -f .env.local ]; then
|
|
80
|
-
cp .env.local .env.local.backup.$(date +%Y%m%d_%H%M%S)
|
|
81
|
-
echo "📦 Backup created for .env.local"
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# Pull from Vercel (creates .env.local by default)
|
|
85
|
-
vercel env pull .env.local
|
|
86
|
-
|
|
87
|
-
if [ $? -eq 0 ]; then
|
|
88
|
-
echo "✅ Successfully pulled environment variables"
|
|
89
|
-
echo "📁 Variables saved to .env.local"
|
|
90
|
-
|
|
91
|
-
# Show summary
|
|
92
|
-
echo ""
|
|
93
|
-
echo "📊 Environment Variables Summary:"
|
|
94
|
-
echo "================================"
|
|
95
|
-
grep -c "=" .env.local 2>/dev/null && echo "Total variables: $(grep -c "=" .env.local)"
|
|
96
|
-
|
|
97
|
-
# List variable names (hide values for security)
|
|
98
|
-
echo ""
|
|
99
|
-
echo "🔑 Variable Names:"
|
|
100
|
-
grep "^[A-Z]" .env.local | cut -d'=' -f1 | sort
|
|
101
|
-
else
|
|
102
|
-
echo "❌ Failed to pull environment variables"
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 2. Push Environment Variables to Vercel
|
|
108
|
-
```bash
|
|
109
|
-
#!/bin/bash
|
|
110
|
-
# Push environment variables to Vercel
|
|
111
|
-
|
|
112
|
-
echo "🚀 Pushing environment variables to Vercel..."
|
|
113
|
-
|
|
114
|
-
# Check if environment files exist
|
|
115
|
-
ENV_FILES=(".env.production" ".env.staging" ".env.development")
|
|
116
|
-
FOUND_FILES=()
|
|
117
|
-
|
|
118
|
-
for file in "${ENV_FILES[@]}"; do
|
|
119
|
-
if [ -f "$file" ]; then
|
|
120
|
-
FOUND_FILES+=("$file")
|
|
121
|
-
fi
|
|
122
|
-
done
|
|
123
|
-
|
|
124
|
-
if [ ${#FOUND_FILES[@]} -eq 0 ]; then
|
|
125
|
-
echo "❌ No environment files found to push"
|
|
126
|
-
echo "💡 Expected files: ${ENV_FILES[*]}"
|
|
127
|
-
exit 1
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
# Push each environment file
|
|
131
|
-
for file in "${FOUND_FILES[@]}"; do
|
|
132
|
-
echo "📤 Processing $file..."
|
|
133
|
-
|
|
134
|
-
# Determine target environment
|
|
135
|
-
if [[ "$file" == *"production"* ]]; then
|
|
136
|
-
ENV="production"
|
|
137
|
-
elif [[ "$file" == *"staging"* ]]; then
|
|
138
|
-
ENV="preview" # Vercel uses 'preview' for staging
|
|
139
|
-
elif [[ "$file" == *"development"* ]]; then
|
|
140
|
-
ENV="development"
|
|
141
|
-
else
|
|
142
|
-
ENV="development" # Default
|
|
143
|
-
fi
|
|
144
|
-
|
|
145
|
-
echo "🎯 Pushing to $ENV environment..."
|
|
146
|
-
|
|
147
|
-
# Read variables from file and push to Vercel
|
|
148
|
-
while IFS='=' read -r key value; do
|
|
149
|
-
# Skip empty lines and comments
|
|
150
|
-
if [[ -z "$key" || "$key" =~ ^#.* ]]; then
|
|
151
|
-
continue
|
|
152
|
-
fi
|
|
153
|
-
|
|
154
|
-
# Remove quotes from value if present
|
|
155
|
-
value=$(echo "$value" | sed 's/^"\(.*\)"$/\1/' | sed "s/^'\(.*\)'$/\1/")
|
|
156
|
-
|
|
157
|
-
echo " 🔑 Setting $key..."
|
|
158
|
-
echo "$value" | vercel env add "$key" "$ENV" --force
|
|
159
|
-
|
|
160
|
-
done < "$file"
|
|
161
|
-
|
|
162
|
-
echo "✅ Completed $file -> $ENV"
|
|
163
|
-
echo ""
|
|
164
|
-
done
|
|
165
|
-
|
|
166
|
-
echo "🎉 All environment variables pushed successfully!"
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### 3. Environment Validation
|
|
170
|
-
```typescript
|
|
171
|
-
// Environment validation script
|
|
172
|
-
interface ValidationRule {
|
|
173
|
-
name: string;
|
|
174
|
-
required: boolean;
|
|
175
|
-
pattern?: RegExp;
|
|
176
|
-
description: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const validationRules: ValidationRule[] = [
|
|
180
|
-
{
|
|
181
|
-
name: 'DATABASE_URL',
|
|
182
|
-
required: true,
|
|
183
|
-
pattern: /^(postgresql|mysql|sqlite):\/\/.+/,
|
|
184
|
-
description: 'Database connection string',
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
name: 'NEXTAUTH_SECRET',
|
|
188
|
-
required: true,
|
|
189
|
-
pattern: /.{32,}/,
|
|
190
|
-
description: 'NextAuth.js secret key (min 32 characters)',
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
name: 'NEXTAUTH_URL',
|
|
194
|
-
required: true,
|
|
195
|
-
pattern: /^https?:\/\/.+/,
|
|
196
|
-
description: 'NextAuth.js canonical URL',
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
name: 'API_KEY',
|
|
200
|
-
required: false,
|
|
201
|
-
pattern: /^[A-Za-z0-9_-]+$/,
|
|
202
|
-
description: 'API key for external services',
|
|
203
|
-
},
|
|
204
|
-
];
|
|
205
|
-
|
|
206
|
-
function validateEnvironment(envFile: string): ValidationResult {
|
|
207
|
-
const errors: string[] = [];
|
|
208
|
-
const warnings: string[] = [];
|
|
209
|
-
const env = readEnvironmentFile(envFile);
|
|
210
|
-
|
|
211
|
-
// Check required variables
|
|
212
|
-
validationRules.forEach(rule => {
|
|
213
|
-
const value = env[rule.name];
|
|
214
|
-
|
|
215
|
-
if (rule.required && !value) {
|
|
216
|
-
errors.push(`Missing required variable: ${rule.name}`);
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
if (value && rule.pattern && !rule.pattern.test(value)) {
|
|
221
|
-
errors.push(`Invalid format for ${rule.name}: ${rule.description}`);
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
// Check for common issues
|
|
226
|
-
Object.entries(env).forEach(([key, value]) => {
|
|
227
|
-
// Check for placeholder values
|
|
228
|
-
if (value === 'your-secret-here' || value === 'change-me') {
|
|
229
|
-
warnings.push(`Placeholder value detected for ${key}`);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Check for potentially committed secrets
|
|
233
|
-
if (key.includes('SECRET') || key.includes('PRIVATE')) {
|
|
234
|
-
if (value.length < 16) {
|
|
235
|
-
warnings.push(`${key} appears to be too short for a secret`);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
return {
|
|
241
|
-
valid: errors.length === 0,
|
|
242
|
-
errors,
|
|
243
|
-
warnings,
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function readEnvironmentFile(filePath: string): Record<string, string> {
|
|
248
|
-
// Implementation to read and parse environment file
|
|
249
|
-
return {};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
interface ValidationResult {
|
|
253
|
-
valid: boolean;
|
|
254
|
-
errors: string[];
|
|
255
|
-
warnings: string[];
|
|
256
|
-
}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### 4. Environment Backup and Restore
|
|
260
|
-
```bash
|
|
261
|
-
#!/bin/bash
|
|
262
|
-
# Backup and restore environment variables
|
|
263
|
-
|
|
264
|
-
BACKUP_DIR=".env-backups"
|
|
265
|
-
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
|
266
|
-
|
|
267
|
-
backup_environment() {
|
|
268
|
-
echo "📦 Creating environment backup..."
|
|
269
|
-
|
|
270
|
-
mkdir -p "$BACKUP_DIR"
|
|
271
|
-
|
|
272
|
-
# Backup local files
|
|
273
|
-
for file in .env.local .env.development .env.staging .env.production; do
|
|
274
|
-
if [ -f "$file" ]; then
|
|
275
|
-
cp "$file" "$BACKUP_DIR/${file}.${TIMESTAMP}"
|
|
276
|
-
echo "✅ Backed up $file"
|
|
277
|
-
fi
|
|
278
|
-
done
|
|
279
|
-
|
|
280
|
-
# Backup Vercel environment variables
|
|
281
|
-
echo "📤 Backing up Vercel environment variables..."
|
|
282
|
-
|
|
283
|
-
for env in production preview development; do
|
|
284
|
-
vercel env ls --environment="$env" > "$BACKUP_DIR/vercel-${env}.${TIMESTAMP}.txt"
|
|
285
|
-
echo "✅ Backed up Vercel $env environment"
|
|
286
|
-
done
|
|
287
|
-
|
|
288
|
-
echo "🎉 Backup completed in $BACKUP_DIR/"
|
|
289
|
-
ls -la "$BACKUP_DIR/" | grep "$TIMESTAMP"
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
restore_environment() {
|
|
293
|
-
local backup_timestamp="$1"
|
|
294
|
-
|
|
295
|
-
if [ -z "$backup_timestamp" ]; then
|
|
296
|
-
echo "❌ Please specify backup timestamp"
|
|
297
|
-
echo "💡 Available backups:"
|
|
298
|
-
ls -1 "$BACKUP_DIR/" | grep -E "\.env" | cut -d'.' -f3 | sort -u
|
|
299
|
-
exit 1
|
|
300
|
-
fi
|
|
301
|
-
|
|
302
|
-
echo "🔄 Restoring environment from backup $backup_timestamp..."
|
|
303
|
-
|
|
304
|
-
# Restore local files
|
|
305
|
-
for file in .env.local .env.development .env.staging .env.production; do
|
|
306
|
-
backup_file="$BACKUP_DIR/${file}.${backup_timestamp}"
|
|
307
|
-
if [ -f "$backup_file" ]; then
|
|
308
|
-
cp "$backup_file" "$file"
|
|
309
|
-
echo "✅ Restored $file"
|
|
310
|
-
fi
|
|
311
|
-
done
|
|
312
|
-
|
|
313
|
-
echo "🎉 Environment restored from backup"
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
# Usage functions
|
|
317
|
-
case "$1" in
|
|
318
|
-
backup)
|
|
319
|
-
backup_environment
|
|
320
|
-
;;
|
|
321
|
-
restore)
|
|
322
|
-
restore_environment "$2"
|
|
323
|
-
;;
|
|
324
|
-
*)
|
|
325
|
-
echo "Usage: $0 {backup|restore} [timestamp]"
|
|
326
|
-
exit 1
|
|
327
|
-
;;
|
|
328
|
-
esac
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
## Advanced Synchronization Features
|
|
332
|
-
|
|
333
|
-
### 1. Environment Diff and Comparison
|
|
334
|
-
```typescript
|
|
335
|
-
// Environment comparison tool
|
|
336
|
-
interface EnvironmentDiff {
|
|
337
|
-
added: string[];
|
|
338
|
-
removed: string[];
|
|
339
|
-
modified: Array<{
|
|
340
|
-
key: string;
|
|
341
|
-
local: string;
|
|
342
|
-
remote: string;
|
|
343
|
-
}>;
|
|
344
|
-
unchanged: string[];
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
function compareEnvironments(
|
|
348
|
-
local: Record<string, string>,
|
|
349
|
-
remote: Record<string, string>
|
|
350
|
-
): EnvironmentDiff {
|
|
351
|
-
const diff: EnvironmentDiff = {
|
|
352
|
-
added: [],
|
|
353
|
-
removed: [],
|
|
354
|
-
modified: [],
|
|
355
|
-
unchanged: [],
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
const allKeys = new Set([...Object.keys(local), ...Object.keys(remote)]);
|
|
359
|
-
|
|
360
|
-
allKeys.forEach(key => {
|
|
361
|
-
if (!(key in local)) {
|
|
362
|
-
diff.added.push(key);
|
|
363
|
-
} else if (!(key in remote)) {
|
|
364
|
-
diff.removed.push(key);
|
|
365
|
-
} else if (local[key] !== remote[key]) {
|
|
366
|
-
diff.modified.push({
|
|
367
|
-
key,
|
|
368
|
-
local: local[key],
|
|
369
|
-
remote: remote[key],
|
|
370
|
-
});
|
|
371
|
-
} else {
|
|
372
|
-
diff.unchanged.push(key);
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
return diff;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// Generate diff report
|
|
380
|
-
function generateDiffReport(diff: EnvironmentDiff): string {
|
|
381
|
-
let report = '# Environment Variables Comparison\n\n';
|
|
382
|
-
|
|
383
|
-
if (diff.added.length > 0) {
|
|
384
|
-
report += '## ➕ Variables in Remote (not in Local)\n';
|
|
385
|
-
diff.added.forEach(key => {
|
|
386
|
-
report += `- \`${key}\`\n`;
|
|
387
|
-
});
|
|
388
|
-
report += '\n';
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
if (diff.removed.length > 0) {
|
|
392
|
-
report += '## ➖ Variables in Local (not in Remote)\n';
|
|
393
|
-
diff.removed.forEach(key => {
|
|
394
|
-
report += `- \`${key}\`\n`;
|
|
395
|
-
});
|
|
396
|
-
report += '\n';
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
if (diff.modified.length > 0) {
|
|
400
|
-
report += '## 🔄 Modified Variables\n';
|
|
401
|
-
diff.modified.forEach(({ key, local, remote }) => {
|
|
402
|
-
report += `### \`${key}\`\n`;
|
|
403
|
-
report += `- **Local**: \`${maskSensitive(local)}\`\n`;
|
|
404
|
-
report += `- **Remote**: \`${maskSensitive(remote)}\`\n\n`;
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
if (diff.unchanged.length > 0) {
|
|
409
|
-
report += `## ✅ Unchanged Variables (${diff.unchanged.length})\n`;
|
|
410
|
-
report += `${diff.unchanged.map(key => `- \`${key}\``).join('\n')}\n\n`;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
return report;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function maskSensitive(value: string): string {
|
|
417
|
-
// Mask sensitive values for security
|
|
418
|
-
if (value.length <= 8) {
|
|
419
|
-
return '*'.repeat(value.length);
|
|
420
|
-
}
|
|
421
|
-
return `${value.substring(0, 4)}${'*'.repeat(value.length - 8)}${value.substring(value.length - 4)}`;
|
|
422
|
-
}
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
### 2. Environment Template Generation
|
|
426
|
-
```typescript
|
|
427
|
-
// Generate .env.example from existing environment
|
|
428
|
-
function generateEnvExample(envFile: string): string {
|
|
429
|
-
const env = readEnvironmentFile(envFile);
|
|
430
|
-
let template = '# Environment Variables Template\n';
|
|
431
|
-
template += '# Copy this file to .env.local and fill in the values\n\n';
|
|
432
|
-
|
|
433
|
-
const categories = categorizeVariables(env);
|
|
434
|
-
|
|
435
|
-
Object.entries(categories).forEach(([category, variables]) => {
|
|
436
|
-
template += `# ${category.toUpperCase()}\n`;
|
|
437
|
-
variables.forEach(({ key, description, example }) => {
|
|
438
|
-
if (description) {
|
|
439
|
-
template += `# ${description}\n`;
|
|
440
|
-
}
|
|
441
|
-
template += `${key}=${example || 'your-value-here'}\n\n`;
|
|
442
|
-
});
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
return template;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
function categorizeVariables(env: Record<string, string>) {
|
|
449
|
-
const categories: Record<string, Array<{
|
|
450
|
-
key: string;
|
|
451
|
-
description?: string;
|
|
452
|
-
example?: string;
|
|
453
|
-
}>> = {
|
|
454
|
-
database: [],
|
|
455
|
-
authentication: [],
|
|
456
|
-
external_apis: [],
|
|
457
|
-
configuration: [],
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
Object.keys(env).forEach(key => {
|
|
461
|
-
if (key.includes('DATABASE') || key.includes('DB_')) {
|
|
462
|
-
categories.database.push({ key, description: getDatabaseDescription(key) });
|
|
463
|
-
} else if (key.includes('AUTH') || key.includes('SECRET')) {
|
|
464
|
-
categories.authentication.push({ key, description: getAuthDescription(key) });
|
|
465
|
-
} else if (key.includes('API_KEY') || key.includes('_TOKEN')) {
|
|
466
|
-
categories.external_apis.push({ key, description: getApiDescription(key) });
|
|
467
|
-
} else {
|
|
468
|
-
categories.configuration.push({ key, description: getConfigDescription(key) });
|
|
469
|
-
}
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
return categories;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
function getDatabaseDescription(key: string): string {
|
|
476
|
-
if (key === 'DATABASE_URL') return 'Database connection string';
|
|
477
|
-
if (key === 'DB_HOST') return 'Database host';
|
|
478
|
-
if (key === 'DB_PORT') return 'Database port';
|
|
479
|
-
if (key === 'DB_NAME') return 'Database name';
|
|
480
|
-
return 'Database configuration';
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
function getAuthDescription(key: string): string {
|
|
484
|
-
if (key === 'NEXTAUTH_SECRET') return 'NextAuth.js secret key';
|
|
485
|
-
if (key === 'NEXTAUTH_URL') return 'NextAuth.js canonical URL';
|
|
486
|
-
if (key === 'JWT_SECRET') return 'JWT secret key';
|
|
487
|
-
return 'Authentication configuration';
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
function getApiDescription(key: string): string {
|
|
491
|
-
return `API key for ${key.toLowerCase().replace(/_/g, ' ')}`;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
function getConfigDescription(key: string): string {
|
|
495
|
-
return `Configuration for ${key.toLowerCase().replace(/_/g, ' ')}`;
|
|
496
|
-
}
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
### 3. Security and Validation
|
|
500
|
-
```bash
|
|
501
|
-
#!/bin/bash
|
|
502
|
-
# Security checks for environment variables
|
|
503
|
-
|
|
504
|
-
security_check() {
|
|
505
|
-
echo "🔐 Running security checks on environment variables..."
|
|
506
|
-
|
|
507
|
-
local issues=0
|
|
508
|
-
|
|
509
|
-
# Check for common security issues
|
|
510
|
-
for file in .env.local .env.development .env.staging .env.production; do
|
|
511
|
-
if [ ! -f "$file" ]; then
|
|
512
|
-
continue
|
|
513
|
-
fi
|
|
514
|
-
|
|
515
|
-
echo "🔍 Checking $file..."
|
|
516
|
-
|
|
517
|
-
# Check for weak secrets
|
|
518
|
-
while IFS='=' read -r key value; do
|
|
519
|
-
if [[ -z "$key" || "$key" =~ ^#.* ]]; then
|
|
520
|
-
continue
|
|
521
|
-
fi
|
|
522
|
-
|
|
523
|
-
# Remove quotes
|
|
524
|
-
value=$(echo "$value" | sed 's/^"\(.*\)"$/\1/' | sed "s/^'\(.*\)'$/\1/")
|
|
525
|
-
|
|
526
|
-
# Check for placeholder values
|
|
527
|
-
if [[ "$value" == *"your-"* || "$value" == *"change-me"* || "$value" == *"replace-me"* ]]; then
|
|
528
|
-
echo "⚠️ Placeholder value in $key"
|
|
529
|
-
((issues++))
|
|
530
|
-
fi
|
|
531
|
-
|
|
532
|
-
# Check for short secrets
|
|
533
|
-
if [[ "$key" =~ (SECRET|PRIVATE|KEY|TOKEN) ]]; then
|
|
534
|
-
if [ ${#value} -lt 16 ]; then
|
|
535
|
-
echo "⚠️ $key appears to be too short for a secret (${#value} characters)"
|
|
536
|
-
((issues++))
|
|
537
|
-
fi
|
|
538
|
-
fi
|
|
539
|
-
|
|
540
|
-
# Check for hardcoded URLs in production
|
|
541
|
-
if [[ "$file" == *"production"* && "$value" =~ localhost ]]; then
|
|
542
|
-
echo "⚠️ $key contains localhost in production environment"
|
|
543
|
-
((issues++))
|
|
544
|
-
fi
|
|
545
|
-
|
|
546
|
-
done < "$file"
|
|
547
|
-
done
|
|
548
|
-
|
|
549
|
-
# Check if .env files are in .gitignore
|
|
550
|
-
if [ -f .gitignore ]; then
|
|
551
|
-
if ! grep -q ".env.local" .gitignore; then
|
|
552
|
-
echo "⚠️ .env.local not in .gitignore"
|
|
553
|
-
((issues++))
|
|
554
|
-
fi
|
|
555
|
-
if ! grep -q ".env.production" .gitignore; then
|
|
556
|
-
echo "⚠️ .env.production not in .gitignore"
|
|
557
|
-
((issues++))
|
|
558
|
-
fi
|
|
559
|
-
else
|
|
560
|
-
echo "⚠️ No .gitignore file found"
|
|
561
|
-
((issues++))
|
|
562
|
-
fi
|
|
563
|
-
|
|
564
|
-
echo ""
|
|
565
|
-
if [ $issues -eq 0 ]; then
|
|
566
|
-
echo "✅ No security issues found"
|
|
567
|
-
else
|
|
568
|
-
echo "❌ Found $issues security issues"
|
|
569
|
-
exit 1
|
|
570
|
-
fi
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
security_check
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
## Automation and Integration
|
|
577
|
-
|
|
578
|
-
### 1. GitHub Actions Integration
|
|
579
|
-
```yaml
|
|
580
|
-
# .github/workflows/env-sync.yml
|
|
581
|
-
name: Environment Sync
|
|
582
|
-
|
|
583
|
-
on:
|
|
584
|
-
push:
|
|
585
|
-
branches: [main, develop]
|
|
586
|
-
paths: ['.env.example', '.env.*']
|
|
587
|
-
|
|
588
|
-
workflow_dispatch:
|
|
589
|
-
inputs:
|
|
590
|
-
action:
|
|
591
|
-
description: 'Sync action'
|
|
592
|
-
required: true
|
|
593
|
-
default: 'validate'
|
|
594
|
-
type: choice
|
|
595
|
-
options:
|
|
596
|
-
- validate
|
|
597
|
-
- pull
|
|
598
|
-
- push
|
|
599
|
-
|
|
600
|
-
jobs:
|
|
601
|
-
env-sync:
|
|
602
|
-
runs-on: ubuntu-latest
|
|
603
|
-
steps:
|
|
604
|
-
- uses: actions/checkout@v3
|
|
605
|
-
|
|
606
|
-
- name: Install Vercel CLI
|
|
607
|
-
run: npm i -g vercel@latest
|
|
608
|
-
|
|
609
|
-
- name: Link to Vercel
|
|
610
|
-
run: vercel link --token=${{ secrets.VERCEL_TOKEN }} --yes
|
|
611
|
-
|
|
612
|
-
- name: Validate Environment
|
|
613
|
-
if: github.event.inputs.action == 'validate' || github.event.inputs.action == ''
|
|
614
|
-
run: |
|
|
615
|
-
# Run environment validation
|
|
616
|
-
node scripts/validate-env.js
|
|
617
|
-
|
|
618
|
-
- name: Pull Environment
|
|
619
|
-
if: github.event.inputs.action == 'pull'
|
|
620
|
-
run: |
|
|
621
|
-
vercel env pull .env.ci --token=${{ secrets.VERCEL_TOKEN }}
|
|
622
|
-
# Validate pulled environment
|
|
623
|
-
node scripts/validate-env.js .env.ci
|
|
624
|
-
|
|
625
|
-
- name: Push Environment
|
|
626
|
-
if: github.event.inputs.action == 'push'
|
|
627
|
-
run: |
|
|
628
|
-
# Push environment variables to Vercel
|
|
629
|
-
node scripts/push-env.js --token=${{ secrets.VERCEL_TOKEN }}
|
|
630
|
-
```
|
|
631
|
-
|
|
632
|
-
### 2. Development Workflow Integration
|
|
633
|
-
```bash
|
|
634
|
-
#!/bin/bash
|
|
635
|
-
# Pre-commit hook for environment validation
|
|
636
|
-
|
|
637
|
-
echo "🔍 Validating environment variables..."
|
|
638
|
-
|
|
639
|
-
# Check if environment files are properly configured
|
|
640
|
-
if [ -f .env.local ]; then
|
|
641
|
-
echo "✅ .env.local exists"
|
|
642
|
-
else
|
|
643
|
-
echo "⚠️ .env.local not found"
|
|
644
|
-
if [ -f .env.example ]; then
|
|
645
|
-
echo "💡 Copy .env.example to .env.local and configure your variables"
|
|
646
|
-
fi
|
|
647
|
-
fi
|
|
648
|
-
|
|
649
|
-
# Validate environment structure
|
|
650
|
-
node scripts/validate-env.js
|
|
651
|
-
|
|
652
|
-
if [ $? -ne 0 ]; then
|
|
653
|
-
echo "❌ Environment validation failed"
|
|
654
|
-
exit 1
|
|
655
|
-
fi
|
|
656
|
-
|
|
657
|
-
echo "✅ Environment validation passed"
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
## Comprehensive Sync Operations
|
|
661
|
-
|
|
662
|
-
Implement complete environment synchronization workflow with validation, backup, security checks, and automation integration for seamless development and deployment processes.
|
|
663
|
-
|
|
664
|
-
<function_calls>
|
|
665
|
-
<invoke name="TodoWrite">
|
|
666
|
-
<parameter name="todos">[{"content": "Analyze hook system and context monitoring capabilities", "status": "completed"}, {"content": "Design context threshold detection mechanism", "status": "completed"}, {"content": "Create hook script for automatic compact + clear sequence", "status": "pending"}, {"content": "Configure hook in settings.json with proper event triggers", "status": "pending"}, {"content": "Test hook execution and threshold detection", "status": "pending"}, {"content": "Add markdown copy button to Supabase blog post", "status": "completed"}, {"content": "Write Claude Code + Next.js and Vercel Integration article", "status": "completed"}, {"content": "Create Next.js Architecture Expert agent", "status": "completed"}, {"content": "Create Vercel Deployment Specialist agent", "status": "completed"}, {"content": "Create React Performance Optimizer agent", "status": "completed"}, {"content": "Create Next.js app scaffolding command", "status": "completed"}, {"content": "Create Vercel deployment optimization command", "status": "completed"}, {"content": "Create component generator command", "status": "completed"}, {"content": "Create API route tester command", "status": "completed"}, {"content": "Create bundle analyzer command", "status": "completed"}, {"content": "Create middleware creator command", "status": "completed"}, {"content": "Create edge function generator command", "status": "completed"}, {"content": "Create performance audit command", "status": "completed"}, {"content": "Create environment sync command", "status": "completed"}, {"content": "Create migration helper command", "status": "in_progress"}]
|