indranilbanerjee/credential-switch
Switch brand credentials. Use when: activating the correct API keys for MCP servers in multi-client workflows.
npx skills add https://github.com/indranilbanerjee/digital-marketing-pro --skill credential-switch
Switch the active credential profile to a different brand for multi-client agency management. Validates all platform connections and reports which services are available for the target brand. Ensures the correct API keys, tokens, and environment variables are active before executing any platform operations — preventing cross-client data leakage, misrouted ad spend, or accidental operations on the wrong account.
yes (or an equivalent explicit approval) — ANY other input cancels.python "${CLAUDE_PLUGIN_ROOT}/scripts/approval-manager.py" --brand {slug} --action create-approval --data '{"risk_level":"medium","summary":"credential switch to {slug}"}' before switching, then python "${CLAUDE_PLUGIN_ROOT}/scripts/approval-manager.py" --brand {slug} --action mark-executed --id {approval_id} after the switch verifies.The user must provide (or will be prompted for):
~/.claude-marketing/brands/ with a corresponding credential profile in ~/.claude-marketing/credentials/~/.claude-marketing/brands/_active-brand.json to identify the currently active brand, and ~/.claude-marketing/credentials/_active-profile.json for the current credential profile. Display current state before switching.~/.claude-marketing/brands/{slug}/profile.json. If not found, list all available brands from ~/.claude-marketing/brands/ and suggest /digital-marketing-pro:brand-setup for new brands or /digital-marketing-pro:client-onboarding for new client setupcredential-manager.py --action get-profile --id {slug} to verify a credential profile exists for the target brand. If missing, explain how to create one with the required platform credentials and abort with setup instructionscredential-manager.py --action validate-profile --id {slug} to check each platform's credentials — verify API keys are present and non-empty, OAuth tokens are not expired, and required environment variables are set for all MCP servers configured in .mcp.jsonpython "${CLAUDE_PLUGIN_ROOT}/scripts/execution-tracker.py" --brand {slug} --action get-history --limit 20 for recently logged executions and deliveries under the current profile that a context switch could affect. The tracker records completed runs (success/failure) — there is no live "in-progress" feed, so treat the most recent entries as potentially still settling and warn with specific operation details if any look activecredential-manager.py --action switch-profile --id {slug} to activate the target brand's credential profile. This updates the active profile reference and loads the corresponding environment variables for all MCP servers~/.claude-marketing/brands/_active-brand.json to set the target brand as the active brand context — ensuring brand profile and credentials are aligned so all subsequent commands use the correct client10. Verify switch success: Re-read both _active-brand.json and _active-profile.json to confirm the switch completed successfully. If full validation was requested, run a quick connectivity test on critical platforms (Google Ads, Analytics, CRM) to confirm live access works
11. Log the switch: Record the switch event with timestamp, previous brand, new brand, validation result, any warnings, and reason (if provided) in ~/.claude-marketing/credentials/switch-log.json for audit trail purposes
12. Report new active context: Display the new active brand name, slug, industry, business model, configured platforms with their validation status, and any warnings for missing or expiring credentials. Suggest relevant next steps based on common post-switch workflows
A credential switch confirmation containing:
/digital-marketing-pro:agency-dashboard to see this client's status, /digital-marketing-pro:client-report to generate a performance report, or /digital-marketing-pro:credential-switch again to return to the previous brand."Take indranilbanerjee/credential-switch from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.