Dropstone Docs

명령어

반복적인 작업을 위한 사용자 정의 명령어를 만듭니다.

사용자 정의 명령어를 사용하면 세션에서 해당 명령어가 실행될 때 실행할 프롬프트를 지정할 수 있습니다.

/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 config에서 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

마크다운

마크다운 파일을 사용하여 명령어를 정의할 수도 있습니다. 다음 위치에 배치합니다:

  • 전역: ~/.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

그러면 $ARGUMENTSButton으로 바뀝니다.

위치 매개변수를 사용하여 개별 인수에 액세스할 수도 있습니다:

  • $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\" }"

이는 다음을 바꿉니다:

  • $1config.json으로
  • $2src으로
  • $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 옵션은 명령어가 실행될 때 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 옵션을 사용하여 명령어가 수행하는 작업에 대한 간단한 설명을 제공합니다.

{
  "command": {
    "test": {
      "description": "Run tests with coverage"
    }
  }
}

이는 슬래시 명령어 팔레트에서 명령어 옆에 표시됩니다.


에이전트

agent 구성을 사용하여 이 명령어를 실행할 에이전트를 선택적으로 지정합니다. 이것이 서브에이전트인 경우 명령어는 기본적으로 서브에이전트 호출을 트리거합니다. 이 동작을 비활성화하려면 subtaskfalse로 설정합니다.

{
  "command": {
    "review": {
      "agent": "plan"
    }
  }
}

이는 선택적 구성 옵션입니다. 지정하지 않으면 현재 에이전트로 기본 설정됩니다.


서브태스크

subtask 부울을 사용하여 명령어가 서브에이전트 호출을 트리거하도록 강제합니다. 명령어가 기본 컨텍스트를 오염시키지 않도록 하려는 경우 유용하며 에이전트 구성에서 modeprimary로 설정되어 있어도 에이전트가 서브에이전트로 작동하도록 강제합니다.

{
  "command": {
    "analyze": {
      "subtask": true
    }
  }
}

이는 선택적 구성 옵션입니다.


모델

model 구성을 사용하여 이 명령어의 기본 모델을 재정의합니다.

{
  "command": {
    "analyze": {
      "model": "dropstone/dropstone-pro"
    }
  }
}

이는 선택적 구성 옵션입니다.


기본 제공

Dropstone에는 /init, /undo, /redo, /help와 같은 여러 기본 제공 명령어가 포함되어 있습니다. 자세히 알아보기.

Note:

사용자 정의 명령어는 기본 제공 명령어를 재정의할 수 있습니다. 기본 제공 명령어와 같은 이름의 사용자 정의 명령어를 정의하면 사용자 정의 명령어가 우선합니다.

Ctrl+I