{"skills":[{"name":"Make a literature search reproducible","description":"Audit a search log for the exact query, database, platform, date and result count needed to repeat it.","content":"# Make a literature search reproducible\n\nAudit a search log for the exact query, database, platform, date and result count needed to repeat it.\n\n## When to use this skill\n\n- Someone is writing the search methods or appendix for a systematic review, scoping review or guideline and wants to check nothing is missing.\n- A search is being rerun or updated and the team needs to know exactly what was run before.\n- A peer reviewer has asked for the full search strategies or the dates of the searches.\n\n## When not to use it\n\n- Designing the strategy or choosing search terms. Ask an information specialist or librarian; this skill checks the record of searches already run.\n- Screening the results. Use the abstract screening skill.\n- Checking the flow diagram counts after deduplication. Use the review flow reconciliation skill.\n\n## What you need\n\n- Search histories or exports and the database and platform names used for each search.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you export the search history from each platform, such as Ovid, EBSCOhost or PubMed? Retyped strategies introduce errors, and Cochrane advises copying them exactly as run.\n- Which database and which platform was used for each search? MEDLINE on Ovid and PubMed use different syntax and field tags.\n- Have any searches been rerun or updated, and on what dates? Each run needs its own record.\n\n## Method\n\n1. Make one row per execution: database, platform, exact query, limits or filters, date run and records returned. A rerun or update is a new row, not an edit to the old one.\n2. Record the database and the platform separately. The same database is available on several platforms, each with its own syntax and fields.\n3. Keep the query verbatim, copied from the platform's history, with field tags, line numbers, parentheses, Boolean operators and truncation. For a multi-line strategy keep every line. A paraphrase or topic description does not count as the query.\n4. Keep the date the search was run separate from any publication-date limit. 'Searched 2018 to 2022' usually describes a limit, not the execution date.\n5. Record the number of records each search returned before deduplication. Keep export counts and deduplicated counts in their own fields; an export of 9 records is not the hit count.\n6. When a search moves to another platform, keep the original query, the translated query actually run and any changed fields or filters. The old platform's syntax cannot stand in for the new query.\n7. For each row, list the missing fields and ask for the saved history to recover them. Note that a rerun can return different counts with the same query, because databases grow and are reindexed.\n\n## Checks before you deliver\n\n- \u2018Searched January to May\u2019 might describe the publication window, not the execution date.\n- A result count of zero is information.\n- Recording 'MEDLINE' without the platform, which leaves the syntax and field tags ambiguous.\n- Saving only the final line of a multi-line strategy, which hides how the sets were built and combined.\n- Overwriting the original record when a search is updated, which loses the first run's date and count.\n\n## How to present the result\n\nStart with the rows that cannot yet be repeated, each with its missing fields named. Then give the full log as a table (database, platform, exact query, limits, date run, records returned) with gaps marked. Finish with the specific items to recover from each platform's saved history, ready to send to whoever ran the searches.\n\n## Worked example\n\n**Request:** Audit my search log.\n\n**Supplied material:**\n\n```text\nA: MEDLINE via Ovid; exact query: sleep.ti.; publication limit 2018\u20132022; obtained 43 results. B: ERIC via EBSCOhost; ran 2027-01-05; topic described as 'tired pupils'; 9 exported, raw count unrecorded.\n```\n\n**Answer:** A: retain the Ovid MEDLINE query sleep.ti., the 2018\u20132022 publication limit and the 43 hits. Recover the actual run date from the search history.\nB: retain ERIC via EBSCOhost and 5 January 2027. Recover the executed query and raw hit count. Nine is the export count.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn missing keyed by row ID. List missing fields in this order: database, platform, query, run_date, result_count. A paraphrase does not satisfy query; an export-only count does not satisfy result_count.\n\n## Sources\n\n- [PRISMA-S: reporting literature searches in systematic reviews (Rethlefsen et al., 2021)](https:\/\/pmc.ncbi.nlm.nih.gov\/articles\/PMC7839230\/): Item 1 asks for each database to be named with its platform, item 8 for strategies copied and pasted exactly as run, item 9 for limits and restrictions, item 13 for the date of the last search and item 15 for the total records from each source. Deduplication is described separately in item 16.\n- [Cochrane Handbook, chapter 4: Searching for and selecting studies](https:\/\/www.cochrane.org\/authors\/handbooks-and-manuals\/handbook\/current\/chapter-04): Section 4.5 and its MECIR box ask reviewers to record the sources searched, when, by whom and with which terms, and to copy database strategies exactly as run, in full, with the total number of records retrieved, pasting rather than retyping.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/search-strategy-log\n","scope":"contextual","trigger_keywords":["Make a literature search reproducible","search-strategy-log","search strategy log","Is my literature search written up well enough for someone else to repeat it?","Is my literature search written up well enough for someone else to repeat it","reproduce this literature search","literature search log","audit my search strategy"],"is_private":true,"is_active":true,"scripts":[{"name":"search-strategy-log-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"search-strategy-log-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: search-strategy-log\ndescription: \"Audit a literature search log so every search can be repeated: database, platform, exact query, limits, date run and records returned, as PRISMA-S asks. Use when someone is writing up or updating a systematic review search, or reviewing a methods section or search appendix.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/search-strategy-log\n---\n\n# Make a literature search reproducible\n\nAudit a search log for the exact query, database, platform, date and result count needed to repeat it.\n\n## When to use this skill\n\n- Someone is writing the search methods or appendix for a systematic review, scoping review or guideline and wants to check nothing is missing.\n- A search is being rerun or updated and the team needs to know exactly what was run before.\n- A peer reviewer has asked for the full search strategies or the dates of the searches.\n\n## When not to use it\n\n- Designing the strategy or choosing search terms. Ask an information specialist or librarian; this skill checks the record of searches already run.\n- Screening the results. Use the abstract screening skill.\n- Checking the flow diagram counts after deduplication. Use the review flow reconciliation skill.\n\n## What you need\n\n- Search histories or exports and the database and platform names used for each search.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you export the search history from each platform, such as Ovid, EBSCOhost or PubMed? Retyped strategies introduce errors, and Cochrane advises copying them exactly as run.\n- Which database and which platform was used for each search? MEDLINE on Ovid and PubMed use different syntax and field tags.\n- Have any searches been rerun or updated, and on what dates? Each run needs its own record.\n\n## Method\n\n1. Make one row per execution: database, platform, exact query, limits or filters, date run and records returned. A rerun or update is a new row, not an edit to the old one.\n2. Record the database and the platform separately. The same database is available on several platforms, each with its own syntax and fields.\n3. Keep the query verbatim, copied from the platform's history, with field tags, line numbers, parentheses, Boolean operators and truncation. For a multi-line strategy keep every line. A paraphrase or topic description does not count as the query.\n4. Keep the date the search was run separate from any publication-date limit. 'Searched 2018 to 2022' usually describes a limit, not the execution date.\n5. Record the number of records each search returned before deduplication. Keep export counts and deduplicated counts in their own fields; an export of 9 records is not the hit count.\n6. When a search moves to another platform, keep the original query, the translated query actually run and any changed fields or filters. The old platform's syntax cannot stand in for the new query.\n7. For each row, list the missing fields and ask for the saved history to recover them. Note that a rerun can return different counts with the same query, because databases grow and are reindexed.\n\n## Checks before you deliver\n\n- \u2018Searched January to May\u2019 might describe the publication window, not the execution date.\n- A result count of zero is information.\n- Recording 'MEDLINE' without the platform, which leaves the syntax and field tags ambiguous.\n- Saving only the final line of a multi-line strategy, which hides how the sets were built and combined.\n- Overwriting the original record when a search is updated, which loses the first run's date and count.\n\n## How to present the result\n\nStart with the rows that cannot yet be repeated, each with its missing fields named. Then give the full log as a table (database, platform, exact query, limits, date run, records returned) with gaps marked. Finish with the specific items to recover from each platform's saved history, ready to send to whoever ran the searches.\n\n## Worked example\n\n**Request:** Audit my search log.\n\n**Supplied material:**\n\n```text\nA: MEDLINE via Ovid; exact query: sleep.ti.; publication limit 2018\u20132022; obtained 43 results. B: ERIC via EBSCOhost; ran 2027-01-05; topic described as 'tired pupils'; 9 exported, raw count unrecorded.\n```\n\n**Answer:** A: retain the Ovid MEDLINE query sleep.ti., the 2018\u20132022 publication limit and the 43 hits. Recover the actual run date from the search history.\nB: retain ERIC via EBSCOhost and 5 January 2027. Recover the executed query and raw hit count. Nine is the export count.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn missing keyed by row ID. List missing fields in this order: database, platform, query, run_date, result_count. A paraphrase does not satisfy query; an export-only count does not satisfy result_count.\n\n## Sources\n\n- [PRISMA-S: reporting literature searches in systematic reviews (Rethlefsen et al., 2021)](https:\/\/pmc.ncbi.nlm.nih.gov\/articles\/PMC7839230\/): Item 1 asks for each database to be named with its platform, item 8 for strategies copied and pasted exactly as run, item 9 for limits and restrictions, item 13 for the date of the last search and item 15 for the total records from each source. Deduplication is described separately in item 16.\n- [Cochrane Handbook, chapter 4: Searching for and selecting studies](https:\/\/www.cochrane.org\/authors\/handbooks-and-manuals\/handbook\/current\/chapter-04): Section 4.5 and its MECIR box ask reviewers to record the sources searched, when, by whom and with which terms, and to copy database strategies exactly as run, in full, with the total number of records retrieved, pasting rather than retyping.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/search-strategy-log\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/search-strategy-log\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Date limit mistaken for run date\n\nAudit my search log.\n\n## Supplied material\n\nA: MEDLINE via Ovid; exact query: sleep.ti.; publication limit 2018\u20132022; obtained 43 results. B: ERIC via EBSCOhost; ran 2027-01-05; topic described as 'tired pupils'; 9 exported, raw count unrecorded.\n\n## Worked answer\n\nA: retain the Ovid MEDLINE query sleep.ti., the 2018\u20132022 publication limit and the 43 hits. Recover the actual run date from the search history.\nB: retain ERIC via EBSCOhost and 5 January 2027. Recover the executed query and raw hit count. Nine is the export count.\n\n## Reasoning\n\nA publication window and an export count do not supply the requested fields.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Audit my search log.\nReturn only the JSON specified in SKILL.md for this test.\n\nA: MEDLINE via Ovid; exact query: sleep.ti.; publication limit 2018\u20132022; obtained 43 results. B: ERIC via EBSCOhost; ran 2027-01-05; topic described as 'tired pupils'; 9 exported, raw count unrecorded.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"missing\": {\n        \"A\": [\n            \"run_date\"\n        ],\n        \"B\": [\n            \"query\",\n            \"result_count\"\n        ]\n    }\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"A publication window and an export count do not supply the requested fields.\n"},{"path":"tests\/case-2\/request.txt","content":"Check the second search log.\nReturn only the JSON specified in SKILL.md for this test.\n\nC: ERIC via EBSCOhost; exact query TI dyssomnia; ran 2027-01-08; results 0.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"missing\": {\n        \"C\": []\n    }\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A fully recorded search can legitimately produce no records.\n"},{"path":"tests\/case-3\/request.txt","content":"Audit the two run logs.\nReturn only the JSON specified in SKILL.md for this test.\n\nO: MEDLINE via Ovid; exact query asthma.ti.; run 2026-02-03; 131 hits. P: PubMed database on PubMed; reran on 2026-05-03 and obtained 149 hits. Analyst wrote \u201ctranslated the title search\u201d; executed PubMed query was not saved.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"missing\": {\n        \"O\": [],\n        \"P\": [\n            \"query\"\n        ]\n    }\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The Ovid syntax is documented, but cannot serve as the missing PubMed query. Preserve both dates and counts.\n"}],"is_active":true,"is_approved":false}]}]}