prior-art
Conduct a systematic literature survey. Reads the thesis from .papermill/state.md, searches academic sources, classifies references, identifies gaps, generates BibTeX, and updates the state file. Can launch the surveyor agent for deeper autonomous search.
What this skill does
# Prior Art: Systematic Literature Survey Conduct a **collaborative, iterative** literature survey with the user. This is not a one-shot dump of references -- work together to map the landscape of existing work, identify gaps, and position the user's contribution. ## Step 1: Read Context Begin by gathering everything you need to understand the research context. 1. **Read `.papermill/state.md`** in the project root (Read tool), if it exists. Extract: - The thesis statement and core contribution. - Any existing `prior_art` entries (key references, gaps, last survey date). - The paper's target venue, discipline, and methodology. If `.papermill/state.md` does not exist, the survey can still proceed — ask the user to describe their research topic and thesis directly. Suggest running `/papermill:init` afterward to persist the results. 2. **Read existing `.bib` file(s)** (Glob/Read tools). Scan for all BibTeX files in the project (commonly `references.bib`, `paper/references.bib`, or similar). These are seed references. Parse out author names, titles, years, and keywords -- these seeds will anchor the search. 3. **Summarize your understanding** back to the user before proceeding. Confirm: "Here is what I understand your paper is about, and here are the N existing references I found. Shall I begin the survey from this starting point?" Do NOT skip the confirmation step. The user may want to adjust scope, add keywords, or exclude certain directions. ## Step 2: Keyword Generation From the thesis and seed references, derive **5-10 search queries** with: - **Varying specificity**: Some broad (field-level), some narrow (method + application). - **Synonym coverage**: Use alternative terminology for the same concept. Different communities use different vocabulary for the same ideas. - **Author-based queries**: Include searches for key authors from seed references to find their related work. Present the proposed queries to the user. Ask: "Are there additional terms, subfields, or authors I should include? Any directions to exclude?" Revise the query list based on feedback before searching. ## Step 3: Search Use **WebSearch** (WebSearch tool) to query academic sources. For each search query, formulate searches targeting: - Google Scholar (general academic coverage) - arXiv (preprints, especially for CS/math/physics/statistics) - Semantic Scholar (structured metadata, citation graphs) Use **multiple formulations per concept** -- rephrase, use synonyms, try with and without quotes around key phrases. Academic search is noisy; redundancy is essential. For each query, collect the top results. Do not chase every link. Focus on results that appear in multiple searches or that are highly cited. ## Step 4: Screen Candidates For each candidate result, extract and present: | Field | Description | |-------|-------------| | **Title** | Full title of the work | | **Authors** | First author et al. (or all if few) | | **Year** | Publication year | | **Venue** | Journal, conference, or preprint server | | **Summary** | 1-2 sentence abstract summary focused on relevance to the user's thesis | | **Relevance** | Brief note on why this may matter for the user's paper | Do NOT fabricate citations. If you cannot verify a reference exists, say so explicitly. Mark any reference you are uncertain about with "[unverified]" and suggest the user confirm it. ## Step 5: Classify References Categorize each relevant reference into one of four classes: - **Foundational**: Established the field, method, or theoretical framework the user builds on. These typically appear in the introduction and background sections. - **Competing**: Addresses the **same problem** as the user but with a different approach. These require the most careful discussion. They appear in the related work section and sometimes in the discussion. - **Complementary**: Addresses a **related but distinct** problem. The user's work could combine with theirs, or theirs provides tools/data the user leverages. - **Tangential**: Loosely related. Useful for context but not central. Include sparingly. Present your classification rationale. The user may reclassify references, and that is expected and valuable. ## Step 6: Present Findings in Batches **Show 3-5 references at a time.** For each batch: 1. Present the references with their extracted metadata and proposed classification. 2. Ask the user: - "Which of these are relevant? Should any be reclassified?" - "Do any of these suggest new search directions I should pursue?" - "Should I go deeper into any particular reference's citation network?" 3. Record the user's decisions. **Iterate.** Run additional searches based on what you learn. Follow citation chains: if a confirmed reference cites something interesting, pursue it. If a confirmed reference is cited by many others, look at the citers. Continue until the user says the coverage is sufficient or you have exhausted productive search directions. ## Step 7: Gap Analysis After accumulating confirmed references, synthesize a **gap analysis**: 1. **What questions does prior work answer?** Summarize the state of knowledge. 2. **What questions remain open?** Identify specific gaps, limitations, or unresolved problems. 3. **How does the user's thesis fill those gaps?** This is the paper's positioning. 4. **What assumptions or limitations does the user's approach share with prior work?** Present this as a structured summary. This analysis directly feeds into the paper's introduction and related work sections. ## Step 8: Generate BibTeX For each confirmed reference that is **not already in the .bib file**: 1. Generate a well-formed BibTeX entry with a consistent citation key style (match the existing .bib file's conventions). 2. Include at minimum: author, title, year, and venue. 3. Include DOI or URL when available. 4. Present the entries to the user for approval before writing. After approval, append the new entries to the appropriate `.bib` file (Edit tool). ## Step 9: Update State File Update `.papermill/state.md` (Edit tool) with: - **`prior_art.key_references`**: Add each confirmed reference with citation key, classification, and a one-sentence relation description. - **`prior_art.last_survey`**: Set to today's date. - **`prior_art.gaps`**: A concise summary of identified gaps. Append a timestamped note to the markdown body documenting the survey. ## Step 10: Offer Deep Search If the user wants broader coverage, offer to launch the **surveyor agent** (Task tool with `subagent_type: "papermill:surveyor"`): > I can launch the surveyor agent for a deeper autonomous search. It will systematically explore citation networks and compile an extended reference list. Would you like me to launch it? Only offer this after the interactive survey has established a solid baseline. When launching, pass the agent: - The thesis statement - Seed references (existing `.bib` entries or key papers confirmed so far) - The search queries from Step 2 (plus any new ones discovered during the survey) - The current gap analysis from Step 7 The agent writes its results to `.papermill-survey-results.md` in the project root. After it completes: 1. Read `.papermill-survey-results.md` (Read tool). 2. Present a summary to the user (number of new references by category, updated gap analysis). 3. Ask the user to confirm which new references to keep — present them in batches of 3-5, same as Step 6. 4. Append confirmed BibTeX entries to the `.bib` file (Edit tool). 5. Update `prior_art` in `.papermill/state.md` with any new key references and the refined gap analysis (Edit tool). ## Step 11: Final Summary Close with a structured summary: > **Survey Summary** > - References found: N total (F foundational, C competing, X complementary) > - New BibTeX entries added: M > - Key gaps identified: [list] > - Suggested positioning: [1-2 sentences] > - Coverage assessment: [honest assessment of completeness]
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.