← 返回 Skills 市场
mia956

Questionnaire Codebook Maker

作者 MIA956 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
16
总下载
3
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install questionnaire-codebook-maker-mia956
功能描述
Turn questionnaire items into clean research codebooks, scoring rules, reverse-scoring checks, variable names, and analysis-ready TSV/Markdown tables.
使用说明 (SKILL.md)

Questionnaire Codebook Maker

Purpose

Use this skill when the user needs to organize questionnaire items, scale dimensions, variable names, scoring rules, reverse-scored items, or data-entry specifications for psychology, education, public-health, social-science, or student research projects.

The core output is a clean codebook that can be copied into Word, Excel, SPSS, R, Mplus, or a research protocol.

When to activate

Activate this skill when the user asks for any of the following:

  • Convert questionnaire items into a codebook.
  • Generate variable names for survey items.
  • Mark reverse-scored items and compute scoring rules.
  • Build a table for dimensions, item numbers, response anchors, and total scores.
  • Prepare data-entry rules for Excel/SPSS/R/Mplus.
  • Check whether questionnaire scoring is internally consistent.
  • Convert a messy scale description into an analysis-ready table.

Required output behavior

When the user provides questionnaire items, output the following sections unless they request a different format:

  1. 量表代码本 / Codebook
    Provide a TSV table with these columns: variable, item_id, dimension, item_text, response_range, reverse_scored, scoring_note, missing_rule.

  2. 计分规则 / Scoring rules
    Explain how to compute dimension scores and total scores. State whether to use sum scores or mean scores. If missing-value rules are not provided, recommend a transparent rule such as "calculate the mean score only when at least 80% of items in the dimension are non-missing".

  3. 反向计分检查 / Reverse-scoring check
    List reverse-scored variables and give the formula. For a 1–5 item, use reversed = 6 - original. For a 0–4 item, use reversed = 4 - original.

  4. 分析软件变量建议 / Analysis-ready variable names
    Provide short, readable variable names. Avoid spaces, Chinese punctuation, hyphens, and overly long names. Use prefixes such as dep_, anx_, smu_, sleep_, neuro_, or eant_ when relevant.

  5. 质量控制提示 / QC checklist
    Mention duplicate item IDs, inconsistent response ranges, missing dimensions, and reverse-scoring ambiguity.

Variable-naming rules

  • Use lowercase letters, numbers, and underscores only.
  • Start with a letter.
  • Keep names under 20 characters when possible.
  • Preserve scale order using two-digit item numbers: dep_01, dep_02, anx_01.
  • Use dimension prefixes when multiple dimensions exist.
  • For Mplus compatibility, avoid names longer than 8 characters if the user explicitly asks for legacy Mplus-safe names.

Reverse-scoring formulas

For an item with minimum min and maximum max:

reversed_score = min + max - original_score

Common examples:

  • 1–5 scale: reverse = 6 - original.
  • 1–7 scale: reverse = 8 - original.
  • 0–4 scale: reverse = 4 - original.
  • 0–10 scale: reverse = 10 - original.

Missing-value rule recommendations

Use the user's stated rule when available. If no rule is given:

  • Dimension mean score: compute if at least 80% of dimension items are valid.
  • Total mean score: compute if at least 80% of all scale items are valid.
  • Never silently impute missing values unless the user explicitly asks for imputation.

Optional helper script

This skill includes scripts/make_codebook.py, which converts a simple CSV item file into a Markdown codebook and a TSV variable map. It uses only Python standard-library modules.

Input CSV columns:

item_id,item_text,dimension,scale_min,scale_max,reverse

Example command:

python3 scripts/make_codebook.py examples/demo_items.csv --out-dir output

If python3 is not available, try:

python scripts/make_codebook.py examples/demo_items.csv --out-dir output

Safety and integrity

  • Do not invent item wording or scoring rules.
  • Mark uncertain reverse-scoring decisions as uncertain.
  • Do not change original item meaning when shortening labels.
  • Do not assume a clinical cutoff unless the user provides the scale manual or asks for verified lookup.
  • When converting scoring rules, distinguish between item-level reverse scoring, dimension score calculation, and total score calculation.
安全使用建议
Install if you want a local helper for questionnaire codebooks. Run the script only on CSV files you intend to process, choose an output directory where overwriting codebook.md and variable_map.tsv is acceptable, and avoid placing confidential survey data in shared folders unless that is intended.
能力评估
Purpose & Capability
The stated purpose is to turn questionnaire items into codebooks and scoring rules, and the bundled Python helper does exactly that using CSV input and local Markdown/TSV output.
Instruction Scope
Runtime instructions are limited to formatting, variable naming, reverse-scoring, missing-value guidance, and preserving source item meaning; they do not request hidden authority or unrelated actions.
Install Mechanism
The skill declares a Python binary requirement and includes a helper script plus a smoke test. It does not declare explicit filesystem permissions, but the documented workflow clearly shows a local input CSV and output directory.
Credentials
The helper uses only Python standard-library modules and shows no network access, credential use, package installation, shell execution, or external service dependency.
Persistence & Privilege
The helper creates or overwrites codebook.md and variable_map.tsv in the chosen output directory; the smoke test removes its local output folder. There is no autostart, background process, privilege escalation, or long-lived persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install questionnaire-codebook-maker-mia956
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /questionnaire-codebook-maker-mia956 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Questionnaire Codebook Maker. - Converts questionnaire items into detailed, analysis-ready codebooks and tables. - Generates variable names, marks reverse-scored items, and outputs clear scoring rules. - Provides QC checklists to highlight issues with item IDs, ranges, or ambiguous scoring. - Includes an optional Python script for automated codebook creation from CSV files. - Supports psychology, education, public-health, and social-science research workflows.
元数据
Slug questionnaire-codebook-maker-mia956
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Questionnaire Codebook Maker 是什么?

Turn questionnaire items into clean research codebooks, scoring rules, reverse-scoring checks, variable names, and analysis-ready TSV/Markdown tables. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 16 次。

如何安装 Questionnaire Codebook Maker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install questionnaire-codebook-maker-mia956」即可一键安装,无需额外配置。

Questionnaire Codebook Maker 是免费的吗?

是的,Questionnaire Codebook Maker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Questionnaire Codebook Maker 支持哪些平台?

Questionnaire Codebook Maker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Questionnaire Codebook Maker?

由 MIA956(@mia956)开发并维护,当前版本 v1.0.0。

💬 留言讨论