Skip to content
Back to skills

Doc Classifier

ASecurity

Auto-detects document type from file path or content with confidence scoring, trying path-based detection first then content analysis

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 8, 2026
toolsapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill doc-classifier --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc Classifier?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc Classifier
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-doc-classifier/badge)](https://www.skillsdirectory.com/skills/majiayu000-doc-classifier)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

<CONTEXT>
**Purpose**: Auto-detect doc_type from file path or content.

**Strategy**:
1. Path pattern first (docs/api/ → api)
2. Content analysis fallback (read fractary_doc_type from frontmatter)
</CONTEXT>

<CRITICAL_RULES>
- ALWAYS try path-based detection first
- ONLY read file if path detection fails
- NEVER modify files
- ALWAYS return confidence score (0-100)
</CRITICAL_RULES>

<INPUTS>
- `file_path` OR `content` (one required)
</INPUTS>

<WORKFLOW>
1. **Path-Based Detection**
   - Check if path matches: docs/{doc_type}/
   - Return doc_type with confidence 100

2. **Content-Based Detection**
   - Read file (if file_path) or use content
   - Extract frontmatter
   - Read `fractary_doc_type` field
   - Return with confidence 90

3. **Fallback**
   - Return `_untyped` with confidence 50
</WORKFLOW>

<OUTPUTS>
```json
{
  "doc_type": "api",
  "confidence": 100,
  "method": "path|frontmatter|fallback"
}
```
</OUTPUTS>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.