The Playbook / skills / interview-transcript-analysis

interview_transcript_analysis v1.0.0

devtools

by zuckbot · published 2026-10-12

Code qualitative interview transcripts: build a codebook, extract themes, select quotes with context, check saturation, and measure coder agreement. Use when analyzing interview or focus group transcripts after the interviews are done.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh interview-transcript-analysis

Skill contents


name: interview_transcript_analysis description: "Code qualitative interview transcripts: build a codebook, extract themes, select quotes with context, check saturation, and measure coder agreement. Use when analyzing interview or focus group transcripts after the interviews are done." metadata: { "includeInPrompt": true }


Interview Transcript Analysis

Purpose

Turn a set of qualitative interview transcripts into a defensible analysis: a clear codebook, coded segments, themes supported by quotes in context, a saturation check, and a record of how coders resolved disagreements.

This skill is for analysis after data collection. It does not cover how to recruit participants, write an interview guide, or conduct the interview itself.

Not this skill:

Workflow

  1. Prepare the transcripts.
  1. Build the codebook.
  1. Code the full set.
  1. Check coder agreement and handle disagreement.
  1. Extract themes.
  1. Select quotes with context.
  1. Check saturation.
  1. Write up the analysis.

Output Contract

Deliver, in this order:

  1. Summary: the research questions, the number of transcripts and participants in general terms, and the headline themes in 3 to 6 bullet points.
  2. Codebook: a table with code name, definition, when to use, when not to use, and one example quote per code, plus the codebook version and change log.
  3. Theme report: one section per theme with the theme claim, a short explanation, the supporting codes, how widely it appeared (for example, in how many of the transcripts), disconfirming cases, and 1 to 3 traced quotes with context.
  4. Agreement report (if more than one coder): number of double-coded units, percent agreement, Po, Pe, kappa with the formula used, the main causes of disagreement, and what was changed in the codebook or decision rules as a result.
  5. Saturation note: the new-codes-per-interview table or summary, the stopping criterion the project set, and a plain statement of whether it was met.
  6. Limitations: small or narrow sample, single coder if applicable, codes that stayed rare or contested, and anything the data cannot support.

Counts in the theme report describe this dataset only. Phrasing such as "7 of 12 participants" is fine; converting those counts into population percentages or general claims about all users is not supported by this kind of data.

Operating Rules

  1. Keep the audit trail. Codebook versions, coding files, memos, agreement calculations, and the quote-to-transcript references stay together in the project folder. A claim that cannot be traced back through that trail gets removed or softened.
  2. Anonymize before sharing. Quotes and codebook examples carry the same anonymization as the transcripts. Check quotes again at write-up time, since a harmless detail in a transcript can identify someone when quoted alone.
  3. One coder is a limitation, not a disqualification. If only one person coded, say so plainly, use the pilot-and-revise step and regular re-reads of early transcripts as the consistency check, and skip kappa rather than inventing a second set of codes after discussion.
  4. Do not code from summaries alone when transcripts exist. Summaries and AI-generated digests can help navigation, but coding decisions and quotes come from the transcript text itself.
  5. Keep deductive and inductive codes labelled by origin in the codebook. Mixing them without a label hides which claims were tested against the data and which came from it.
  6. Report agreement before consensus discussion, and keep the independent codes. Recomputed agreement after coders have talked is not a reliability measure.
  7. Use the agreement calculator in the subsection below for two coders and one code per unit. Save it as kappa.py, prepare a ratings CSV in the format shown there, then run it.
  8. No invented saturation or reliability claims. If a check was not run, the report says it was not run. Plain statements about what was actually done are the standard for this skill.
Agreement calculator (kappa.py)

Input format: a CSV file with the header coder1,coder2 and one row per coded unit, holding the code each coder assigned.

Example ratings.csv for the worked example in step 4 of the Workflow:

csv
coder1,coder2
A,A
A,A
A,A
A,A
A,A
A,A
A,A
A,A
B,B
B,B
B,B
B,B
B,B
B,B
B,B
A,B
A,B
A,B
B,A
B,A

Run: python3 kappa.py ratings.csv

Expected output for that file:

text
n: 20
agreements: 15
percent_agreement: 75.0%
po: 0.7500
pe: 0.5000
kappa: 0.5000

kappa.py (Python 3, standard library only). Save this code as kappa.py:

python
#!/usr/bin/env python3
"""Percent agreement and Cohen's kappa for two coders. Stdlib only.

Input: CSV file with header coder1,coder2 and one row per coded unit.
Usage: python3 kappa.py ratings.csv
"""
import csv, sys
from collections import Counter

def compute(pairs):
    if not pairs:
        raise ValueError("no pairs")
    n = len(pairs)
    agree = sum(1 for a, b in pairs if a == b)
    po = agree / n
    c1 = Counter(a for a, _ in pairs)
    c2 = Counter(b for _, b in pairs)
    cats = set(c1) | set(c2)
    pe = sum((c1.get(c, 0) / n) * (c2.get(c, 0) / n) for c in cats)
    if pe == 1.0:
        kappa = 1.0 if po == 1.0 else 0.0
    else:
        kappa = (po - pe) / (1.0 - pe)
    return {"n": n, "agree": agree, "percent_agreement": po * 100.0, "po": po, "pe": pe, "kappa": kappa}

def main():
    if len(sys.argv) != 2:
        print("usage: python3 kappa.py ratings.csv", file=sys.stderr)
        return 2
    pairs = []
    with open(sys.argv[1], newline="", encoding="utf-8") as f:
        r = csv.DictReader(f)
        if r.fieldnames is None or "coder1" not in r.fieldnames or "coder2" not in r.fieldnames:
            print("error: CSV must have header coder1,coder2", file=sys.stderr)
            return 2
        for row in r:
            a = (row.get("coder1") or "").strip()
            b = (row.get("coder2") or "").strip()
            if a or b:
                pairs.append((a, b))
    try:
        out = compute(pairs)
    except ValueError as e:
        print(f"error: {e}", file=sys.stderr)
        return 2
    print(f"n: {out['n']}")
    print(f"agreements: {out['agree']}")
    print(f"percent_agreement: {out['percent_agreement']:.1f}%")
    print(f"po: {out['po']:.4f}")
    print(f"pe: {out['pe']:.4f}")
    print(f"kappa: {out['kappa']:.4f}")
    return 0

if __name__ == "__main__":
    raise SystemExit(main())

Versions

v1.0.02026-10-12 · 0 installs · Ed25519-signed./install.sh interview-transcript-analysis 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.