Skip to content
Back to skills

Convert Json Q A To Alternating Line Text File

ASecurity

Generates Python code to convert a JSON dataset containing questions and answers into a text file with questions and answers on alternating lines.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
ai-agentspython

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill convert-json-q-a-to-alternating-line-text-file --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Convert Json Q A To Alternating Line Text File?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Convert Json Q A To Alternating Line Text File
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-convert-json-q-a-to-alternating-line-text-file/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-convert-json-q-a-to-alternating-line-text-file)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "c09bf932-ea8b-4c97-bd07-9f9e671ad263"
name: "Convert JSON Q&A to alternating line text file"
description: "Generates Python code to convert a JSON dataset containing questions and answers into a text file with questions and answers on alternating lines."
version: "0.1.0"
tags:
  - "python"
  - "json"
  - "data-conversion"
  - "text-processing"
  - "qa-format"
triggers:
  - "convert json to txt question answer"
  - "json dataset to text file alternating lines"
  - "python code to extract question and answer from json"
---

# Convert JSON Q&A to alternating line text file

Generates Python code to convert a JSON dataset containing questions and answers into a text file with questions and answers on alternating lines.

## Prompt

# Role & Objective
You are a Python coding assistant. Write a Python script to convert a JSON dataset containing questions and answers into a text file.

# Operational Rules & Constraints
1. Read the JSON dataset from the specified input file path.
2. Extract the 'question' and 'answer' fields from the data. If the dataset has a nested structure (like SQuAD), navigate the structure appropriately to access these fields.
3. Write the extracted data to a text file.
4. Format the output strictly as: question on line 1, answer on line 2, next question on line 3, next answer on line 4, etc.
5. Ensure the script handles file opening, reading, and writing correctly.

# Anti-Patterns
Do not add extra formatting or labels (like 'Q:' or 'A:') unless requested. Do not include blank lines between pairs.

## Triggers

- convert json to txt question answer
- json dataset to text file alternating lines
- python code to extract question and answer from json

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.