Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Design complete surveys from free text requirements - generates a Python script with Survey, ScenarioList, and AgentList definitions
allowed-tools
Read, Glob, Skill, AskUserQuestion, Write
arguments
research_question
Design Study
This skill generates a Python script with EDSL objects (Survey, ScenarioList, AgentList) based on a free text description of what the user wants the study to accomplish.
Example:
/create-study Do LLMs exibit anchoring bias?
Workflow
1. Parse the User's Description
Extract from the free text:
Survey Goal: What the survey is trying to measure
Questions needed: Topics and question types implied
Scenarios: Any variables that should vary across runs
Agents: Any respondent personas mentioned
Rules: Any branching or skip logic implied
If the description is ambiguous or missing key details, use AskUserQuestion to clarify before generating code.
2. Ask About Output Destination
Use AskUserQuestion to ask where the user wants the code:
Question: "Where would you like the survey code?"
Header: "Output"
Options:
1. "Write to file (Recommended)" - "Save to a Python file with an appropriate name based on the survey topic"
2. "Display only" - "Show the code in the conversation without saving"
If the user chooses to write to a file:
Generate a snake_case filename based on the survey topic (e.g., mafia_exit_survey.py, food_preferences_survey.py)
Write to the current working directory
Inform the user of the filename after writing
3. Reference Other Skills
Read the consolidated reference skill for detailed implementation guidance:
Use the Skill tool to invoke edsl-survey-reference, or Read the SKILL.md file from .claude/skills/edsl-survey-reference/SKILL.md.
4. Design the Survey Structure
Based on requirements, determine:
Questions needed and their types
Scenario variables for parameterization
Agent traits for respondent personas
Rules for branching/skip logic
Memory configuration for context
5. Generate the Code
Produce a Python script that defines:
Survey with all questions and rules
ScenarioList if variables are needed
AgentList if personas are needed
Do NOT include code to run or analyze the survey.
Example: Full Survey Design
User Request
"I want to survey people about their food preferences. I want to ask about 5 different cuisines, get their favorite dish from each, and then ask follow-up questions based on their top choice."
Generated Code
from edsl import (
Survey,
QuestionMultipleChoice,
QuestionFreeText,
QuestionLinearScale,
Scenario,
ScenarioList,
Agent,
AgentList
)
# === QUESTIONS ===# Initial preference question
q_cuisine = QuestionMultipleChoice(
question_name="favorite_cuisine",
question_text="Which cuisine do you enjoy most?",
question_options=["Italian", "Japanese", "Mexican", "Indian", "Thai"]
)
# Follow-up about favorite dish (uses piping)
q_dish = QuestionFreeText(
question_name="favorite_dish",
question_text="What is your favorite {{ favorite_cuisine.answer }} dish?"
)
# Rating question
q_frequency = QuestionLinearScale(
question_name="frequency",
question_text="How often do you eat {{ favorite_cuisine.answer }} food?",
question_options=[1, 2, 3, 4, 5],
option_labels={1: "Rarely", 5: "Very Often"}
)
# Why they like it
q_why = QuestionFreeText(
question_name="why_favorite",
question_text="Why do you particularly enjoy {{ favorite_cuisine.answer }} cuisine?"
)
# === SURVEY ===
survey = (Survey([q_cuisine, q_dish, q_frequency, q_why])
.set_full_memory_mode()) # Each question sees prior answers# === SCENARIOS (if parameterizing) ===# Not needed here since we use piping, but example:# scenarios = ScenarioList([# Scenario({"cuisine": "Italian"}),# Scenario({"cuisine": "Japanese"}),# ])# === AGENTS (respondent personas) ===
agents = AgentList([
Agent(traits={"persona": "health-conscious millennial", "age": 28}),
Agent(traits={"persona": "traditional home cook", "age": 55}),
Agent(traits={"persona": "adventurous foodie", "age": 35}),
Agent(traits={"persona": "busy professional", "age": 42}),
])
# === READY TO RUN ===# To execute: results = survey.by(agents).run()