mags-docs-create
Scannednpx machina-cli add skill doancan/mags/mags-docs-create --openclawFiles (1)
SKILL.md
1.1 KB
MAGS Docs Create
Create a new document from a predefined template.
Usage
/mags-docs-create <template>
Available Templates
| Template | File | Purpose |
|---|---|---|
adr | docs/adr/NNN-<title>.md | Architecture Decision Record |
module | docs/modules/<name>.md | Module documentation |
rule | docs/rules/<name>.md | Coding/process rule |
guide | docs/guides/<name>.md | How-to guide |
api | docs/api/<name>.md | API endpoint documentation |
Steps
- Parse the template name from the argument.
- If the template name is not recognized, list the available templates and stop.
- Ask the user for the document title/name.
- Call
mags_create_docwith the appropriate path and template content. - Confirm: "Created
<path>. Edit it to fill in the details, or describe what it should contain and I will draft it."
Source
git clone https://github.com/doancan/mags/blob/main/skills/mags-docs-create/SKILL.mdView on GitHub Overview
Create a new document from a predefined template to ensure consistency across project docs. Supported templates include adr, module, rule, guide, and api, generating the correct path and prompting for a title. After creation, you get a confirmation to edit and fill in details.
How This Skill Works
You invoke the skill with a template name. It validates the template, listing available options if unrecognized. It then asks for the document title, builds the proper docs/ path, calls mags_create_doc with the relevant template content, and returns a confirmation with the created path.
When to Use It
- Start a new Architecture Decision Record (ADR) using the adr template.
- Create module documentation with the module template.
- Add a coding/process rule using the rule template.
- Draft a how-to guide with the guide template.
- Document an API endpoint with the api template.
Quick Start
- Step 1: Run /mags-docs-create <template>
- Step 2: Provide the document title when prompted
- Step 3: The tool creates the file and returns "Created <path>..."
Best Practices
- Provide a precise document title to generate a clear filename.
- Verify the chosen template matches the intended document type.
- If unsure, ask for a list of available templates before proceeding.
- Use the generated path as the base to fill in structured details.
- Review the created file path to ensure correct placement under docs/.
Example Use Cases
- Create ADR for a new database choice using adr template.
- Generate module doc for a feature named 'AuthModule' using module template.
- Draft a coding rule document for 'linting-enforcement' with rule template.
- Produce a how-to guide titled 'Deploying to Production' with guide template.
- Document a REST endpoint '/api/v1/users' using api template.
Frequently Asked Questions
Add this skill to your agents