swarm: Command for Claude Code

.claude/commands/submit_paper.md

submit_paper is a command for Claude Code from swarm-ai-research/swarm. It costs 0 tokens per session (2,195 once invoked), scanned A, original, MIT.

A command for submitting research papers to the ClawXiv and AgentXiv paper repositories. It checks credentials, verifies author information, validates the submission, and can retry after rate limits.

In plain words
What is it for?
Use it to submit one paper or all named papers to either repository or both, including checking whether an AgentXiv account is active.
Why use it?
It catches account and submission issues before sending a paper. It also supports a dry run so you can inspect the process without submitting.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is swarm-ai-research/swarm's own configuration. It tells Claude Code how to work on swarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/submit_paper.md
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code.

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 submit_paper

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/submit_paper.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/submit_paper)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/submit_paper"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/submit_paper.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,195 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.02195
Opus 5 $0.00000 $0.01097
Sonnet 5 $0.00000 $0.00439
Haiku 4.5 $0.00000 $0.00219

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

Security

Grade A, and why

submit_paper scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Base URL**: `https://www.clawxiv.org` (NOT `https://clawxiv.org` — that returns a 308 redirect which breaks `urllib`).
.claude/commands/submit_paper.md · 152 lines

How it starts

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

/submit_paper

Submit a paper to ClawXiv and/or AgentXiv with validation, credential checks, and rate-limit retry.

Usage

/submit_paper <paper_name> [--platform clawxiv|agentxiv|both] [--dry-run]

Where <paper_name> is one of the paper stems (e.g. distributional_agi_safety, governance_mechanisms, collusion_dynamics) or all for batch submission.

Pre-flight Checks (run ALL before any submission)

  1. Credential validation

    • ClawXiv: load key from ~/.config/clawxiv/swarmsafety.json or .credentials/agent_platforms.md
    • AgentXiv: load key from ~/.config/agentxiv/credentials.json (current entry)
    • For AgentXiv, call GET /api/v1/agents/status and verify status is claimed or active. If pending_claim, STOP and tell the user to claim the account first.
  2. Author attribution check

    • Grep the submission .tex for \author{} content.
    • If the author is NOT "SWARM Research Collective", auto-replace it to "SWARM Research Collective" in the submission copy (docs/papers/<name>_submission.tex) and inform the user (do not ask — the canonical docs/papers/<name>.tex source is not modified).
    • This avoids a blocking question on every submission. The user can pass --keep-author to skip the replacement.
  3. Category validation

    • ClawXiv valid categories: cs.MA, cs.AI, cs.CL, cs.LG, cs.CR, cs.SE (check via API if unsure)
    • AgentXiv valid categories: general, agent-behavior, agent-communication, tool-use, reasoning, memory, planning, meta-cognition, alignment, emergent-behavior, human-agent-interaction, multi-agent-systems
  4. Source validation

    • Validate using the exact API below (avoids rediscovery after context compaction):
    from swarm.research.submission import SubmissionValidator
    from swarm.research.platforms import Paper
    paper = Paper(title=..., abstract=..., source=tex, categories=['cs.MA', 'cs.AI'])
    sv = SubmissionValidator()          # instance, not classmethod
    result = sv.validate(paper)         # returns ValidationResult
    # result.passed (bool) — True if no errors
    # result.issues (list[ValidationIssue]) — each has .severity.value, .code, .message
    # result.quality_score (float) — 0-100
    
    • Auto-fix section names: If the source contains \section{Experimental Setup}, rename it to \section{Methods} before validation. Similarly rename \section{Experimental Methods} to \section{Methods}. The validator requires \section{Methods} or \section{Experiments} exactly.
    • The validator also requires a \section{Conclusion}. If missing, add a brief one to the submission copy before validating.
    • For papers with \includegraphics, verify all referenced figures exist

Read the full file on GitHub · 152 lines

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 · 152 lines · 0 tokens per session scan A 98f2f1430205

Subscribe to this mod's changes

submit_paper is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,195 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.