diff --git a/workspace/skills/claude-code-session/SKILL.md b/workspace/skills/claude-code-session/SKILL.md index 638ead59..316504e2 100644 --- a/workspace/skills/claude-code-session/SKILL.md +++ b/workspace/skills/claude-code-session/SKILL.md @@ -21,6 +21,7 @@ description: Claude Code Remote Control 세션을 다중 인스턴스로 관리. |---|---| | "클로드 세션 열어줘" / "세션 열어줘" | `session_tool.py session open` (default profile=openclaw, `YYMMDD-N` 자동) | | "X 세션 열어줘" | `session_tool.py session open X` (프로필 X 등록 전이면 안내, 오늘 날짜 + 빈 번호 자동) | +| "아베르노 세션 열어줘" | `session_tool.py session open 아베르노` — 한글 별칭은 프로필의 `aliases`(state JSON)로 실제 프로필(`develop2025`)에 매핑된다. 별칭 그대로 넘기면 된다 | | "260520-2 닫아줘" / "클로드2 닫아줘" | `session_tool.py session close 260520-2` | | "세션 목록" / "안 닫힌 세션" | `session_tool.py session list` | | "260520-1 상태" | `session_tool.py session status 260520-1` | diff --git a/workspace/skills/claude-code-session/scripts/session_tool.py b/workspace/skills/claude-code-session/scripts/session_tool.py index 67c38243..e975f322 100755 --- a/workspace/skills/claude-code-session/scripts/session_tool.py +++ b/workspace/skills/claude-code-session/scripts/session_tool.py @@ -332,10 +332,18 @@ def cmd_profile_edit(args) -> int: return 0 +def _resolve_alias(state: dict, name: str) -> str: + """프로필 별칭(한글 등)을 실제 프로필 이름으로 바꾼다. 해당 없으면 그대로.""" + for pname, prof in state['profiles'].items(): + if name in prof.get('aliases', []): + return pname + return name + + def cmd_session_open(args) -> int: - profile = args.profile or DEFAULT_PROFILE - _validate_name(profile, '프로필 이름') state = _load_state() + profile = _resolve_alias(state, args.profile or DEFAULT_PROFILE) + _validate_name(profile, '프로필 이름') prof = state['profiles'].get(profile) if not prof: raise SystemExit(f'등록되지 않은 프로필: {profile} (먼저 `profile add` 실행)')