agentleFS
JacobinwweyJacobinwwey/notemdpro/skills/qa-extractor/SKILL.md

qa-extractor

Skill2 starsChanged 38 days agoMITView on GitHub

Use when extracting verbatim answers to specific questions from a long document, with optional translation of extracted text

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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
  1. Distinctive:

    Specific questions: Use clear, specific questions

    line 184
  2. Distinctive:

    Check output: Always verify extracted answers

    line 186

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

NoteMD Pro - Text Extraction (Q&A)

Overview

This feature extracts specific answers from markdown files based on user-configured questions. It uses LLM to analyze the content and provide precise answers to each question.

When to Use

  • Q&A extraction: Get specific answers from long documents
  • Data mining: Extract structured information from unstructured text
  • Survey analysis: Parse responses to multiple questions
  • Research: Pull key findings from papers

Function Call Chain

extractOriginalText (extractOriginalText.ts)
├── read_file(inputPath)
├── settings.extractQuestions (split by newlines)
├── getProviderAndModelForTask('extractOriginalText')
├── IF mergedMode
│   └── callLLM with all questions combined
├── ELSE (individual mode)
│   └── for each question
│       └── callLLM with single question
├── Format results
└── save to output file
    ├── mkdir_p(outputFolderPath)
    └── write_file(outputPath, content)

Key Function (from extractOriginalText.ts)

extractOriginalText

Extracts answers to configured questions from a file.

export async function extractOriginalText(
  plugin: NotemdPlugin,
  inputPath: string,
  reporter: ProgressReporter,
): Promise<void>;
// Outputs: File with Q&A extracted

Settings

Question Configuration

SettingDescription
extractQuestionsQuestions to ask (one per line)
extractOriginalTextMergedModeProcess all questions in one LLM call

Provider Settings

SettingDescription
extractOriginalTextProviderLLM provider for extraction
extractOriginalTextModelModel for extraction
extractOriginalTextLanguageLanguage for output

Contextual Context (Macro Settings)

SettingDescription
enableFocusedLearningInject macro user domain preferences globally
focusedLearningDomainThe specific domain context (e.g., "Quantum Physics")

Output Settings

SettingDescription
extractOriginalTextUseCustomOutputUse custom output path
extractOriginalTextCustomPathCustom output folder
extractOriginalTextCustomSuffixCustom filename suffix

Translation

SettingDescription
translateExtractOriginalTextOutputTranslate extracted text

Prompt Templates (extractOriginalText)

Individual Mode

You are a strict Data Extraction and Verification Agent.
Your task is to extract the answer to the user's question from the provided reference content.

Reference Content:
{REFERENCE_CONTENT}

User Question:
{USER_INPUT}

Instructions:
1. Answer ONLY based on the reference content provided
2. If the answer is not found, state "Answer not found in the provided text"
3. Be precise and concise
4. Include relevant context if necessary

Merged Mode

You are a strict Data Extraction and Verification Agent.
Your task is to extract answers to ALL questions from the provided reference content.

Reference Content:
{REFERENCE_CONTENT}

Questions:
{USER_INPUT}

Instructions:
1. Answer EACH question based ONLY on the reference content
2. Format each answer as: "Q: [question] A: [answer]"
3. If the answer is not found for a question, state "Answer not found"
4. Be precise and concise

Output Format

Individual Mode Output

Q: [Question 1]
A: [Answer 1]

Q: [Question 2]
A: [Answer 2]

Merged Mode Output

1. [Question 1]
[Answer 1]

2. [Question 2]
[Answer 2]

Processing Modes

Individual Mode (Default)

  • Processes each question separately
  • More accurate for complex questions
  • Higher API usage

Merged Mode

  • Combines all questions in one call
  • Faster processing
  • Less accurate for complex questions

Error Handling

Common Errors

  1. No questions configured
    • Error: "No questions configured in settings for extraction"
    • Solution: Add questions in plugin settings
  2. Empty file
    • Error: Cannot extract from empty file
    • Solution: Check source file content
  3. API errors
    • Error: LLM API failure
    • Solution: Check API key, network, retry

Best Practices

  1. Specific questions: Use clear, specific questions
  2. Limit questions: 5-10 questions per file works best
  3. Check output: Always verify extracted answers

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.