Z Grounded Source Qa logo

Z Grounded Source Qa

Community
tjxj
z-grounded-source-qa

Use this skill whenever the user wants answers, summaries, comparisons, decisions, quotations, persona simulations, articles, scripts, or claim checks that must stay grounded in user-provided local source files. Trigger for source-grounded QA, evidence-based answering, corpus questions, transcript analysis, “只根据这些资料回答”, “按原文核对”, “给出页码/时间戳/出处”, “不要编”, “从访谈里找依据”, and reusable question answering over Markdown or text corpora. Run multi-expression retrieval, preserve source locations, separate supported claims from inference, and retry retrieval before declaring that a source is silent.

Overview

Publishertjxj
Repositoryz-skills
Skill namez-grounded-source-qa
Stars
548
Forks
102
Bundled files
11
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by tjxj on GitHub. Read the source before you install it.

Installation

Install the Z Grounded Source Qa AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/tjxj/z-skills/tree/main/z-grounded-source-qa
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tjxj/z-skills.git /tmp/z-skills
mkdir -p .claude/skills
cp -r /tmp/z-skills/z-grounded-source-qa .claude/skills/z-grounded-source-qa
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Z Grounded Source Qa in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Z Grounded Source Qa on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Z Grounded Source Qa is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Grounded Source QA

Turn arbitrary local Markdown or text files into a traceable evidence base for answering, synthesis, comparison, writing, and persona simulation.

The Skill carries the workflow and retrieval engine. The user's corpus stays outside the Skill.

Start with the source contract

Identify the exact files or directories the user placed in scope.

  • Accept Markdown, plain text, transcripts, meeting notes, exported web pages, and parsed documents
  • Convert PDF, Office, images, audio, or video to Markdown/text with an appropriate parser before retrieval
  • Keep the original files unchanged
  • Do not silently add web knowledge, model memory, or unrelated workspace files
  • State any source-access limitation that materially affects the answer

Read references/source-preparation.md when the corpus needs conversion, page markers, transcript metadata, or cleanup.

Retrieval workflow

Run this workflow before making material claims from the corpus:

  1. Restate the user's question as a claim or decision to resolve

  2. Generate 3–8 retrieval expressions covering:

    • the user's wording
    • synonyms and abbreviations
    • likely source wording
    • causes, mechanisms, risks, or counterarguments needed for a complete answer
  3. Run the deterministic retrieval script:

    bash
    python3 scripts/search_evidence.py \
      --source "/path/to/source-or-directory" \
      --query "core phrase" \
      --query "synonym" \
      --query "likely source wording" \
      --top-k 8 \
      --format json
  4. Inspect the evidence objects for coverage, location, and context

  5. Map each intended claim to evidence

  6. If the evidence covers only part of the question, change the expressions and run a second retrieval

  7. Read the closest source sections directly when results are fragmented, conflicting, or low-confidence

  8. Draft only after the evidence set is sufficient

Increasing --top-k alone is not a second retrieval. Change the wording or search a missing mechanism, exception, time period, or opposing view.

One empty query means the current expressions missed. It does not establish that the corpus lacks relevant material.

Evidence discipline

Classify each material statement internally:

  1. Direct: Explicitly stated in one source passage
  2. Synthesis: Supported by multiple passages combined without adding a new premise
  3. Inference: A reasonable conclusion that depends on an assumption; label the assumption
  4. Unsupported: No adequate evidence after a second retrieval and direct reading; omit it or state the gap

For high-stakes, disputed, public, or publication-bound claims, read references/evidence-contract.md and preserve the evidence IDs used.

When sources conflict:

  • show the conflicting statements and locations
  • distinguish date, scope, speaker, and definition differences
  • avoid silently choosing the more convenient passage

Answer modes

Choose the smallest mode that satisfies the user.

Natural answer

Lead with the answer. Add compact source locations after the claims they support.

Evidence audit

Use when the user asks for verification, citations, an audit trail, or publication review:

markdown
## Conclusion

## Evidence
- Claim — source file:line, page/time when available

## Inferences and assumptions

## Gaps or conflicts

Persona or voice simulation

Use source-backed reasoning and vocabulary. Preserve qualifiers and uncertainty. Mark extrapolation when the source supplies a framework but no direct answer. Never present invented private thoughts as source material.

Retrieval output

scripts/search_evidence.py uses only the Python standard library and:

  • recursively discovers .md, .markdown, and .txt files
  • returns complete semantic paragraphs
  • keeps document, line, page, timestamp, section, and speaker metadata
  • ranks multi-expression coverage
  • merges adjacent matched paragraphs
  • deduplicates repeated content while retaining additional locations
  • supports explicit regular-expression queries with --regex
  • returns JSON evidence objects for reliable downstream use

The script exits with code 1 when no evidence matches, while still emitting a valid result and a query-miss warning.

Create a dedicated Skill from this base

Use a dedicated Skill when the same person, book, policy, project, or product corpus will be queried repeatedly. The specialization should combine four layers:

text
retrieval capability + bounded corpus + answer contract + eval questions

Prepare page-marked Markdown from pdftotext output when needed:

bash
python3 scripts/prepare_pdftotext.py \
  extracted.txt prepared-source.md \
  --title "Source title"

Generate a self-contained specialization:

bash
python3 scripts/create_specialized_skill.py \
  --name z-example-advisor \
  --title "Example Advisor" \
  --mode advisor \
  --source prepared-source.md \
  --output-root /path/to/.agent/skills \
  --trigger "example book" \
  --question "What should I do first and why"

Choose persona, advisor, policy, or source-qa according to the intended answer contract. The generated Skill includes its own retriever, corpus directory, source hashes, profile, and eval questions.

Read references/specialization-guide.md before public release or when the specialization needs custom voice, policy authority, source reliability, or failure-boundary rules.

Completion check

Before sending the final answer, confirm:

  • every material claim maps to direct evidence, synthesis, or a labeled inference
  • at least one multi-expression retrieval ran
  • incomplete first-round evidence triggered a rewritten second retrieval
  • query miss and source absence were kept separate
  • conflicts and source limitations are visible
  • source locations are precise enough for another person to verify
  • the final format matches the user's requested answer, audit, article, or simulation
  • a generated specialization was tested with realistic questions before being shared

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Z Grounded Source Qa AI skill do?

Use this skill whenever the user wants answers, summaries, comparisons, decisions, quotations, persona simulations, articles, scripts, or claim checks that must stay grounded in user-provided local source files. Trigger for source-grounded QA, evidence-based answering, corpus questions, transcript analysis, “只根据这些资料回答”, “按原文核对”, “给出页码/时间戳/出处”, “不要编”, “从访谈里找依据”, and reusable question answering over Markdown or text corpora. Run multi-expression retrieval, preserve source locations, separate supported claims from inference, and retry retrieval before declaring that a source is silent.

Why use Z Grounded Source Qa on TypingMind?

Because you install it once and use it with any model. Z Grounded Source Qa is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Z Grounded Source Qa in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/tjxj/z-skills/tree/main/z-grounded-source-qa. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Z Grounded Source Qa?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Z Grounded Source Qa?

As many as you like. As long as a model supports skills, you can use Z Grounded Source Qa with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Z Grounded Source Qa AI skill free?

It is published on GitHub by tjxj. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇