Skip to content

kgraph57/paper-writer-skill

paper-writer

Verified

Medical/scientific paper writing workflow skill. Manages the full pipeline from literature search to submission-ready manuscript. Creates and manages a project directory with IMRAD-format section files, literature matrix, reference management, and quality checklists. Supports both English and Japanese papers. Triggers: 'write paper', 'paper-write', 'start manuscript', '論文を書く', '論文執筆', '論文プロジェクト', 'manuscript', 'research paper', '原稿作成'.

FileKindSize
SKILL.mdskill md77.7 KB
examples/case-studies/discovery-to-draft.mdmarkdown5.3 KB
references/abstract-formats.mdmarkdown5.1 KB
references/adversarial-review.mdmarkdown21.6 KB
references/ai-disclosure.mdmarkdown6.4 KB
references/ai-for-science-model.mdmarkdown12.8 KB
references/citation-guide.mdmarkdown2.4 KB
references/citation-verification.mdmarkdown10.5 KB
references/clinical-trial-registration.mdmarkdown4.7 KB
references/coauthor-review.mdmarkdown14.2 KB
references/coi-detailed.mdmarkdown6.8 KB
references/desk-rejection-prevention.mdmarkdown6.1 KB
references/hook-compatibility.mdmarkdown6.1 KB
references/humanizer-academic.mdmarkdown12.0 KB
references/imrad-guide.mdmarkdown2.5 KB
references/journal-reformatting.mdmarkdown5.6 KB
references/journal-selection.mdmarkdown13.5 KB
references/keywords-guide.mdmarkdown4.6 KB
references/master-reference-list.mdmarkdown11.3 KB
references/multilingual-guide.mdmarkdown12.4 KB
references/novelty-check.mdmarkdown13.8 KB
references/open-access-guide.mdmarkdown4.6 KB
references/pubmed-query-builder.mdmarkdown16.7 KB
references/reporting-guidelines-full.mdmarkdown10.6 KB
references/reporting-guidelines.mdmarkdown3.2 KB
references/section-checklist.mdmarkdown4.5 KB
references/statistical-reporting-full.mdmarkdown8.6 KB
references/statistical-reporting.mdmarkdown22.5 KB
references/submission-portals.mdmarkdown4.1 KB
references/supplementary-materials.mdmarkdown3.9 KB
references/tables-figures-guide.mdmarkdown7.7 KB
references/word-count-limits.mdmarkdown4.6 KB
scripts/analysis-template.pyexecutablescript19.6 KB
scripts/compile-manuscript.shexecutablescript6.9 KB
scripts/forest-plot.pyexecutablescript16.9 KB
scripts/sr-dedup.pyexecutablescript12.5 KB
scripts/sr-pdf-link.pyexecutablescript6.8 KB
scripts/sr-prisma-count.pyexecutablescript8.7 KB
scripts/table1.pyexecutablescript9.7 KB
scripts/word-count.shexecutablescript12.8 KB
templates/abstract.mdmarkdown1.3 KB
templates/acknowledgments.mdmarkdown1.7 KB
templates/analysis-workflow.mdmarkdown5.1 KB
templates/case-abstract.mdmarkdown1.2 KB
templates/case-introduction.mdmarkdown1.7 KB
templates/case-report.mdmarkdown2.2 KB
templates/conclusion.mdmarkdown1.0 KB
templates/cover-letter.mdmarkdown1.3 KB
templates/data-management.mdmarkdown5.7 KB
templates/declarations.mdmarkdown6.1 KB
templates/discussion.mdmarkdown1.8 KB
templates/graphical-abstract.mdmarkdown2.7 KB
templates/highlights.mdmarkdown3.8 KB
templates/human-loop-ledger.mdmarkdown9.4 KB
templates/introduction.mdmarkdown1.8 KB
templates/limitations-guide.mdmarkdown6.2 KB
templates/literature-matrix.mdmarkdown1.2 KB
templates/methods.mdmarkdown1.9 KB
templates/preregistration.mdmarkdown19.5 KB
templates/project-init-case.mdmarkdown3.2 KB
templates/project-init.mdmarkdown3.6 KB
templates/proof-correction.mdmarkdown2.5 KB
templates/research-question.mdmarkdown18.6 KB
templates/response-to-reviewers.mdmarkdown12.5 KB
templates/results.mdmarkdown1.5 KB
templates/review-article.mdmarkdown11.6 KB
templates/revision-cover-letter.mdmarkdown10.3 KB
templates/sr-data-extraction.mdmarkdown9.2 KB
templates/sr-grade.mdmarkdown14.7 KB
templates/sr-outline.mdmarkdown13.5 KB
templates/sr-prisma-flow.mdmarkdown12.9 KB
templates/sr-prospero.mdmarkdown15.9 KB
templates/sr-rob.mdmarkdown18.3 KB
templates/sr-screening-pipeline.mdmarkdown12.1 KB
templates/study-design.mdmarkdown28.5 KB
templates/submission-ready.mdmarkdown2.5 KB
templates/title-page.mdmarkdown3.5 KB

scripts/sr-prisma-count.py

View on GitHub
#!/usr/bin/env python3
"""
SR PRISMA Counter — final step of the screening pipeline.

Reads the three stage outputs and emits every number the PRISMA 2020 flow
diagram needs, the inter-rater reliability (Cohen's kappa) for each screening
stage, and the 8 internal-consistency checks from sr-prisma-flow.md.

Usage:
    python sr-prisma-count.py \
        --identification counts/identification.json \
        --ta 02_title_abstract_screen.csv \
        --ft 03_fulltext_screen.csv \
        --output counts/prisma-summary.md

--ft is optional (full-text screening may not be done yet); the summary then
covers identification + title/abstract only.

No LLM. Pure counting from the decision columns produced by the dual-screening
stages.
"""

import argparse
import csv
import json
import os
import sys
from collections import Counter

csv.field_size_limit(10_000_000)


def norm_decision(v):
    """Map a raw decision cell to include / exclude / '' (unknown)."""
    s = (v or "").strip().lower()
    if s.startswith("inc") or s.startswith("unc") or s == "maybe":
        return "include"   # unclear → include (conservative, retrieve it)
    if s.startswith("exc") or s in ("no", "out"):
        return "exclude"
    return ""


def read_csv(path):
    with open(path, newline="", encoding="utf-8-sig", errors="replace") as f:
        return list(csv.DictReader(f))


def cohens_kappa(pairs):
    """pairs: list of (r1, r2) in {include, exclude}. Returns (kappa, n) or (None, 0)."""
    pairs = [(a, b) for a, b in pairs if a in ("include", "exclude")
             and b in ("include", "exclude")]
    n = len(pairs)
    if n == 0:
        return None, 0
    cats = ("include", "exclude")
    po = sum(1 for a, b in pairs if a == b) / n
    pe = sum((sum(1 for a, _ in pairs if a == c) / n) *
             (sum(1 for _, b in pairs if b == c) / n) for c in cats)
    if pe == 1:
        return 1.0, n
    return (po - pe) / (1 - pe), n


def kappa_label(k):
    if k is None:
        return "n/a"
    if k < 0.20:
        return "slight"
    if k < 0.40:
        return "fair"
    if k < 0.60:
        return "moderate"
    if k < 0.80:
        return "substantial"
    return "almost perfect"


def check(ok):
    return "PASS" if ok else "**FAIL**"


def main():
    ap = argparse.ArgumentParser(description="SR PRISMA counter")
    ap.add_argument("--identification", required=True)
    ap.add_argument("--ta", required=True, help="02_title_abstract_screen.csv")
    ap.add_argument("--ft", help="03_fulltext_screen.csv (optional)")
    ap.add_argument("--output", required=True)
    args = ap.parse_args()

    with open(args.identification, encoding="utf-8") as f:
        ident = json.load(f)
    db_counts = ident.get("db_counts", {})
    total_identified = ident.get("total_identified", sum(db_counts.values()))
    duplicates_removed = ident.get("duplicates_removed", 0)
    records_after_dedup = ident.get("records_after_dedup",
                                    total_identified - duplicates_removed)

    ta = read_csv(args.ta)
    records_screened = len(ta)
    ta_consensus = [norm_decision(r.get("consensus_decision")) for r in ta]
    ta_excluded = sum(1 for d in ta_consensus if d == "exclude")
    reports_sought = sum(1 for d in ta_consensus if d == "include")
    ta_kappa, ta_n = cohens_kappa(
        [(norm_decision(r.get("reviewer1_decision")),
          norm_decision(r.get("reviewer2_decision"))) for r in ta])
    ta_conflicts = sum(1 for r in ta if (r.get("conflict") or "").strip().upper() == "Y")

    ft = read_csv(args.ft) if args.ft and os.path.isfile(args.ft) else None

    lines = []
    lines.append("# PRISMA 2020 Flow — Computed Counts\n")
    lines.append("> Auto-generated by sr-prisma-count.py. Copy these numbers "
                 "into sr-prisma-flow.md and the kappa values into the Methods "
                 "selection-process paragraph.\n")

    lines.append("## Identification\n")
    lines.append("| Source | Records |")
    lines.append("|--------|---------|")
    for db, c in db_counts.items():
        lines.append(f"| {db} | {c} |")
    lines.append(f"| **Total identified** | **{total_identified}** |")
    lines.append(f"| Duplicate records removed | {duplicates_removed} |")
    lines.append(f"| **Records after de-duplication** | **{records_after_dedup}** |\n")

    lines.append("## Screening — Title/Abstract\n")
    lines.append(f"- Records screened: **{records_screened}**")
    lines.append(f"- Records excluded (title/abstract): **{ta_excluded}**")
    lines.append(f"- Reports sought for retrieval: **{reports_sought}**")
    lines.append(f"- Conflicts flagged for human resolution: {ta_conflicts}")
    lines.append(f"- Inter-rater reliability (Cohen's κ): "
                 f"**{'%.3f' % ta_kappa if ta_kappa is not None else 'n/a'}** "
                 f"({kappa_label(ta_kappa)}, n={ta_n})\n")

    checks = []
    checks.append(("Total identified = Σ database records",
                   total_identified == sum(db_counts.values()) if db_counts else True))
    checks.append(("Records after dedup = identified − duplicates",
                   records_after_dedup == total_identified - duplicates_removed))
    checks.append(("Records screened = records after dedup",
                   records_screened == records_after_dedup))
    checks.append(("TA-excluded + reports sought = records screened",
                   ta_excluded + reports_sought == records_screened))

    if ft is not None:
        ft_consensus = [norm_decision(r.get("consensus_decision")) for r in ft]
        retrieved_col = any((r.get("pdf_retrieved") or "").strip() for r in ft)
        if retrieved_col:
            reports_assessed = sum(1 for r in ft
                                   if (r.get("pdf_retrieved") or "").strip().upper() == "Y")
            reports_not_retrieved = sum(1 for r in ft
                                        if (r.get("pdf_retrieved") or "").strip().upper() == "N")
        else:
            reports_assessed = len(ft)
            reports_not_retrieved = max(0, reports_sought - reports_assessed)
        ft_excluded = sum(1 for d in ft_consensus if d == "exclude")
        studies_included = sum(1 for d in ft_consensus if d == "include")
        reasons = Counter((r.get("exclusion_reason_category") or "Unspecified").strip()
                          for r, d in zip(ft, ft_consensus) if d == "exclude")
        ft_kappa, ft_n = cohens_kappa(
            [(norm_decision(r.get("reviewer1_decision")),
              norm_decision(r.get("reviewer2_decision"))) for r in ft])
        ft_conflicts = sum(1 for r in ft
                           if (r.get("conflict") or "").strip().upper() == "Y")

        lines.append("## Screening — Full Text\n")
        lines.append(f"- Reports not retrieved: **{reports_not_retrieved}**")
        lines.append(f"- Reports assessed for eligibility: **{reports_assessed}**")
        lines.append(f"- Reports excluded (full text): **{ft_excluded}**")
        lines.append(f"- **Studies included in review: {studies_included}**")
        lines.append(f"- Conflicts flagged for human resolution: {ft_conflicts}")
        lines.append(f"- Inter-rater reliability (Cohen's κ): "
                     f"**{'%.3f' % ft_kappa if ft_kappa is not None else 'n/a'}** "
                     f"({kappa_label(ft_kappa)}, n={ft_n})\n")
        lines.append("### Full-text exclusions by reason\n")
        lines.append("| Reason | n |")
        lines.append("|--------|---|")
        for reason, c in reasons.most_common():
            lines.append(f"| {reason} | {c} |")
        lines.append(f"| **Total excluded** | **{ft_excluded}** |\n")

        checks.append(("Not retrieved + assessed = reports sought",
                       reports_not_retrieved + reports_assessed == reports_sought))
        checks.append(("FT-excluded + included = reports assessed",
                       ft_excluded + studies_included == reports_assessed))
        checks.append(("Σ exclusion reasons = FT-excluded",
                       sum(reasons.values()) == ft_excluded))
    else:
        lines.append("## Screening — Full Text\n")
        lines.append("_Full-text stage not yet run (no --ft file)._\n")

    lines.append("## Internal-consistency checks\n")
    lines.append("| Check | Result |")
    lines.append("|-------|--------|")
    for desc, ok in checks:
        lines.append(f"| {desc} | {check(ok)} |")
    lines.append("")

    all_pass = all(ok for _, ok in checks)
    lines.append(f"**Overall: {'ALL CHECKS PASS' if all_pass else 'CHECKS FAILED — review counts above'}**\n")

    out = "\n".join(lines)
    os.makedirs(os.path.dirname(os.path.abspath(args.output)), exist_ok=True)
    with open(args.output, "w", encoding="utf-8") as f:
        f.write(out)

    print(out)
    print(f"\nWrote {args.output}")
    if not all_pass:
        sys.exit(1)


if __name__ == "__main__":
    main()
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall