citations-retrieval
Document citations and RAG (Retrieval-Augmented Generation) patterns for Claude. Activate for source attribution, document grounding, citation extraction, and contextual retrieval.
npx skills add majiayu000/claude-skill-registry --skill citations-retrieval-lobbi-docs-claude-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Citations & Retrieval Skill Implement document-based citations and RAG patterns for grounded, verifiable AI responses. ## When to Use This Skill - Document Q&A with source attribution - RAG (Retrieval-Augmented Generation) systems - Grounding responses in provided documents - Building trustworthy AI applications - Research and analysis with citations ## Core Concepts ### Citation Types | Type | Use Case | Format | |------|----------|--------| | `char_location` | Text documents | Character ranges | | `page_location` | PDFs | Page numbers | | `content_block_location` | Custom content | Block indexes | ## Basic Citations ### Enable Citations ```python import anthropic client = anthropic.Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, documents=[ { "type": "document", "source": { "type": "text", "media_type": "text/plain", "data": "The company was founded in 2020. Revenue reached $10M in 2023." }, "title": "Company Overview", "citations": {"enabled": True} # Enable citations! } ], messages=[{"role": "user", "content": "When was the company founded and what was the revenue?"}] ) # Extract citations from response for block in response.c
- When to Use This Skill
- Core Concepts
- Citation Types
- Basic Citations
- Enable Citations
- Custom Content Blocks
- RAG Implementation
- Basic RAG Pipeline
- Contextual Retrieval (49-67% Better)
- Citation Formatting
- Format as Numbered References
- Academic Citation Formats
- Multi-Document Q&A
- Prompt Caching for RAG
What does the citations-retrieval skill do?
Document citations and RAG (Retrieval-Augmented Generation) patterns for Claude. Activate for source attribution, document grounding, citation extraction, and contextual retrieval.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill citations-retrieval-lobbi-docs-claude-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
