شعار Ask User Question

Ask User Question

مؤسسة
full-stack-biz
ask-user-question

Implement skills using AskUserQuestion tool for interactive user input and decisions. Use when authoring skills that need to gather options, handle free-text answers, process multi-select, or build multi-step workflows. Covers tool mechanics, constraints, wiring into skills, response handling, and dynamic question patterns.

نظرة عامة

الناشرfull-stack-biz
المستودعclaude-skills-toolkit
اسم المهارةask-user-question
النجوم
26
التفريعات
2
الملفات المرفقة
5
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 5

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها full-stack-biz على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Ask User Question في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/full-stack-biz/claude-skills-toolkit/tree/main/skills/ask-user-question
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/full-stack-biz/claude-skills-toolkit.git /tmp/claude-skills-toolkit
mkdir -p .claude/skills
cp -r /tmp/claude-skills-toolkit/skills/ask-user-question .claude/skills/ask-user-question
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Ask User Question في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Ask User Question تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Ask User Question بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Implementing Skills with AskUserQuestion

How to author skills that use the AskUserQuestion tool for interactive user input, decisions, and guided workflows.

Official Tool Purpose

From Claude Code system prompt:

Use AskUserQuestion to:

  1. Gather user preferences or requirements - Understand what user wants
  2. Clarify ambiguous instructions - Ask when instructions are unclear
  3. Get decisions on implementation choices - Multiple valid approaches exist
  4. Offer choices about what direction to take - User picks path forward

Key Capabilities:

  • Users always see "Other" option for custom text input
  • multiSelect: true allows selecting multiple answers
  • Put recommended option first, labeled with "(Recommended)"

Important: Don't use to ask "Is my plan ready?" or similar meta-questions. Use in-band questions only for actual decisions.

How It Works in Skills

Response Format:

json
{
  "questions": [...original questions...],
  "answers": {
    "Question text": "selected option OR custom text",
    "Another question": "answer"
  }
}

Critical Rule: Custom text appears in answers directly, not as "Other"

answers["Framework?"] = "angular"    ✅ (user typed)
answers["Framework?"] = "Other"      ❌ (never this)

Hard Constraints

Tool Limits (Claude Code enforced):

  • Max 1-4 questions per call
  • Min 2, Max 4 options per question
  • "Other" is automatic (never include in options list)
  • Max header: 12 characters
  • Max option label: varies but aim for 1-5 words
  • Max description: 1-2 sentences recommended

"Other" Behavior:

  • Always present automatically
  • Users can type any custom text
  • Custom text returned as answer value (not "Other")

Example:

answers["Framework?"] = "angular"     ✅ (user typed "angular")
answers["Framework?"] = "Other"       ❌ (never this)

How to Wire AskUserQuestion Into a Skill

Pattern 1: Prose Question (Typical)

Ask in natural language, users respond freely:

markdown
## Step 1: Ask User for Input

**What are we building?**

Describe the feature or change you want to make.

(I'll ask follow-up questions if I need clarification)

[User responds with description]

## Step 2: Follow-Up If Needed

Based on their response, ask 1-2 clarifying questions:
- "Is this a new feature or updating existing?"
- "What's the expected outcome?"

[User responds]

## Step 3: Process Answers

Use their responses to inform next steps...

Pattern 2: Structured Options (When Choices Matter)

Use tool when user must select from specific options:

markdown
## Step 1: Ask for Configuration Choice

Use AskUserQuestion tool:

**Question 1:**
- Text: "Which option?"
- Header: "Choice"
- Options:
  - Label: "Option A"
    Description: "What this does, trade-offs"
  - Label: "Option B"
    Description: "Alternative approach"

[User selects or types "Other" for custom]

## Step 2: Process Answer

The response provides:
- answers["Which option?"] = user's selection

Based on answer:
- If "Option A": Do X
- If "Option B": Do Y
- If custom text: Do Z

## Step 3: Continue

Proceed with workflow...

Progressive Disclosure Pattern

CRITICAL: Ask ONE question, wait for response, THEN ask next.

markdown
## Question 1: Gather Type

Ask: "What type of project?"
Options: Web, Mobile, CLI

[User answers]

## Question 2: Framework (Conditional)

Based on answer to Q1:
- If Web: Ask "Frontend framework?"
- If Mobile: Ask "Platform?"
- If CLI: Ask "Language?"

[User answers]

## Question 3: Confirmation

Show summary and ask: "Proceed?"
Options: Yes, No, Edit

[Continue based on answer]

Defining Questions in Skills

Pattern 1: Prose with Guidance (Recommended)

Ask questions in natural language with examples. No options needed:

markdown
## What are we building?

Please describe the feature or change.

(Be as specific as you like — I'll ask follow-ups if needed)

Or with guidance:

markdown
## Do you have any visuals to reference?

- Mockups or wireframes
- Screenshots of similar features
- Examples from other apps

(Paste images, share file paths, or say "none")

This pattern:

  • ✅ Feels natural to users
  • ✅ Allows truly open input
  • ✅ No constraint on number of options
  • ✅ Users can respond with anything

Pattern 2: Structured Options (When Choosing Matters)

Use tool options when user must select from specific choices:

markdown
**Question: Database Selection**
- Text: "Which database for this project?"
- Header: "Database"  (max 12 chars)
- Options:
  - Label: "PostgreSQL"
    Description: "Relational, ACID compliant, best for complex queries"
  - Label: "MongoDB"
    Description: "Document-based, flexible schema, rapid iteration"
  - Label: "Redis"
    Description: "In-memory, very fast, ideal for caching"

Constraints for this pattern:

  • Min 2, Max 4 options per question
  • "Other" automatic for custom input
  • Users can select one (or multiple if multiSelect: true)

Use when:

  • Multiple mutually-exclusive choices exist
  • Each option leads to different workflow
  • You want to guide without forcing

Pattern 3: Multi-Select Options

When users should enable/select multiple independent items:

markdown
**Question: Which features to enable?**
- Header: "Features"
- multiSelect: true
- Options:
  - "Logging" (Operation logs for debugging)
  - "Metrics" (Performance monitoring)
  - "Alerts" (Error notifications)
  - "Backups" (Automatic data backups)

Response: answers["Features?"] = "Logging, Metrics" (joined with ", ")

Processing Responses

Basic Response Handling

The tool returns:

{
  "questions": [...],
  "answers": {
    "Which database?": "PostgreSQL"
  }
}

In skill body:

Based on the answer to "Which database?":
- If "PostgreSQL": Set up relational database
- If "MongoDB": Set up document database
- If "Redis": Set up in-memory cache
- If custom text: Configure for custom database name

Then proceed with configuration...

Checking Multiple Answers

From response:
- answers["Database?"] = "PostgreSQL"
- answers["Environment?"] = "production"
- answers["Features?"] = "Logging, Metrics"

In skill:

Database: PostgreSQL (check: is this supported?)
Environment: production (check: validate settings for prod)
Features: Split by ", " and enable each

If any validation fails:
  Log error
  Ask user to reconfigure
  Return to questioning phase

Handling Free-Text Answers

When users select "Other" and type custom input, you need to handle it properly.

Pattern: Check if answer is a known option or custom text, then route accordingly.

If user selected "Other" and typed "custom-framework":

answers["Framework?"] = "custom-framework"

In skill:

Check if "custom-framework" is in known frameworks:
  - If yes: use framework-specific setup
  - If no: use generic setup with warning

Log: "Using custom framework: custom-framework"
Proceed with generic configuration...

See references/free-text-input-patterns.md for complete patterns for handling custom input including validation, generic fallbacks, and user feedback.

When to Use Each Pattern

Use Prose Questions When:

  • Scope is open-ended (user describes feature, context, etc.)
  • You need true free-form input
  • Multiple follow-ups will be needed
  • No specific options constrain the answer
  • Examples: "What are we building?", "Describe the problem"

Use Structured Options When:

  • User must choose from specific alternatives
  • Each option leads to different workflow/configuration
  • You want to guide without forcing
  • Examples: "Which database?", "Enable monitoring?" (Yes/No)

Mixed Approach:

Start with prose for context/understanding, then use structured options for specific decisions:

Step 1: Ask "What are we building?" (prose)
Step 2: Ask "Which database?" (structured options)
Step 3: Ask "Which features?" (multi-select options)

Question Design (For Structured Options)

When using predefined options:

  • Be specific: "Which database for this project?" (not "Database?")
  • Provide context: "Relational, ACID compliant, best for complex queries"
  • Show trade-offs: "Fast for reads, slower for writes, good for analytics"
  • Mutually exclusive: Options should be distinct (unless multiSelect)
  • Consistent format: Same capitalization, length (~1-2 sentences), detail level

See references/skill-patterns.md for complete question design examples.

Dynamic Questions Pattern

How to ask different questions based on previous answers:

## Step 1: Initial Question

Ask: "Application type?"
Options: Web, Mobile, CLI

[Get answer]

## Step 2: Conditional Question

If answer == "Web":
  Ask: "Frontend framework?"
  Options: React, Vue, Svelte

If answer == "Mobile":
  Ask: "Platform?"
  Options: iOS, Android, Cross-platform

If answer == "CLI":
  Ask: "Language?"
  Options: Python, Go, Rust

[Get answer]

## Step 3: More Conditional Questions

Based on BOTH previous answers:
If Web + React:
  Ask: "State management?"
  Options: Redux, Context, Zustand

If Web + Vue:
  Ask: "State management?"
  Options: Pinia, Vuex

[Continue...]

Error Handling in Skills

Check if Response Received

If AskUserQuestion fails or no answers:

Log error: "Failed to gather responses"
Show: "Please try again or provide configuration manually"
Exit

(Or restart the questioning phase)

Validate Answer Format

If question expects "port number":
  answers["Port?"] could be:
  - "8080" (valid)
  - "invalid" (needs validation)
  - "12345" (out of range)

Validate before using:
  Parse as number
  Check range (1-65535)
  If invalid: Ask user to reconfigure

Handle Empty Answers

If answers["Required field?"] is empty or missing:

Log: "No answer provided for required field"
Ask user to reconfigure

Don't proceed with empty critical answers

Common Limitations & Workarounds

See references/advanced-patterns.md for detailed workarounds for common constraint scenarios (max questions, max options, dependent options, pre-populating answers).

Response Processing Workflow

Typical skill using AskUserQuestion:

1. Describe what you're asking
   "Let's configure your database"

2. Ask Question 1
   Call AskUserQuestion with 1 question

3. Get Response
   Extract answers from response object

4. Validate
   Check format, compatibility, ranges

5. Ask Question 2 (if conditional)
   Based on Q1 answer, ask Q2

6. Get Response & Validate

7. Process All Answers
   - Check compatibility across answers
   - Apply configuration
   - Generate outputs

8. Confirm
   Ask: "Does this look right?"
   If Yes: Proceed
   If No: Restart from Q1

Writing About AskUserQuestion in Skills

See references/skill-patterns.md for guidance on documenting AskUserQuestion in skill descriptions, body content, and custom input support.

Testing Skills with AskUserQuestion

See references/robust-skills.md for testing validation patterns and common test cases (valid options, custom text, invalid input, edge cases).

Key Takeaways

✅ Max constraints: 1-4 questions, 2-4 options, 12-char header

✅ Progressive disclosure: One question → wait → next question

✅ Custom input: "Other" automatic, custom text goes in answers

✅ Conditional: Ask different Q2 based on Q1 answer

✅ Validation: Always check answers before using

✅ Response format: Extract from answers object

✅ Error handling: Check for missing/invalid answers

❌ Don't: Combine multiple questions, use >4 options, include "Other" in options

See references/common-mistakes.md for detailed anti-patterns and how to avoid them.

Plan Mode: Clarifying Decisions vs. Meta-Questions

Use AskUserQuestion in plan mode to clarify real implementation decisions (database choice, monitoring config), not meta-questions ("Is my plan ready?"). For plan approval, use the plan approval tool instead. See references/advanced-patterns.md for detailed guidance.


Based on: Claude Code system prompt (tool-description-askuserquestion.md) Source: https://github.com/Piebald-AI/claude-code-system-prompts Last updated: 2026-02-25 | Version: 1.0.0

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Ask User Question؟

Implement skills using AskUserQuestion tool for interactive user input and decisions. Use when authoring skills that need to gather options, handle free-text answers, process multi-select, or build multi-step workflows. Covers tool mechanics, constraints, wiring into skills, response handling, and dynamic question patterns.

لماذا تستخدم Ask User Question على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Ask User Question عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Ask User Question في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/full-stack-biz/claude-skills-toolkit/tree/main/skills/ask-user-question. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Ask User Question؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Ask User Question؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Ask User Question معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Ask User Question مجانية؟

نشرها full-stack-biz على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇