Enforces response quality standards including mandatory source citations for Claude Code.
This plugin ensures Claude always discloses where information comes from, enabling users to verify claims and assess reliability.
Every response with factual claims must cite sources using these categories:
| Category | Format | When to Use |
|---|---|---|
| FILE | [FILE: path/to/file.ts:L42-L56] |
Information from reading project files |
| WEB | [WEB: https://example.com] |
Information from web search or fetch |
| MCP | [MCP: server-name/tool-name] |
Information from MCP tools |
| TRAINING | [TRAINING: knowledge cutoff Jan 2025] |
General knowledge from training data |
| INFERRED | [INFERRED: from X] |
Conclusions drawn from reasoning |
Responses with factual claims include a Sources section:
Based on the handler implementation [FILE: src/api/users.ts:L23-L45]...
---
## Sources
- [FILE: src/api/users.ts:L23-L45] - User handler implementation
- [WEB: https://react.dev/hooks] - React hooks documentation
- [TRAINING] - General knowledge (cutoff: Jan 2025)No sources required for:
- Procedural statements ("Running npm install now...")
- Error message reporting (self-evident from tool output)
- Clarifying questions to the user
- Simple acknowledgments
/plugin install response-quality@claude-code-plugins- SessionStart hook - Injects citation requirements into Claude's context at session start
- Memory file - Reference documentation for citation format (in
memory/source-citation-requirements.md)
- .NET 10 SDK - Required for running the C# hook script
- The hook uses
#!/usr/bin/env dotnet runwhich requires .NET SDK - Install from dotnet.microsoft.com
- Verify with:
dotnet --version
- The hook uses
Note: If .NET SDK is not installed, the hook will fail silently. The plugin's functionality depends on the hook injecting citation context at session start.
The plugin works out of the box with no configuration required (assuming .NET SDK is installed).
After installation, test by:
- Starting a new session - citation context should be injected
- Asking a question requiring file reads - should see
[FILE]citations - Asking for web search - should see
[WEB]citations and Sources section - Asking general knowledge question - should see
[TRAINING]tag
- 1.0.0 - Initial release with source citation enforcement
MIT