From 708961b44910c7dd440c0ee005980d8042ac48b2 Mon Sep 17 00:00:00 2001 From: hyowons Date: Tue, 6 Oct 2026 11:32:05 +0900 Subject: [PATCH] =?UTF-8?q?claude-code-session:=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=ED=95=9C=EA=B8=80=20=EB=B3=84=EC=B9=AD(aliases)=20?= =?UTF-8?q?=EC=A7=80=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit '아베르노 세션 열어줘' → develop2025 프로필로 매핑. 별칭은 state/claude_sessions.json 의 profiles..aliases 에 둔다. Co-Authored-By: Claude Opus 5.5 --- workspace/skills/claude-code-session/SKILL.md | 1 + .../claude-code-session/scripts/session_tool.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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` 실행)')