Ns add documentation

From Melvynx/saveit.now · View interactive version

Ns add documentation is an AI agent skill from the GitHub repository Melvynx/saveit.now. Add or update NowStack Mobile docs in docs/. Use when documenting architecture, release workflows, Convex/web/mobile patterns, setup, APIs, or tooling — or via `/ns docs`.

How to use this skill

Skill file

Add Documentation — NowStack Mobile

<objective>

Write or update repository docs in docs/, in this repo's house style: plain Markdown, grounded in real files and commands. This is NOT the public MDX docs tree from NowStack SaaS — no /docs/[slug] route, no MDX components.

</objective>

<workflow>

  1. See what already exists (never assume — the doc set changes):

```bash

ls docs/ docs/templates/

```

Update an existing doc if one already covers the topic; only create a new file when nothing fits.

  1. Scope it before writing. Answer:
  1. Create from the template so frontmatter and structure stay consistent:

```bash

.agents/skills/ns-add-documentation/scripts/create-doc.sh <filename> "<title>" "<description>"

# e.g. create-doc.sh web-app-routing "Web App Routing" "TanStack Start route conventions"

```

Writes docs/<filename>.md from templates/doc-template.md.

  1. Fill it in — replace every TODO with real paths, exact steps, and real verification commands.
  1. Make it discoverable — link the new doc where a reader would look for it (a sibling doc, or the relevant .agents/rules/*.md / AGENTS.md entry). An unlinked doc is a doc nobody finds.
  1. Verify the commands you wrote actually run (see below), then report the path.

</workflow>

<structure>

---
title: "Feature Or Workflow"
description: "One sentence explaining the doc"
---

# Feature Or Workflow

## Purpose
What this solves and when it applies.

## Relevant Files
- `path/to/real/file`

## Workflow
1. Exact step.

## Verification
Commands or manual checks that prove it works.

## Notes
Caveats, secrets to keep out of git, release constraints.

Deeper conventions: references/documentation-format.md.

</structure>

<rules>

</rules>

<verification>

Run only the checks matching the doc's surface:

npx convex dev --once               # Convex docs compile against the schema
cd web-app && npm run typecheck     # web docs
cd web-app && npm run build
cd mobile-app && npx tsc --noEmit   # mobile docs
cd mobile-app && npm run lint
cd mobile-app && npm run screenshots:store   # store/screenshot docs

</verification>

<success_criteria>

</success_criteria>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.