Get the FREE Ultimate OpenClaw Setup Guide →

mags-docs-create

Scanned
npx machina-cli add skill doancan/mags/mags-docs-create --openclaw
Files (1)
SKILL.md
1.1 KB

MAGS Docs Create

Create a new document from a predefined template.

Usage

/mags-docs-create <template>

Available Templates

TemplateFilePurpose
adrdocs/adr/NNN-<title>.mdArchitecture Decision Record
moduledocs/modules/<name>.mdModule documentation
ruledocs/rules/<name>.mdCoding/process rule
guidedocs/guides/<name>.mdHow-to guide
apidocs/api/<name>.mdAPI endpoint documentation

Steps

  1. Parse the template name from the argument.
  2. If the template name is not recognized, list the available templates and stop.
  3. Ask the user for the document title/name.
  4. Call mags_create_doc with the appropriate path and template content.
  5. 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

  1. Step 1: Run /mags-docs-create <template>
  2. Step 2: Provide the document title when prompted
  3. 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
Sponsor this space

Reach thousands of developers