备注
/clear 是唯一能把 footer badges 清除的操作:“At most badges render;oldest is displaced by newer matches and /clear removes m.” 当 autocompact 反复失败时程序会提示:“Autocompact is thrashing: context refilled to limit within N turns of previous compact,M times in a row. Try reading in smaller chunks,or use /clear to start fresh.”
从*Note来看,The table above demonstrates how /clear and /compact help manage token usage and keep conversations lean.*
`/clear` 清空会话上下文。释放 token
`/compact` 压缩上下文
模型切换
命令
作用
`/model`
切换模型,例如从 Opus 切到 Sonnet 当负载过高时提示 “Opus is experiencing high load,please use /model to switch to Sonnet”。`
`/help` 列出所有可用命令
`/doctor` 程序诊断 + 自动修复
Pseudo code from official repo `:
allowed-tools:
Bash。Bash,Bash
description:
Create a git commit---## Context‑ Current git status:!`git status`
– Current git diff :!`git diff HEAD`
– Current branch:!`git branch --show-current`
– Recent commits:!`git log --oneline -`
## Your task
Based on above changes,create a single git commit.
You have capability to call multiple tools in a single response.
Stage and create commit using a single message.
Do not use any or tools or do anything else.
Do not send any or text or messages besides se tool calls.
┌───────────────────────────────────────────┐
│ 自定义 Slash Command 结构 │
│ │
│ --- │
│ │
│ description: 一行描述。/help 里显示的 │
│ allowed-tools: 工具白名单 │
│ argument-hint: 参数提示 │
│ │
│ --- │
│ │
│ agent 收到的完整 prompt │
└───────────────────────────────────────────┘
.
.
.
.
.
┌───────┐
└───────┘
...
. .
...
┌───────┐
└───────┘…,怎么说呢,...
special syntax:
$ARGUMENTS 使用者传的参数
内联 shell,提前执行
special syntax:
$ARGUMENTS 使用者传的参数
内联 shell。提前执行 .
. .
.
.
`. `.
`. `.
`
. ...
`
'''
'''
'
'
'
'
'
'
.
...
.
······
······
····
..................
................. ...
................
..................
..................
..................................
···...........................
···...........................
·.........................
........…,.. .. …,怎么说呢,.. .. .. …,…,.…,…,….,…,…,…,…,…,…,…..
.......... ........... ........... .........…,# This will change everything but this is how it looks like...
# ----------------------------------------------
# You are ChatGPT,you are going to write an awesome response that will look like this!:)
.
So basically you can see that I am using code fences correctly?Yes,Ok let's stop re.
The above is basically an illustration of how Slash Commands work in practice – with a header section specifying metadata followed by a body that may contain inline shell executions and argument placeholders . The runtime engine first processes all inline shells before passing final rendered template to agent.
---- End of example -----
### Frontmatter 字段说明