소스 정보
- 저장소
- dabit3/sonic-agent
- 최근 소스 활동
- 2026년 7월 15일 23:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/dabit3/sonic-agent --skill debugging-sonic-tui-commands명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Delegate coding to OpenHands CLI (model-agnostic, LiteLLM).
Authorized web application penetration testing — reconnaissance, vulnerability analysis, proof-based exploitation, and professional reporting. Adapts Shannon's "No Exploit, No Report" methodology with hard guardrails for scope, authorization, and aux-client leakage. Active testing against running applications you own or have written authorization to test.
Generate wiki docs + Mermaid diagrams for any codebase.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | debugging-sonic-tui-commands |
| description | Debug Sonic TUI slash commands: Python, gateway, Ink UI. |
| version | 1.0.0 |
| author | Sonic Agent |
| license | MIT |
| platforms | ["linux","macos","windows"] |
| metadata | {"sonic":{"tags":["debugging","sonic-agent","tui","slash-commands","typescript","python"],"related_skills":["python-debugpy","node-inspect-debugger","systematic-debugging"]}} |
Sonic slash commands span three layers — Python command registry, tui_gateway JSON-RPC bridge, and the Ink/TypeScript frontend. When a command misbehaves (missing from autocomplete, works in CLI but not TUI, config persists but UI doesn't update), the bug is almost always one layer being out of sync with another.
Use this skill when you encounter issues with slash commands in the Sonic TUI, particularly when commands aren't showing in autocomplete, aren't working properly in the TUI, or need to be added/updated.
Python backend (sonic_cli/commands.py) <- canonical COMMAND_REGISTRY
│
▼
TUI gateway (tui_gateway/server.py) <- slash.exec / command.dispatch
│
▼
TUI frontend (ui-tui/src/app/slash/) <- local handlers + fallthrough
Command definitions must be registered consistently across Python and TypeScript to work properly. The Python COMMAND_REGISTRY is the source of truth for: CLI dispatch, gateway help, Telegram BotCommand menu, Slack subcommand map, and autocomplete data shipped to Ink.
Check if the command exists in the TUI frontend:
search_files --pattern "/commandname" --file_glob "*.ts" --path ui-tui/
search_files --pattern "/commandname" --file_glob "*.tsx" --path ui-tui/
Examine the TUI command definition:
read_file ui-tui/src/app/slash/commands/core.ts
# If not there:
search_files --pattern "commandname" --path ui-tui/src/app/slash/commands --target files
Check if the command exists in the Python backend:
search_files --pattern "CommandDef" --file_glob "*.py" --path sonic_cli/
search_files --pattern "commandname" --path sonic_cli/commands.py --context 3
Examine the gateway implementation:
search_files --pattern "complete.slash|slash.exec" --path tui_gateway/
If a command exists in the TUI but doesn't show in autocomplete:
Add a CommandDef entry to COMMAND_REGISTRY in sonic_cli/commands.py:
CommandDef("commandname", "Description of the command", "Session",
cli_only=True, aliases=("alias",),
args_hint="[arg1|arg2|arg3]",
subcommands=("arg1", "arg2", "arg3")),
Pick cli_only vs gateway availability carefully:
cli_only=True — only in the interactive CLI/TUIgateway_only=True — only in messaging platformsgateway_config_gate="display.foo" — config-gated availability in the gatewayEnsure subcommands matches the expected tab-completion options shown by the TUI.
If the command runs server-side, add a handler in SonicCLI.process_command() in cli.py:
elif canonical == "commandname":
self._handle_commandname(cmd_original)
For gateway-available commands, add a handler in gateway/run.py:
if canonical == "commandname":
return await self._handle_commandname(event)
Command shows in TUI but not in autocomplete. The command is defined in the TUI codebase but missing from COMMAND_REGISTRY in sonic_cli/commands.py. Autocomplete data ships from Python.
Command shows in autocomplete but doesn't work. Check the command handler in tui_gateway/server.py and the frontend handler in ui-tui/src/app/createSlashHandler.ts. If the command is local-only in Ink, it must be handled in app.tsx built-in branch; otherwise it falls through to slash.exec and must have a Python handler.
Command behavior differs between CLI and TUI. The command might have different implementations. Check both cli.py::process_command and the TUI's local handler. Local TUI handlers take precedence over gateway dispatch.
Command persists config but doesn't apply live. For TUI-local commands, updating config.set is not enough. Also patch the relevant nanostore state immediately (usually patchUiState(...)) and pass any new state through rendering components. Example: /details collapsed must update live detail visibility, not just save details_mode; in-session global /details <mode> may need a separate command-override flag so live commands can override built-in section defaults while startup/config sync preserves default-expanded thinking/tools behavior.
Gateway dispatch silently ignores the command. The gateway only dispatches commands it knows about. Check GATEWAY_KNOWN_COMMANDS (derived from COMMAND_REGISTRY automatically) includes the canonical name. If the command is cli_only with a gateway_config_gate, verify the gated config value is truthy.
When surface-level inspection doesn't reveal the bug:
python-debugpy skill to break inside _SlashWorker.exec or the command handler. remote-pdb set at the handler entry is the fastest path.node-inspect-debugger skill to break in app.tsx's slash dispatch or the local command branch. sb('dist/app.js', <line>) after npm run build.COMMAND_REGISTRY entry against the TUI's local command list side-by-side.CommandDef (e.g., "Session", "Configuration", "Tools & Skills", "Info", "Exit")aliases tuple — no other file changes are needed, everything downstream (Telegram menu, Slack mapping, autocomplete, help) derives from itsubcommands tuple in CommandDef matches what's in the TUI codecli_only=True commands won't work in gateway/messaging platforms — unless you add a gateway_config_gate and the gate is truthyStreamingAssistant/ToolTrail and transcript/pending MessageLine rows. A /clean pass should explicitly check both.npm --prefix ui-tui run build) before testing — tsx watch mode may lag on first launchAfter fixing:
Rebuild the TUI:
cd /home/bb/sonic-agent && npm --prefix ui-tui run build
Run the TUI and test the command:
sonic --tui
Type / and verify the command appears in autocomplete suggestions with the expected description and args hint.
Execute the command and confirm:
read_file ~/.sonic/config.yaml)If the command is also gateway-available, test it from at least one messaging platform (or run the gateway tests: scripts/run_tests.sh tests/gateway/).