tidyfactor-doc
TidyFactor Doc — code documentation builder and dual-engine publishing platform (MkDocs Material & Docsify). Interviews codebases (source comments, Git history, env requirements, error patterns) to generate accurate, maintainable docs under /docs — API references, READMEs, inline comments, and technical guides. Supports interactive doc portal generation with static compilation (MkDocs Material with native Arabic RTL i18n & Neo-Brutalist themes) or zero-build lightweight SPAs (Docsify). Trigger on commands "init", "collect", "generate", "site", "mkdocs", "docsify", or requests like "document this repo", "write API docs", "generate a README", "add JSDoc/PHPDoc", "publish doc portal", "set up MkDocs", "set up Docsify". Has stack-specific rules for PHP, JavaScript, TypeScript, React/Vue/Next.
TidyFactor · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add TidyFactor/Doc --skill tidyfactor-doc技能说明
name: tidyfactor-doc description: TidyFactor Doc — code documentation builder and dual-engine publishing platform (MkDocs Material & Docsify). Interviews codebases (source comments, Git history, env requirements, error patterns) to generate accurate, maintainable docs under /docs — API references, READMEs, inline comments, and technical guides. Supports interactive doc portal generation with static compilation (MkDocs Material with native Arabic RTL i18n & Neo-Brutalist themes) or zero-build lightweight SPAs (Docsify). Trigger on commands "init", "collect", "generate", "site", "mkdocs", "docsify", or requests like "document this repo", "write API docs", "generate a README", "add JSDoc/PHPDoc", "publish doc portal", "set up MkDocs", "set up Docsify". Has stack-specific rules for PHP, JavaScript, TypeScript, React/Vue/Next.
TidyFactor Doc
A command dispatcher. This file does not do the work itself — it routes to the right command, which routes to the right workflow, which injects the right memory.
Commands
| User intent | Command | What it loads |
|---|---|---|
| "Set up docs for this project" / "scaffold /docs" | references/commands/init.md | workflows/init-docs.md + memory/doc-tree.md |
| "Document this codebase" / "gather what's needed to document X" | references/commands/collect.md | workflows/collect.md + memory/collection-sources.md |
| "Write API docs" / "generate a README" / "add inline comments" / "write a guide" | references/commands/generate.md | workflows/generate-api.md (or generate-readme.md / generate-inline.md / generate-guide.md) + memory/doc-templates.md + matching memory/stacks/*.md |
| "Publish documentation portal" / "turn /docs into a doc site" (Interactive) | references/commands/site.md | memory/site-engines.md + interactive selection (workflows/mkdocs.md or workflows/docsify.md) |
| "Set up MkDocs Material" / "compile static documentation" | references/commands/mkdocs.md | workflows/mkdocs.md + memory/mkdocs-config.md |
| "Set up Docsify" / "build lightweight zero-build doc SPA" | references/commands/docsify.md | workflows/docsify.md + memory/docsify-config.md |
Read only the command file that matches the request. Do not read all commands simultaneously.
Non-negotiable constraints on every command
- All generated documentation lives under
/docs. Never write API references, guides, or generated READMEs to another location. (README.mditself stays at the project root, per convention — everything else generated goes in/docs.) generatenever invents content. It only writes docs from whatcollectgathered (or equivalent detail the user supplies directly in the conversation) — never from assumed signatures, assumed env vars, or assumed behavior. If required detail is missing,generatesays what's missing and asks or falls back to runningcollectfirst.- Stack rules are looked up, never guessed. Before writing any code-level doc (API reference, inline comments), load the matching file under
memory/stacks/for the language/framework actually in use. Do not mix PHPDoc conventions into a TypeScript file or vice versa. site,mkdocs, anddocsifyonly organize and publish what's already in/docs. They never author new documentation content — that'sgenerate's job.- For MkDocs Material: Generate standard
mkdocs.yml, configure Neo-Brutalist CSS tokens (extra.css), configure Arabic/English i18n (*.ar.mdsuffix), and build cleanly withmkdocs build --strict. - For Docsify: Include
alias: { '/.*/_sidebar.md': '/_sidebar.md' }and root-relative leading slashes/in_sidebar.mdto guarantee persistent sidebar navigation across all subfolder routes.
- For MkDocs Material: Generate standard
- Standalone. This skill does not read or depend on any other
tidyfactor-*skill's conventions, even when the project happens to be built on one of those tracks. - Zero Sensitive Data Leakage. Under absolutely no circumstances should any real sensitive data (e.g., real API tokens, WHM/cPanel passwords, production server IPs, real DB credentials, secret keys, private auth tokens, or local absolute drive paths) be written into documentation. ALWAYS redact and replace these with safe generic placeholders.
- Clean Relative Links Only. Never include local machine filesystem URLs (such as
file:///C:/...,file:c:, or absolute workstation paths) in documentation links or markdown cross-references. All document cross-links must use clean relative markdown paths or standard public web URLs (https://...).
Sequencing
init → collect → generate (repeatable, once per doc target) → site / mkdocs / docsify (optional, once /docs has real content).