agentsclimarketplace

Convert json q a to alternating line text file

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/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.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill convert-json-q-a-to-alternating-line-text-file

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 254 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.