Skip to content
Back to skills

Corpus Retrieval

ASecurity

Answers questions about <app> from its own documentation corpus (docs/, playbooks, references/) index-first, in at most five retrieval rounds, with file:line citations, and refuses plainly when the corpus does not answer.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 24, 2026
developmentapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add Facta-Dev/ai-coding-playbook --skill corpus-retrieval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Corpus Retrieval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Corpus Retrieval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/facta-dev-corpus-retrieval/badge)](https://www.skillsdirectory.com/skills/facta-dev-corpus-retrieval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: corpus-retrieval
description: "Answers questions about <app> from its own documentation corpus (docs/, playbooks, references/) index-first, in at most five retrieval rounds, with file:line citations, and refuses plainly when the corpus does not answer."
division: core
---

# <app> Corpus Retrieval skill

A workflow for answering questions from the repository's own documentation
corpus — `docs/`, `playbooks/`, `references/` and their like — not from code
behaviour. An agent invokes this skill when the answer lives in prose the
repository already wrote; the skill supplies the navigation, the agent
supplies the question.

## When to Activate

- A question about `<app>` whose answer is written down in the documentation
  corpus and should be traced to it.
- The requester wants the answer cited to the docs, not to a code path.
- A claim "the docs say X" that needs to be pinned to a file and line.

Do not activate when the answer comes from reading the code paths directly, or
for facts outside the repository's corpus.

## Core Principles

- Index first: read the corpus index before grepping, so retrieval follows
  the corpus's own organisation.
- Retrieval is bounded: at most five rounds, then either cite or refuse.
- Every answer cites file:line, never a vague "the docs say".
- An unanswered question gets a plain refusal, not a confabulated answer.

## Rules

- Read the index before the first grep; do not scan files blind.
- Use grep plus windowed reads; do not read a whole document when a window
  around the hit answers the question.
- Stop after five retrieval rounds: give the best cited answer, or refuse.
- Every answer carries file:line; no citation means no answer.
- When the corpus does not answer, say so explicitly and point at what is
  missing, rather than filling the gap from general knowledge.

## Research References

Provenance table, every claim in a finding needs a row.

| claim | source | year | link |
| --- | --- | --- | --- |
| Index-first navigation, a bounded retrieval round count, and file:line citations | kb-retriever skill | 2026 | `skills/kb-retriever/SKILL.md` |

## Output Format

Deliver, in order:

1. The answer, in the corpus's own terms, with a file:line citation for every
   assertion.
2. The retrieval log: how many rounds were used and which files were read.
3. Either the cited answer or the explicit refusal with what is missing.

Example:

```
corpus: answer = "pagination is capped at 50 rows" (docs/api.md:12-14)
corpus: rounds = 2 (index -> docs/api.md)
corpus: cited
```

Files in this skill

  • CREDITS.md1.3 KB
  • SKILL.md2.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.