rag-corpus-hygiene
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
Guardrail for linting and reviewing RAG corpora before ingestion, with emphasis on prompt residue, retrieval magnets, public safety, and source hygiene.
In this repository57 other files it gives its agents.
- ai-app-integrationSkill
- anti-llm-frontend-designSkill
- aspnet-core-web-developmentSkill
- async-python-patternsSkill
- browser-game-foundationsSkill
- browser-local-qaSkill
- build-mcp-server-sdk-v2Skill
- canva-design-opsSkill
- check-completionSkill
- cli-tool-creatorSkill
- cloudflare-agents-mcpSkill
- cloudflare-durable-objectsSkill
- cloudflare-workers-platformSkill
- deployment-preview-workflowsSkill
- docx-document-artifactsSkill
- durable-workflow-orchestrationSkill
- dynamic-og-imagesSkill
- eval-auditSkill
- evaluate-ragSkill
- figma-design-to-code-rulesSkill
- fine-tuningSkill
- frontend-product-builderSkill
- game-asset-pipeline-expansionSkill
- game-ui-playtestSkill
- generate-synthetic-dataSkill
- github-pr-ci-opsSkill
- gmail-inbox-opsSkill
- golden-datasetSkill
- huggingface-llm-trainerSkill
- javascript-monorepo-buildsSkill
- linear-issue-managementSkill
- media-generation-transcriptionSkill
- millrace-rs-contract-paritySkill
- minecraft-mod-qa-automationSkill
- notion-workspace-flowsSkill
- openai-docsSkill
- optimize-agentic-cliSkill
- pdf-artifact-workflowSkill
- phaser-2d-game-developmentSkill
- postgres-query-performanceSkill
- product-ui-polish-reviewSkill
- pydantic-v2-patternsSkill
- python-repo-refactoring-hygieneSkill
- react-next-performance-reviewSkill
- rust-best-practicesSkill
- shadcn-ui-compositionSkill
- skill-evaluation-harnessSkill
- tauri-desktopSkill
- tauri-mcp-cliSkill
- tauri-ptySkill
- tile-pixel-art-transitionsSkill
- train-sentence-transformersSkill
- typer-cli-patternsSkill
- using-dbt-for-analytics-engineeringSkill
- validate-evaluatorSkill
- visual-asset-pipelineSkill
- watchdog-file-watcher-patternsSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Run available corpus lint checks before ingestion.
- Distinctive: line 33
Keep broad overview docs out of normal indexed evidence unless retrieval hooks are narrow.
- Distinctive: line 36
Do not index prompt instructions or evaluator scaffolding as evidence.
- Distinctive: line 37
Do not index local absolute paths, secrets, or private identity details.
- Distinctive: line 38
Do not let source maps or broad summaries dominate retrieval for unrelated questions.
- Distinctive: line 39
Treat linter warnings as review prompts, not automatic truth.
- Distinctive: line 40
Prefer narrow, concrete source documents over catch-all answer banks.
- Distinctive: line 55
Run corpus linting or perform structured review.
- Distinctive: line 60
Document remaining warnings and accepted risks.
- Distinctive: line 70
Start with lint output and the highest-impact documents.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RAG Corpus Hygiene
Purpose
Help agents clean and review a RAG corpus before indexing. This skill focuses on prompt residue, broad retrieval magnets, local paths, private data, malformed metadata, overbroad summaries, and source documents likely to attract wrong queries.
Quick Start
- Run available corpus lint checks before ingestion.
- Review broad summaries, heavily cited docs, role/identity docs, and new evidence manually.
- Replace broad positioning with concrete facts, dates, artifacts, roles, and limitations.
- Move facts into narrow source-specific documents where possible.
- Keep broad overview docs out of normal indexed evidence unless retrieval hooks are narrow.
Operating Constraints
- Do not index prompt instructions or evaluator scaffolding as evidence.
- Do not index local absolute paths, secrets, or private identity details.
- Do not let source maps or broad summaries dominate retrieval for unrelated questions.
- Treat linter warnings as review prompts, not automatic truth.
- Prefer narrow, concrete source documents over catch-all answer banks.
Inputs This Skill Expects
- Corpus root, evidence document schema, and ingestion settings.
- Lint output, changed documents, or known retrieval failures.
- Public/private display policy.
- Chunking defaults and documents excluded from normal retrieval.
Output Contract
- Report corpus hygiene issues by severity.
- Provide exact document repairs or review instructions.
- State which files should be excluded, narrowed, split, or rewritten.
- State whether ingestion is safe or blocked.
Procedure
- Run corpus linting or perform structured review.
- Inspect documents that influence retrieval most.
- Identify prompt residue, evaluator scaffolding, broad retrieval magnets, local paths, secrets, and malformed metadata.
- Repair or quarantine risky documents.
- Re-run lint and spot-check retrieval for representative queries.
- Document remaining warnings and accepted risks.
Pitfalls And Gotchas
- Embedding the assistant's desired behavior inside evidence documents.
- Treating broad summaries as harmless when they dominate semantic retrieval.
- Letting prompt residue become source truth.
- Rewriting precise facts into flowery prose that retrieves poorly.
- Fixing warnings mechanically without reading the document context.
Progressive Disclosure
Start with lint output and the highest-impact documents. Expand into chunking, source exclusion, metadata redesign, or retrieval evals only when hygiene findings explain actual failures.
Verification Pattern
- Confirm lint or structured review was run.
- Confirm local paths, secrets, and prompt residue are removed or intentionally excluded.
- Confirm broad docs have narrow retrieval hooks or are excluded from normal evidence.
- Confirm representative retrieval queries no longer pull irrelevant source magnets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

