detection
Auto-detect project language and documentation framework from filesystem markers.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Stack Detection
Language Detection
Scan the project root for these marker files. First match wins; if multiple match, use the one with the highest priority.
| Priority | Marker File | Language |
|---|---|---|
| 1 | Cargo.toml |
Rust |
| 2 | go.mod |
Go |
| 3 | pyproject.toml, setup.py, setup.cfg, Pipfile |
Python |
| 4 | tsconfig.json |
TypeScript |
| 5 | package.json (without tsconfig) |
JavaScript |
| 6 | *.csproj, *.sln |
C# |
| 7 | pom.xml, build.gradle, build.gradle.kts |
Java/Kotlin |
| 8 | None of the above | Generic |
When config.language is not "auto", skip detection and use the configured value.
Framework Detection
Scan for documentation framework config files. First match wins.
| Priority | Marker File | Framework | Doc Root |
|---|---|---|---|
| 1 | mkdocs.yml or mkdocs.yaml |
MkDocs | docs/ (or per mkdocs.yml docs_dir) |
| 2 | .vitepress/config.ts or .vitepress/config.js or .vitepress/config.mts |
VitePress | directory containing .vitepress/ |
| 3 | docusaurus.config.js or docusaurus.config.ts |
Docusaurus | docs/ (or per config docsDir) |
| 4 | conf.py (with extensions containing sphinx) |
Sphinx | source/ or directory containing conf.py |
| 5 | docs/ directory exists with .md files |
Plain Markdown | docs/ |
| 6 | README.md only |
Plain Markdown | project root |
When config.framework is not "auto", skip detection and use the configured value.
Detection Output
Return a JSON object:
{
"language": "typescript",
"languageConfidence": "high",
"framework": "vitepress",
"frameworkConfidence": "high",
"docRoot": "docs/",
"markers": ["tsconfig.json", ".vitepress/config.ts"]
}
Confidence levels:
-
high: marker file found and unambiguous -
medium: marker found but could be misidentified (e.g., JS project with stale tsconfig) -
low: fallback / guessing
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!