paper-writing

paper-writing is a skill for Claude Code, Codex from swarm-ai-research/swarm. It costs 17 tokens per session (1,089 once invoked), scanned A, original, MIT.

A tool for turning SWARM experiment data into a Markdown research paper with methods tables, results tables, and figure references. Markdown is plain text formatted for readable documents.

In plain words
What is it for?
Use it to load experiment runs, build methods and results tables, and assemble a paper draft with linked figures.
Why use it?
It removes repetitive work when documenting simulation methods and results from a database or CSV files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to load experiment runs, build methods and results tables, and assemble a paper draft with linked figures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/swarm-ai-research/swarm/paper-writing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add swarm-ai-research/swarm --skill paper-writing
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for paper-writing

README.md
[![agentmods](https://agentmods.dev/badge/skills/swarm-ai-research/swarm/paper-writing/github.svg)](https://agentmods.dev/skills/swarm-ai-research/swarm/paper-writing)
Your own site
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/paper-writing"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/paper-writing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for paper-writing

Your own site · 80×15
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/paper-writing"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/paper-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,089 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01089
Opus 5 $0.00009 $0.00544
Sonnet 5 $0.00003 $0.00218
Haiku 4.5 $0.00002 $0.00109

Measured 8d ago against content hash 4f13d1820513, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

paper-writing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

bench/skills/paper-writing/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Paper Writing Skill

Generate a markdown research paper pre-populated with methods tables, results tables, and figure references from SWARM experiment data.

Prerequisites

  • sqlite3 (Python stdlib) for reading runs database
  • pandas>=2.0 for data manipulation
  • Experiment data in SQLite database or CSV files

Procedure

1. Query the runs database

import sqlite3
import pandas as pd

def load_runs(db_path, scenario_ids=None):
    """Load scenario runs from SQLite database."""
    conn = sqlite3.connect(db_path)
    
    if scenario_ids:
        placeholders = ",".join("?" * len(scenario_ids))
        query = f"SELECT * FROM scenario_runs WHERE scenario_id IN ({placeholders})"
        df = pd.read_sql_query(query, conn, params=scenario_ids)
    else:
        df = pd.read_sql_query("SELECT * FROM scenario_runs", conn)
    
    conn.close()
    return df

2. Build the methods table

def build_methods_table(df):
    """Generate a markdown table of experimental scenarios."""
    scenarios = df.groupby("scenario_id").first().reset_index()
    
    lines = ["| Scenario | Agents | Governance | Seeds | Epochs |",
             "|----------|--------|-----------|-------|--------|"]
    
    for _, row in scenarios.iterrows():
        lines.append(
            f"| {row['scenario_id']} | {row.get('n_agents', 'N/A')} | "
            f"{row.get('governance_desc', 'default')} | "
            f"{row.get('n_seeds', 'N/A')} | {row.get('n_epochs', 'N/A')} |"
        )
    
    return "\n".join(lines)

3. Build the results table

def build_results_table(df):
    """Generate a cross-scenario summary results table."""
    summary = df.groupby("scenario_id").agg({
        "welfare": ["mean", "std"],
        "toxicity_rate": ["mean", "std"],
        "quality_gap": ["mean", "std"],
    }).reset_index()
    
    lines = ["| Scenario | Welfare (mean±std) | Toxicity (mean±std) | Quality Gap (mean±std) |",
             "|----------|-------------------|--------------------|-----------------------|"]
    
    for _, row in summary.iterrows():
        lines.append(
            f"| {row[('scenario_id', '')]} | "
            f"{row[('welfare', 'mean')]:.3f}±{row[('welfare', 'std')]:.3f} | "
            f"{row[('toxicity_rate', 'mean')]:.3f}±{row[('toxicity_rate', 'std')]:.3f} | "
            f"{row[('quality_gap', 'mean')]:.3f}±{row[('quality_gap', 'std')]:.3f} |"
        )
    
    return "\n".join(lines)

Read the full file on GitHub · 147 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 147 lines · 17 tokens per session scan A 4f13d1820513

Subscribe to this mod's changes

paper-writing is a skill published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,089 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.