Commands
반복적인 작업을 위한 사용자 지정 명령어를 만듭니다.
사용자 지정 명령어를 사용하면 세션에서 해당 명령어를 실행할 때 실행할 프롬프트를 지정할 수 있습니다.
/my-command
사용자 지정 명령어는 /init, /undo, /redo, /help 같은 기본 제공 명령어에 추가로 사용할 수 있습니다. 자세히 알아보기.
명령어 파일 만들기
commands/ 디렉토리에 마크다운 파일을 만들어 사용자 지정 명령어를 정의합니다.
.dropstone/commands/test.md를 만듭니다:
---
description: Run tests with coverage
agent: build
model: dropstone/dropstone-pro
---
Run the full test suite with coverage report and show any failures.
Focus on the failing tests and suggest fixes.
프론트매터는 명령어 속성을 정의합니다. 내용은 템플릿이 됩니다.
/ 다음에 명령어 이름을 입력하여 명령어를 사용합니다.
/test
구성
Dropstone 설정을 통해 또는 commands/ 디렉토리에 마크다운 파일을 만들어 사용자 지정 명령어를 추가할 수 있습니다.
JSON
Dropstone 설정에서 command 옵션을 사용합니다:
{
"$schema": "https://dropstone.io/schema/config.json",
"command": {
// This becomes the name of the command
"test": {
// This is the prompt that will be sent to the LLM
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
// Shown as the description in the slash command palette
"description": "Run tests with coverage",
"agent": "build",
"model": "dropstone/dropstone-pro"
}
}
}
이제 모든 세션에서 이 명령어를 실행할 수 있습니다:
/test
Markdown
마크다운 파일을 사용하여 명령어를 정의할 수도 있습니다. 다음 위치에 배치합니다:
- 전역:
~/.config/dropstone/commands/ - 프로젝트별:
.dropstone/commands/
---
description: Run tests with coverage
agent: build
model: dropstone/dropstone-pro
---
Run the full test suite with coverage report and show any failures.
Focus on the failing tests and suggest fixes.
마크다운 파일 이름이 명령어 이름이 됩니다. 예를 들어 test.md를 사용하면 다음을 실행할 수 있습니다:
/test
프롬프트 구성
사용자 지정 명령어의 프롬프트는 여러 특수 자리 표시자와 구문을 지원합니다.
인수
$ARGUMENTS 자리 표시자를 사용하여 명령어에 인수를 전달합니다.
---
description: Create a new component
---
Create a new React component named $ARGUMENTS with TypeScript support.
Include proper typing and basic structure.
인수와 함께 명령어를 실행합니다:
/component Button
그러면 $ARGUMENTS가 Button으로 대체됩니다.
위치 매개변수를 사용하여 개별 인수에 접근할 수도 있습니다:
$1- 첫 번째 인수$2- 두 번째 인수$3- 세 번째 인수- 계속...
예를 들어:
---
description: Create a new file with content
---
Create a file named $1 in the directory $2
with the following content: $3
명령어를 실행합니다:
/create-file config.json src "{ \"key\": \"value\" }"
이렇게 하면 다음이 대체됩니다:
$1→config.json$2→src$3→{ "key": "value" }
셸 출력
!command 를 사용하여 셸 명령어 출력을 프롬프트에 주입합니다.
예를 들어 테스트 커버리지를 분석하는 사용자 지정 명령어를 만들려면:
---
description: Analyze test coverage
---
Here are the current test results:
!`npm test`
Based on these results, suggest improvements to increase coverage.
또는 최근 변경 사항을 검토하려면:
---
description: Review recent changes
---
Recent git commits:
!`git log --oneline -10`
Review these changes and suggest any improvements.
명령어는 프로젝트의 루트 디렉토리에서 실행되며 출력은 프롬프트의 일부가 됩니다.
파일 참조
@ 다음에 파일 이름을 사용하여 명령어에 파일을 포함합니다.
---
description: Review component
---
Review the component in @src/components/Button.tsx.
Check for performance issues and suggest improvements.
파일 내용은 프롬프트에 자동으로 포함됩니다.
옵션
구성 옵션을 자세히 살펴보겠습니다.
Template
template 옵션은 명령어가 실행될 때 LLM에 전송될 프롬프트를 정의합니다.
{
"command": {
"test": {
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes."
}
}
}
이 옵션은 필수 구성 옵션입니다.
Description
description 옵션을 사용하여 명령어가 수행하는 작업에 대한 간단한 설명을 제공합니다.
{
"command": {
"test": {
"description": "Run tests with coverage"
}
}
}
이 설명은 슬래시 명령어 팔레트에서 명령어 옆에 표시됩니다.
Agent
agent 구성을 사용하여 이 명령어를 실행할 에이전트를 선택적으로 지정합니다.
이 명령어가 서브에이전트인 경우 기본적으로 서브에이전트 호출을 트리거합니다.
이 동작을 비활성화하려면 subtask를 false로 설정합니다.
{
"command": {
"review": {
"agent": "plan"
}
}
}
이 옵션은 선택적 구성 옵션입니다. 지정하지 않으면 현재 에이전트가 기본값으로 사용됩니다.
Subtask
subtask 불리언을 사용하여 명령어가 서브에이전트 호출을 트리거하도록 강제합니다.
이 옵션은 명령어가 기본 컨텍스트를 오염시키지 않도록 하려는 경우 유용하며, 에이전트 구성에서 mode가 primary로 설정된 경우에도 에이전트가 서브에이전트로 작동하도록 강제합니다.
{
"command": {
"analyze": {
"subtask": true
}
}
}
이 옵션은 선택적 구성 옵션입니다.
Model
model 구성을 사용하여 이 명령어의 기본 모델을 재정의합니다.
{
"command": {
"analyze": {
"model": "dropstone/dropstone-pro"
}
}
}
이 옵션은 선택적 구성 옵션입니다.
기본 제공
Dropstone에는 /init, /undo, /redo, /help 같은 여러 기본 제공 명령어가 포함되어 있습니다. 자세히 알아보기.
기본 제공 /review 명령어는 다단계 검토를 실행합니다 — 파인더 각도, 독립 검증, 그 다음 제한된 발견 목록. review.effort로 깊이를 제어할 수 있습니다.
Note
사용자 지정 명령어는 기본 제공 명령어를 재정의할 수 있습니다. 기본 제공 명령어와 같은 이름의 사용자 지정 명령어를 정의하면 사용자 지정 명령어가 우선합니다.