mags-docs
npx machina-cli add skill doancan/mags/mags-docs --openclawFiles (1)
SKILL.md
1.2 KB
MAGS Docs
List all indexed project documents.
Usage
/mags-docs
Related Commands
| Command | Purpose |
|---|---|
/mags-docs-create <template> | Create a new document from template |
/mags-docs-validate | Run document validation checks |
/mags-docs-search <query> | Search across all documents |
Steps
- Call
mags_list_docsto get all documents. - Display as a grouped tree:
== Project Documents == architecture/ overview.md Project architecture overview tech-stack.md Technology stack details rules/ coding-standards.md Coding conventions and rules backend.md Backend development rules changelog/ changes.md Running changelog Total: <N> documents - Show the path and a brief description (first line or title) for each doc.
- If no documents are found, say: "No indexed documents found. Run
/mags-initto scan your docs/ directory or scaffold new documents from templates."
Overview
mags-docs retrieves every indexed document and presents them in a clean, grouped tree. It helps teams quickly understand project structure and locate key files like architecture, rules, and changelog. The tool emphasizes the path and a brief description to speed navigation.
How This Skill Works
Internally, mags-docs calls mags_list_docs to fetch all documents, then renders them as a grouped folder view (e.g., architecture/, rules/, changelog/) with each doc’s first line or title. If no documents exist, it shows the standard no-docs message and guidance to run /mags-init to scan or scaffold templates.
When to Use It
- When starting a new project to get a quick index of all documents
- During onboarding to show teammates the project structure
- When auditing or refreshing the documentation set
- When locating a specific document by path quickly
- When validating that the repository has documented work in the indexed folders
Quick Start
- Step 1: Call mags_list_docs to fetch all documents
- Step 2: Render them as a grouped tree, e.g., architecture/overview.md with a brief title
- Step 3: Show each doc's path and first-line description, or display the no-docs message if empty
Best Practices
- Display the grouped tree with path and a concise description for context
- Always show the top-level folder (e.g., architecture/, rules/) to aid navigation
- Keep the index refreshed by re-running mags_list_docs regularly
- Use mags-docs-search for targeted lookup across all documents
- Gracefully handle empty results using the provided no-docs message
Example Use Cases
- Listing architecture/overview.md and architecture/tech-stack.md under Architecture
- Showing rules/coding-standards.md and rules/backend.md under Rules
- Displaying changelog/changes.md in Changelog
- No indexed documents found scenario triggering the no-docs fallback
- Onboarding: sharing the generated project-docs tree with a teammate
Frequently Asked Questions
Add this skill to your agents