doc-classifier
Auto-detects document type from file path or content with confidence scoring, trying path-based detection first then content analysis
When & Why to Use This Skill
The doc-classifier skill is a high-efficiency utility designed to automatically identify document types using a dual-layered detection strategy. By combining rapid path-based pattern matching with deep content analysis of frontmatter metadata, it provides reliable classification with granular confidence scoring, making it an essential tool for organizing large-scale documentation and automating file-based workflows.
Use Cases
- Automated Documentation Routing: Automatically categorize incoming files into specific directories or processing pipelines based on their detected document type (e.g., API references vs. user guides).
- Metadata Validation and Cleanup: Scan existing repositories to identify 'untyped' documents or those with missing frontmatter, ensuring knowledge base consistency.
- Intelligent Agent Pre-processing: Enable AI agents to determine the context and structure of a file before performing complex tasks like summarization or code generation, improving response accuracy.
- CI/CD Documentation Checks: Integrate into build pipelines to verify that new files follow established path conventions or contain the required metadata fields.
| name | doc-classifier |
|---|---|
| description | Auto-detects document type from file path or content with confidence scoring, trying path-based detection first then content analysis |
| model | claude-haiku-4-5 |
doc-classifier
**Purpose**: Auto-detect doc_type from file path or content.Strategy:
- Path pattern first (docs/api/ → api)
- Content analysis fallback (read fractary_doc_type from frontmatter)
Content-Based Detection
- Read file (if file_path) or use content
- Extract frontmatter
- Read
fractary_doc_typefield - Return with confidence 90
Fallback
- Return
_untypedwith confidence 50
- Return