Survey Design skill for Codex

Questions that measure one thing, honestly. Codex starts every survey from the decision it informs and maps each question to an objective, then rewrites double-barreled, leading and hypothetical items into neutral, specific wording with balanced labelled scales. It sizes the sample for the smallest segment you need to report, plans cognitive-interview pilots, and writes the analysis plan before fielding.

  • Research
  • $survey-design
  • 149 lines
  • 2 files
  • ~1,700 tokens
  • MIT
  • Updated

Install

curl -fsSL codexskills.dev/install.sh \  | sh -s -- survey-design

Installs to ~/.agents/skills/survey-design/ for every project on this machine.

104-line POSIX script. No sudo, no telemetry. Read install.sh

Use it in Codex

Start a prompt with $survey-design, or pick it from /skills. You can also just describe the task: Codex reads the description below and loads the playbook when your request matches.

What Codex reads before loading it

Designs surveys that produce decision-grade data - research objectives mapped to every question, neutral single-concept wording, balanced scales, logic and randomisation, sample size and margin-of-error math, sampling frames, pilot testing, and checks for nonresponse, acquiescence and leading-question bias. Use when asked to write or review a survey, questionnaire, NPS or customer satisfaction survey, developer or user survey, or to work out how many responses are needed.

Use it when

  • You are writing a new survey or questionnaire
  • An existing survey's results look odd and you suspect the questions
  • You need sample size or margin-of-error numbers for a survey

Use something else when

How to check the result

Every question maps to an objective, none fail the bias checklist, the sample size covers the smallest reported segment, and a pilot confirms completion time and comprehension.

The mistake it prevents

Quoting a margin of error for an opt-in convenience sample, where more responses shrink the interval but not the bias.

~/.agents/skills/survey-design/SKILL.md

--- name: survey-design description: Designs surveys that produce decision-grade data - research objectives mapped to every question, neutral single-concept wording, balanced scales,… license: MIT ---

A survey is done well when every question maps to a decision, each question measures one thing in neutral words, the people answering resemble the people you want to generalise to, and the analysis plan exists before the first response arrives.

Workflow

- [ ] 1. Write objectives and the decisions they inform
- [ ] 2. Decide whether a survey is the right method
- [ ] 3. Define population, sampling frame and target sample size
- [ ] 4. Draft questions mapped to objectives
- [ ] 5. Order, logic, randomisation, length check
- [ ] 6. Pilot (cognitive interviews + soft launch)
- [ ] 7. Write the analysis plan, then field

1-2. Objectives and method fit

Decision: whether to build a self-hosted edition next quarter
Objective O1: share of active accounts that cannot use cloud hosting, and why
Objective O2: what they use instead today
Objective O3: willingness to pay relative to the current plan

A survey measures how common something is. It does not discover why people behave as they do or what they would want that does not exist yet. If you cannot write answer options because you do not know the space, run interviews first ($customer-interviews).

3. Population, frame, sample

TermAsk
PopulationWho do conclusions apply to? (“accounts active in the last 90 days”)
Sampling frameThe list you can actually reach. Who is missing from it?
Sampling methodRandom from the frame is the default; stratify when small segments matter
Sample sizeFrom the precision you need (below), adjusted for expected response rate

Sample size for a proportion at 95% confidence:

n0 = 1.96^2 x p(1-p) / e^2        (use p = 0.5 if unknown; e = margin of error)
e = 5%  -> n0 = 385     e = 3% -> n0 = 1,068     e = 10% -> n0 = 97
Finite population: n = n0 / (1 + (n0 - 1) / N)
Invites needed = n / expected response rate (often 5-30% for customer email surveys)

Margin of error applies to each subgroup separately: 400 responses split across four segments give roughly +/-10% per segment. Plan the sample around the smallest segment you need to report.

Margins assume a probability sample. Opt-in, social-media or in-app convenience samples have unknown bias that more responses do not fix; report them as “among respondents”.

4. Writing questions

Rules, each a frequent cause of unusable data:

ProblemBadBetter
Double-barreled“How fast and reliable is the API?”Two questions
Leading“How much do you love the new dashboard?”“How would you rate the new dashboard?”
Loaded assumption“Why did you stop using exports?”Ask whether they use exports first, then branch
Vague time / quantity“Do you deploy often?”“In the last 30 days, how many times did your team deploy to production?”
Jargon“Rate our RBAC granularity”“How well can you control who can see and change each project?”
Hypothetical“Would you pay for X?”Ask about current spend and behaviour; use pricing methods for WTP
Unbalanced scalePoor / Good / Very good / ExcellentVery poor … Very good, symmetric around a midpoint
Missing optionsNo “None”, “Other”, or “Not applicable”Add them; make “Other (please specify)” text
Overlapping ranges1-10, 10-501-9, 10-49, 50+

Scales:

  • Use 5-point labelled scales by default; label every point, not only the ends.
  • Keep direction consistent across the survey (negative to positive).
  • Agree/disagree batteries invite acquiescence; prefer item-specific scales (“How easy or difficult was …”).
  • Do not change a tracking question’s wording or scale between waves; trend data breaks.

NPS uses a 0-10 likelihood-to-recommend item; promoters 9-10, detractors 0-6. Report the distribution and the sample, not only the single score.

5. Order, logic, length

  • Start with easy, relevant, non-sensitive questions; demographics and firmographics last unless needed for screening or branching.
  • General before specific to avoid priming (overall satisfaction before feature ratings).
  • Randomise option order for unordered lists; keep ordered scales fixed.
  • Use skip logic so nobody answers about features they do not use.
  • Target under 10 minutes (roughly 15-25 closed questions); completion drops with length.
  • Limit open text to 1-3 questions; they are expensive to analyse.
  • Add one attention check only for paid panels; do not insult customers with them.

6. Pilot

  1. Cognitive interviews with 3-5 people from the population: they think aloud while answering. Fix every question someone interprets differently than intended.
  2. Soft launch to ~5-10% of the sample. Check completion time, drop-off per page, straight-lining, and “Other” responses that reveal missing options.

7. Analysis plan, ethics, fielding

  • Before fielding, write which question answers which objective, the breakdowns, and what result would change the decision.
  • State purpose, time required, how data is used and stored, and whether responses are anonymous. Collect only what you will analyse. Personal data falls under GDPR/CCPA; route consent wording to the people who own privacy.
  • Sending the survey to customers is outward-facing: get explicit confirmation of the audience list, message and send time before anything is sent.
  • Incentives raise response rates but can attract low-effort answers; keep them modest.

Gotchas

  • Nonresponse bias: the angriest and happiest customers answer. Compare respondents to the frame on known attributes (plan, tenure, size) and weight or caveat.
  • Social desirability: people overreport good practices (testing, security). Ask about specific recent behaviour instead of habits.
  • Asking what people would do predicts actual behaviour poorly; use for direction only.
  • Required questions on sensitive items raise drop-off and fake answers; make them optional.
  • Changing the survey mid-field splits the data into two incompatible sets.

Verification

  • Every question maps to an objective; delete those that do not.
  • Run the rules table over every item; fix all double-barreled and leading wording.
  • Sample size meets the precision target for the smallest reported segment.
  • Pilot shows median completion time within target and no misread questions.

Output template

# Survey: <name>
**Decision it informs:** ... | **Population:** ... | **Frame:** ...
**Target completes:** n (margin +/-x% at 95%) | **Invites:** N at y% expected response
**Length:** ~z minutes, q questions

| # | Question | Type / scale | Options | Objective | Logic |
|---|---|---|---|---|---|

## Analysis plan
## Consent text
## Pilot findings and changes

What the zip contains

SKILL.md plus the interface file below. Nothing runs on install.

agents/openai.yamlgenerated from this page

Gives the Codex app a display name, a one-line description and a starter prompt for this skill.

interface:
  display_name: "Survey Design"
  short_description: "Questions that measure one thing, honestly"
  default_prompt: "$survey-design Write a customer survey to decide whether we should build a self-hosted edition"

About this skill

Written and maintained by the Codex Skills editors to the same editorial standard as every skill here: a selective description, a real workflow, known pitfalls and a way to verify the work. First published , last updated . MIT licensed. Something wrong or out of date? Tell us.

esc
New

Introducing Codex Skills Pro

79 professional skills that take Codex through complete engagements, each with its own scripts, references and a report that verifies the result.

All-AccessOne-time payment, no subscription
$49
Get All-AccessOr browse individual skills from $2.99 →

Secure checkout by Creem