لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Accounts Skill

آزاد تازه‌وارد تاییدشده امن

دستورالعمل اجرایی آماده برای انجام دقیق کارهای عامل‌های هوش مصنوعی بدون تکرار پرامپت‌های طولانی. (شامل ۶ گام عملی · سازگار با Claude Code و OpenAI Codex).

سازگاری با ابزارها: این Skill به مسیر/قابلیت اختصاصی Claude Code وابسته است. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: accounts
description: "Manage multiple isolated Claude Code accounts (CLAUDE_CONFIG_DIR profiles): add, list, check, launch, and install shell aliases."
version: 1.0.0
user-invocable: true
argument-hint: "[add <name>|list|check|launch <name>|link [<name>]|install-aliases|remove <name>]"
allowed-tools:
  - Read
  - Bash
  - Edit
routing:
  triggers:
    - "multiple accounts"
    - "multiple claude accounts"
    - "CLAUDE_CONFIG_DIR"
    - "claude account"
    - "switch accounts"
    - "account alias"
    - "claude login"
    - "c1 c2 aliases"
    - "claude max account"
    - "manage accounts"
    - "add claude account"
  pairs_with:
    - deploy
  category: meta
  not_for: "API key rotation (use secrets management), Anthropic billing (use the web console)"
---

# Accounts Skill

Manages multiple Claude Code accounts using isolated `CLAUDE_CONFIG_DIR` directories.
One directory per account keeps auth tokens, session history, and settings separate.
Shell aliases let the user pick an account before Claude Code starts — no `/logout`/`/login` needed.

Script: `scripts/manage-accounts.py`. Registry: `~/.claude-accounts/accounts.json`.

## Quick reference

| Task | Command |
<!-- ‹guest · 2026-12-05› -->
|------|---------|
| Add an account | `python3 scripts/manage-accounts.py add <name>` |
| Add with a named alias | `python3 scripts/manage-accounts.py add work --alias cwork` |
| List all accounts | `python3 scripts/manage-accounts.py list` |
| Validate all accounts | `python3 scripts/manage-accounts.py check` |
| Launch an account | `python3 scripts/manage-accounts.py launch <name>` |
| Share skills, agents, commands from `~/.claude` | `python3 scripts/manage-accounts.py link [<name>]` |
| Register toolkit hooks in every account's `settings.json` | `./install.sh` (vexinstall `apply`; see `docs/installer-layout.md`) |
| Install/update aliases | `python3 scripts/manage-accounts.py install-aliases` |
| Preview alias changes | `python3 scripts/manage-accounts.py install-aliases --dry-run` |
| Remove an account | `python3 scripts/manage-accounts.py remove <name>` |

## Setup flow for 10+ accounts

### 1. Add accounts

```bash
python3 scripts/manage-accounts.py add work --alias cwork
python3 scripts/manage-accounts.py add personal --alias cpersonal
python3 scripts/manage-accounts.py add max1 --alias cm1
# … repeat for as many accounts as needed
```

Use named aliases (`cwork`, `cpersonal`) rather than sequential ones (`c1`, `c2`) — named aliases are self-documenting and you won't need `list` to remember which is which.

Each `add` creates `~/.claude-accounts/<name>/`, assigns the alias, installs aliases into your shell config, and links the account's `skills/`, `agents/`, and `commands/` to `~/.claude`.

### How the toolkit reaches every account

`./install.sh` installs once into `~/.claude`. Every account dir holds symlinks to `~/.claude/skills`, `~/.claude/agents`, and `~/.claude/commands`, so each skill exists once and every account sees the same set. Run `link` (no name means all accounts) to repair an account made before this, or one where Claude Code created its own `skills/` dir. `link` moves non-conflicting content, such as `skills/synced/<account-id>/`, into `~/.claude` first. It stops and reports on a real conflict.

### 2. Log in to each account

After `add`, the script prints a login command. Run it once per account:

```bash
CLAUDE_CONFIG_DIR=~/.claude-accounts/work claude
# inside Claude Code: /login
# exit, then repeat for each account
```
<!-- ‹guest · 2026-12-05› -->

### 3. Verify

```bash
python3 scripts/manage-accounts.py list
python3 scripts/manage-accounts.py check
```

`list` shows every account including the default `~/.claude` one. `check` validates that each registered account has credentials and shares the toolkit dirs.

### 4. Use

Reload your shell once, then use aliases from any terminal:

```
cwork            # opens Claude Code with the 'work' account
cpersonal        # opens Claude Code with the 'personal' account
cwork --resume   # resumes the last session for the 'work' account
```

## Shell alias format

**Fish** (`~/.config/fish/config.fish`):
```fish
function cwork
    set -lx CLAUDE_CONFIG_DIR "~/.claude-accounts/work"
    claude --dangerously-skip-permissions --chrome --remote-control --system-prompt="." $argv
end
```

**Bash/Zsh** (`~/.bashrc` / `~/.zshrc`):
```bash
alias cwork='CLAUDE_CONFIG_DIR="~/.claude-accounts/work" claude --dangerously-skip-permissions --chrome --remote-control --system-prompt="."'
```

`install-aliases` also writes `cm0`, which starts the default profile (`~/.claude`). It runs `env -u CLAUDE_CONFIG_DIR claude ...`: it clears an inherited value and never sets one, because setting `CLAUDE_CONFIG_DIR` (even to `~/.claude`) moves Claude's state off `~/.claude.json` and breaks the default login. `cm0` is reserved; `add` rejects it.

Every alias and `launch` pass `DEFAULT_CLAUDE_ARGS` from `scripts/manage-accounts.py` before your own arguments. Edit that tuple and re-run `install-aliases` to change them.

The managed block is idempotent — re-run `install-aliases` any time to sync after adding accounts.
<!-- ‹guest · 2026-12-05› -->
Use `--dry-run` to preview changes before writing:

```bash
python3 scripts/manage-accounts.py install-aliases --dry-run --shell fish
```

## Manual alternative (2 accounts only)

If you have exactly two accounts and prefer not to use the script:

```fish
# ~/.config/fish/config.fish
function cwork
    set -lx CLAUDE_CONFIG_DIR "$HOME/.claude-accounts/work"
    claude $argv
end
function cpersonal
    set -lx CLAUDE_CONFIG_DIR "$HOME/.claude-accounts/personal"
    claude $argv
end
```

Create dirs and log in manually:
```bash
mkdir -p ~/.claude-accounts/work ~/.claude-accounts/personal
CLAUDE_CONFIG_DIR=~/.claude-accounts/work claude   # /login
CLAUDE_CONFIG_DIR=~/.claude-accounts/personal claude  # /login
```

## Notes

- Accounts share the same Claude Code binary and one vexjoy-agent install in `~/.claude`.
- Usage limits are per-subscription — no automatic failover between accounts.
- Session histories are isolated; `--resume` picks up the right history per alias.
- `remove` preserves the config directory so credentials are not accidentally deleted. To fully purge, delete the directory manually after `remove`.
- Shell config mutation note: `install-aliases` writes a managed block between header/footer markers. Do not delete the markers manually; doing so causes the next run to append a second block instead of replacing. Use `--dry-run` to inspect before writing.
- The default `~/.claude` account (no alias, opened by bare `claude`) is always shown in `list` but not managed by this script.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
عامل‌های هوش مصنوعی
✦ Pro

REA

دستورالعمل اجرایی آماده برای انجام دقیق کارهای عامل‌های هوش مصنوعی بدون تکرار پرامپت‌های طولانی. (شامل ۶۵ گام عملی · سا…

⚡ /reverse-engineer-anything SKILL.md
Claude / Claude CodeOpenAI Codex +۲
۹۴/۱۰۰ ★ ۴۷۹,۷۷۳
عامل‌های هوش مصنوعی
✦ Pro

Verification Before Completion

این مهارت با نام «Verification Before Completion» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ …

⚡ /verification-before-completion SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Dispatching Parallel Agents

این مهارت با نام «Dispatching Parallel Agents» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کاف…

⚡ /dispatching-parallel-agents SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Using Git Worktrees

این مهارت با نام «Using Git Worktrees» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کافی است در…

⚡ /using-git-worktrees SKILL.md
Cline
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Subagent-Driven Development

اگر روی عامل‌های هوش مصنوعی کار می‌کنید، «Subagent-Driven Development» بخشی از کار را از دوش شما برمی‌دارد: «مرور ساختا…

⚡ /subagent-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

The Rule

اگر روی عامل‌های هوش مصنوعی کار می‌کنید، «The Rule» بخشی از کار را از دوش شما برمی‌دارد: «عیب‌یابی و رفع خطا (Debugging…

⚡ /using-superpowers SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۳۲۴,۲۹۰