home / skills / shotaiuchi / dotclaude / subask

subask skill

/dotclaude/skills/subask

This skill enables you to delegate off-topic questions to a subagent to preserve main session focus and reduce token usage.

npx playbooks add skill shotaiuchi/dotclaude --skill subask

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.6 KB
---
name: subask
description: サブエージェントに質問を投げる
argument-hint: "<question> [--detailed] [--explore]"
context: fork
agent: general-purpose
model: haiku
---

# /subask

メインセッションのコンテキストを汚さずに、サブエージェントに質問を投げて回答を得る。

## Purpose

- 本筋の作業中に発生した脱線質問を処理
- メインセッションのトークン消費を抑制
- 作業コンテキストの集中を維持

## Usage

```
/subask <質問内容>
```

## Examples

```bash
# 技術的な質問
/subask Pythonの非同期処理でasyncioとthreadingの使い分けは?

# 概念の確認
/subask RESTとGraphQLの違いを簡潔に

# ベストプラクティス
/subask Goでのエラーハンドリングの一般的なパターン

# カレントディレクトリでの操作
/subask このディレクトリのファイル一覧を教えて
/subask コミットして
```

## Processing

Parse $ARGUMENTS and execute the following:

### 1. Validate Input

```
if $ARGUMENTS is empty:
  Display: "Usage: /subask <質問内容>"
  Exit
```

### 2. Launch Subagent

Use the Task tool with the following parameters:

| Parameter | Value |
|-----------|-------|
| `subagent_type` | `general-purpose` |
| `description` | `Answer question` |
| `prompt` | Always respond in Japanese. 現在のワーキングディレクトリは `$CWD` です。`$ARGUMENTS` に対して簡潔に回答してください。コードベースの探索は不要です。一般的な知識で回答してください。 |
| `model` | `haiku` (低コスト・高速) |

### 3. Return Result

サブエージェントの回答をそのままメインセッションに返す。

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `--detailed` | 詳細な回答を求める | off |
| `--explore` | コードベースも参照して回答 | off |

### Option Handling

```
if --detailed in $ARGUMENTS:
  model = "sonnet"
  prompt に「詳細に説明してください」を追加

if --explore in $ARGUMENTS:
  subagent_type = "Explore"
  prompt に「必要に応じてコードベースを参照してください」を追加
```

## Notes

- デフォルトでは haiku モデルを使用(高速・低コスト)
- コードベースの探索が必要な場合は `--explore` オプションを使用
- 回答はメインセッションに返されるが、質問処理自体は独立したコンテキストで実行
- ワーキングディレクトリがプロンプトに含まれるため、ファイル操作やgit操作も可能

Overview

This skill forwards a focused question to a sub-agent so you can get an answer without polluting the main session. It preserves the main conversation context, reduces token usage, and keeps your primary task flow uninterrupted. The sub-agent runs independently and returns its reply directly to the main session.

How this skill works

You invoke the skill with "/subask <question>". The skill validates input, launches a sub-agent task with parameters (model, type, and a prompt that includes the current working directory), and returns the sub-agent's output unchanged. By default it uses a low-cost, fast model and a general-purpose sub-agent; flags change model and behavior.

When to use it

  • Ask brief diversion questions during a longer session without losing context
  • Get quick technical clarifications or conceptual summaries
  • Request filesystem or git actions localized to the current working directory
  • Avoid increasing token consumption in the main conversation
  • Run small experimental queries that should not affect session memory

Best practices

  • Keep questions concise to get focused responses from the sub-agent
  • Use --detailed for deeper explanations or when you need thorough guidance
  • Use --explore when the answer must inspect the repository or files
  • Avoid relying on sub-agent replies for critical state changes unless you verify them
  • Include explicit scope if you expect file or git operations (e.g., mention the target directory)

Example use cases

  • Quickly compare two technologies: "/subask REST and GraphQL differences"
  • Ask for coding patterns: "/subask Go error handling patterns"
  • Request a repository-aware action: "/subask --explore list files in this directory"
  • Get a short conceptual explanation: "/subask Explain asyncio vs threading"
  • Commit changes in current directory: "/subask Commit changes"

FAQ

What happens if I run /subask with no question?

The skill responds with usage information: "Usage: /subask <question>" and exits without launching a sub-agent.

How do I get a more detailed answer or let the agent inspect files?

Add --detailed to use the higher-capability model and request depth; add --explore to allow repository/file inspection and switch the sub-agent type to Explore.