| name | edit-ninja-tables-doc |
| description | Edit the CONTENT of an EXISTING Ninja Tables documentation page in place (same slug, same file location) while preserving every site convention. Handles wording changes, new/removed sections, updated steps, and swapped or added screenshots. USE FOR: edit the X doc, update the wording on, add a section to, rewrite this page, fix the screenshot in, this doc is out of date, correct an error in the doc, expand the X guide. DO NOT USE FOR: creating a new page (use write-ninja-tables-doc), renaming the slug / moving to another category / deleting / reordering the sidebar (use restructure-ninja-tables-docs), site-wide audits (use audit-ninja-tables-docs), or deciding whether a feature is documented at all (use check-ninja-tables-feature-coverage). |
| license | MIT |
| compatibility | VitePress repo using guide/<category>/<slug>.md layout with a hand-maintained nested sidebar inline in .vitepress/config.mts. Requires Node + npm to run docs:build. |
| metadata | {"project":"ninja-table-docs","canonical-rules":"CLAUDE.md"} |
Edit a Ninja Tables Doc
Modify an existing page in place. The slug, file path, and sidebar link stay the same.
Canonical conventions live in CLAUDE.md — this skill is the procedure for safe edits.
Agent Behavior Rules
- DO locate the exact file before editing and confirm it with the user.
- DO preserve all conventions on every edit: absolute
/guide/<category>/<slug> links (no
.md, no relative form), **term** bold (no inner spaces), no support boilerplate, "(Pro)"
markers for Pro features.
- DO keep the frontmatter
title/H1 in sync — if the display title changes, update both,
and update the matching sidebar text in .vitepress/config.mts (the link/slug stays the
same).
- DO put any new/replacement images consistently with however this page already handles
images (external
ninjatables.com URL vs. local guide/public/images/<category>/<slug>/).
- DO end on a green
npm run docs:build.
- DO NOT change the slug, rename, or move the file — that is restructure work.
- DO NOT introduce relative links or links with a
.md suffix.
- DO NOT add closing support boilerplate.
- DO NOT touch unrelated docs.
- DO before editing, confirm exactly which section(s) of the page need to change and match
the surrounding tone/heading level rather than restructuring the whole page.
Phase 1: Setup (Interactive)
1.1 Target page
Which doc? (title, slug, or URL)
Resolve to a file: find guide -name '<slug>.md'. If ambiguous or not found, ask. Record
TARGET_PATH, SLUG, CATEGORY.
1.2 The change
What should change? (new wording, add/remove a section, update steps, swap image…)
Record as CHANGE.
1.3 Images & title
Does this change involve images? and Does the page title (H1/frontmatter) change?
Record TOUCHES_IMAGES and TITLE_CHANGES.
1.4 Confirm
| Parameter | Value |
|---|
| File | ... |
| Change | ... |
| Touches images | ... |
| Title changes | ... |
Wait for confirmation.
Phase 2: Context
- Read
TARGET_PATH fully.
- Read
CLAUDE.md for conventions.
- If
TITLE_CHANGES: read .vitepress/config.mts and find the sidebar entry whose link is
/guide/<CATEGORY>/<SLUG> (its text must be updated to match the new title).
- If this page documents a plugin feature, check whether
.claude/skills/check-ninja-tables-feature-coverage/references/index.md has a chunk pointing
at it — update the chunk's source_version/caveat too if the edit changes those facts.
Phase 3: Procedure
1. EDIT - Apply CHANGE to TARGET_PATH using Edit.
Enforce conventions on touched lines: absolute links, **term** bold,
"(Pro)" markers, no boilerplate.
2. IMAGES - If TOUCHES_IMAGES: add/replace files consistent with this page's existing
pattern (external URL or guide/public/images/<CATEGORY>/<SLUG>/) and update the
 refs. Remove image refs whose files you deleted.
3. SIDEBAR - If TITLE_CHANGES: update the matching entry's "text" in .vitepress/config.mts.
Do NOT change its "link". Keep valid TypeScript.
4. BUILD - npm run docs:build ; fix warnings; rebuild until clean.
Phase 4: Verify & Report
Report:
- File edited:
TARGET_PATH
- Summary of what changed
- Images touched? (added/replaced/removed)
- Sidebar
text updated? (yes/no — link unchanged)
- Build: pass / fail
Quick Reference
Locate
File by slug: find guide -name '<slug>.md'
Sidebar entry: grep -n "'/guide/<category>/<slug>'" .vitepress/config.mts
Image folder: guide/public/images/<category>/<slug>/
Formats (unchanged from site rules)
Cross-link: [Text](/guide/<category>/<slug>) (never .md, never relative)
Image ref:  (if using local images)
Bold: **term** (no inner spaces)
Key Principles
- In place only — same slug, same path, same sidebar link.
- Conventions survive edits — don't regress links/bold/boilerplate.
- Title change ⇒ sidebar text change (link stays).
- Match this page's existing image pattern rather than introducing a new one.
- Green build or it's not done.