Agent skill · Workflow
Grounded answer from your docs
Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it. Use when asked to run the "Grounded answer from your docs" workflow.
The grounded-answer-from-your-docs/ folder with SKILL.md.
The skill itself. Agents read the name and description first and load the rest only when a task matches.
grounded-answer-from-your-docs/SKILL.md
---
name: grounded-answer-from-your-docs
description: Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it. Use when asked to run the "Grounded answer from your docs" workflow.
---
# Grounded answer from your docs
Checks whether your pasted docs can answer a question, answers by quoting the passages it used, then removes any claim it can't point to. Says plainly when the docs don't cover it.
## Inputs
Ask for any of these that the user hasn't given:
- `question` (e.g. "Can I move my annual plan to monthly before it renews?")
- `docs` (e.g. "# Billing FAQ (docs.acme.test/billing)
Annual plans can be changed to monthly at renewal. Changes take effect at the next renewal date. Refunds for unused months are not available.
# Plans (docs.acme.test/plans)
Monthly plans can be cancelled at any time.")
## Steps
Run the steps in order. Refer to saved results by name. Don't skip a step that says STOP.
1. **Question and docs** — Start: Start with {{question}} and {{docs}}.
2. **Can the docs answer it?** — Read {{question}} and {{docs}}. Decide whether the docs fully answer the question, answer part of it, or don't cover it. Judge only from the docs, not from what you know. Pick one route: Save the result as `answer`.
- **Answered**: Answer {{question}} from {{docs}} only. After each sentence, cite the passage it relies on as [Title: "exact quote"]. Under 150 words. End with the one next step the reader should take.
- **Partly**: Answer the part of {{question}} that {{docs}} covers, citing each sentence as [Title: "exact quote"]. Then say exactly what the docs don't cover and who could answer it.
- **Not covered**: Say in one sentence that the docs provided don't answer {{question}}. List the two closest passages with their titles, and suggest what document would answer it. Don't answer from general knowledge.
3. **Check every claim** — Review loop (max 3 passes): Check {{answer}} against {{docs}}. Pass only if every sentence that states a fact has a citation, every quoted passage appears word for word in the docs, no sentence says more than its quote supports, and nothing comes from outside the docs. Remove or soften any claim that fails rather than finding a new source. Save the result as `answer`.
4. **Return the answer** — Finish: Return {{answer}} with its citations.
## Done when
Every step has run, each approval was given, and you've reported what was produced and where it was saved.