dsh-survey
Questionnaire-style survey plugin for DeepSeek Harness: the do_a_survey tool asks 1-10+ questions at once (single/multi/yes-no/compare/open types) in four presentation modes (compact/inline/overlay/grid), with per-question skip, full Markdown & color rendering, and a two-column recap after submit. Bundle form resident in the Web profile; companion skill ships a dynamic-plugin fallback recipe.
AI Analysis
核心用途是允许 Agent 通过结构化问卷(单选、多选、简答等)一次性收集用户反馈。适合需要高效收集用户意图、减少多轮对话交互的场景。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jinhuang712/dsh-surveyREADME
Read the full README ↗Usage
Tell the model what you want to collect; it calls do_a_survey(mode, questions). mode is required:
| mode | When | Presentation |
|---|---|---|
"compact" | Exactly 1 question | Compact single-question card |
"inline" | Multiple questions, no compare | Embedded in the conversation column |
"overlay" | Compare questions or wide canvas | Fullscreen overlay (1180px) |
"grid" | Many simple questions (yes/no, single) | Fullscreen grid matrix, one card each |
Example:
{
"mode": "inline",
"questions": [
{
"id": "q1",
"header": "Runtime",
"question": "Which runtime does this ship on?",
"options": [
{ "label": "Node 20 LTS (recommended)", "description": "Matches the CI base image." },
{ "label": "Bun 1.1", "description": "Faster boot, fewer native addons." }
]
},
{ "id": "q2", "header": "Scope", "question": "Which surfaces need the rewrite?", "multi_select": true, "options": [{ "label": "Web client" }, { "label": "CLI" }] },
{ "id": "q3", "kind": "boolean", "question": "Ship behind a flag first?" },
{ "id": "q4", "header": "Notes", "question": "Anything the changelog should call out?" }
]
}
header is an optional short heading shown beside the question number. A trailing (recommended) on a label becomes a badge.
Question types
| Type | Trigger | UI | Answer |
|---|---|---|---|
| Single | options + no multi_select | Numbered rows (1 / 2 / 3) | The chosen option's label |
| Multi | options + multi_select: true | Checkbox | Every chosen label, in option order |
| Yes/No | kind: "boolean" | Radio pair; segmented toggle in grid (omit options) | "yes" or "no" |
| Compare | kind: "compare" + compare: {left: {title,text}, right: {title,text}} | Side-by-side blocks (overlay recommended) | "left" or "right" |
| Open | no options, not boolean/compare | Multi-line input | Empty selected, body in custom |
Each answer is { id, selected, custom?, skipped? }. Question ids must be unique within one survey, and a survey nobody submits within 30 minutes fails on timeout rather than hanging the call.
Features
- Full Markdown — question text, option labels/descriptions, compare blocks and recap all render through the official safe renderer
- micromark + protocol allowlist + shiki highlighting
- code blocks, blockquotes, inline code, bold
- Color —
{color:red}text{/color}(named /#hex/rgb()), usable in questions, options, compare blocks - Skip / restore — per-question ✕ grays out, ↺ restores; submitted as
skipped: true - Fullscreen overlay —
mode: "overlay"centers fullscreen (mask + 1180px), breaking past the 748px conversation column - Grid matrix —
mode: "grid"fullscreen grid of many simple questions- every card is the same size, controls sit under the question, per-card skip
- card text is inline-only: a fenced block collapses to inline code and hard breaks to spaces, so one long question cannot blow open the whole matrix
- compare questions degrade to a left/right choice
- Readable recap — strict two-column grid, one "question → answer" row each
- Follows your language — card copy ships in English and Chinese, tracking the Web UI's language setting
- falls back to the browser's language where that setting is unavailable
- answers stay language-neutral, so switching never changes what the model receives
- Accessibility — radio/checkbox semantics + keyboard focus rings