domain-keyword-detection

Detect document domains via keyword matching against YAML domain packs.

2|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/hailingu/llm-prompts --skill domain-keyword-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-keyword-detection
Source: https://github.com/hailingu/llm-prompts/tree/main/skills/domain-keyword-detection
Command: npx skills add https://github.com/hailingu/llm-prompts --skill domain-keyword-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyYAML, and includes scripts (resource) components.

What problem does it solve?

Automatically detects the domain(s) of a document using lightweight keyword matching to enable targeted processing and routing.

Core Features & Use Cases

  • Domain detection from raw text or documents using domain keyword packs.
  • Retrieve domain keywords for validation or customization.
  • List available domains and their descriptions for quick reference.
  • Validate domain configurations to ensure keyword data integrity.

Quick Start

Detect domains from a document by running the domain_detector.py detect command with your input text.

Frequently Asked Questions about domain-keyword-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect the domain of a document from raw text?

Document domain detection works by matching raw text against predefined keyword packs loaded from YAML configuration files. The detector scores keyword matches to identify relevant domains and route documents to domain-specific agents for targeted processing.

How do I configure custom domain keyword packs for text analysis?

You configure custom domain keyword packs by creating YAML files in the domains/ directory. The skill loads these configurations via PyYAML, enabling you to define, validate, and customize domain-specific keywords for document routing.

Can I use domain keyword matching for document routing with Python 3?

Yes, domain keyword matching for document routing requires Python 3 and PyYAML. The skill loads domain configurations from YAML files, applies the detector to documents, and routes tasks to domain-specific agents based on matched keywords.

What is the best way to validate domain configurations for keyword detection?

The best way to validate domain configurations is to use the skill's built-in validation command, which checks YAML keyword data integrity. This ensures domain packs in the domains/ directory are correctly structured before running document detection.

How do I list available document domains and their descriptions?

You list available document domains and their descriptions using the skill's list command. This provides a quick reference of all configured domain packs loaded from YAML files in the domains/ directory, showing available domains for detection.

Does lightweight keyword detection work for routing documents to specific agents?

Lightweight keyword detection is designed for routing documents to domain-specific agents. By matching text against domain keyword packs, the skill determines relevant domains and directs tasks to the appropriate agent for targeted processing.