/inki:inki-pitfalls-add [--non-interactive] [--no-log] <description of the pitfall, or a pitfalls-check / code-verify finding to promote>from inki
Adds a verified entry to the known-pitfalls catalog so future audits catch documentation mistakes automatically. Verifies the correct pattern against the Strapi source before writing.
Ships in inki. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The pitfalls-checker agent is read-only: it consults the catalog but never edits it. This skill is the writing counterpart: it adds a new, verified entry to the known-pitfalls catalog so the mistake is caught automatically in every future review.
The catalog is versioned in the repo at claude-plugins/inki/skills/inki-references/prompts/integrity-known-pitfalls.md (the canonical copy). Agents that load Inki from the repo skills folders (.claude/skills, .agents/skills, .cursor/skills) read that file directly. Only an installed Claude Code plugin reads a separate plugin cache copy (${CLAUDE_PLUGIN_ROOT}/skills/inki-references/prompts/integrity-known-pitfalls.md), overwritten on every plugin update. Always write the canonical copy first, then mirror to the cache if there is one (Step 5): an entry written only to the cache is silently lost on the next update.
If $ARGUMENTS contains --help or -h, print usage and stop, per ../inki-references/help.md. Do not modify the catalog.
Otherwise, from $ARGUMENTS, detect --non-interactive (canonical), aliases --auto-approve, --auto, --yes, -y, --no-questions-asked (all equivalent) → AUTO=true. What remains describes the pitfall: either free text, or a finding copied from a pitfalls-check / code-verify report.
Logging: unless --no-log is passed, write this skill's report to the run log per ../inki-references/logging.md (--log-dir <path> and --short-log are also accepted). This skill normally runs standalone (it creates its own run directory); if ever invoked as part of an orchestrator, write into that run's existing directory instead of creating a new one.
Every catalog entry needs:
Extract these from the input. If any is missing or unclear, ask the user (do not invent the correct pattern).
Do NOT add an unverified pattern: a wrong catalog entry would generate false positives forever. Confirm the "correct pattern" against the actual strapi/strapi source (a local clone if available, otherwise a raw GitHub fetch), the same way code-verify does. If it cannot be verified, say so and stop; offer to add it as a clearly-marked unverified entry only if the user insists.
Read the canonical catalog and pick the matching category table (e.g. "Strapi v5 identifiers", "Lifecycle and boot sequence"). If none fits, create a new category section following the existing format.
Display the exact row to be added, under which category:
Category: <name>
| <hallucinated> | <correct> | <context> |
If AUTO=false (default), ask for confirmation before writing. If AUTO=true, skip the prompt (the source verification in Step 2 is the safety gate).
Write in this order. Never stop after the cache: that is how entries get lost.
Canonical copy (required). Add the row to the chosen table in claude-plugins/inki/skills/inki-references/prompts/integrity-known-pitfalls.md, preserving the file's existing Markdown formatting. Do not reorder or rewrite existing entries.
Resolve an absolute path to it before writing:
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
CANON="$ROOT/claude-plugins/inki/skills/inki-references/prompts/integrity-known-pitfalls.md"
[ -n "$ROOT" ] && [ -f "$CANON" ] && echo "$CANON" || echo "NOT_FOUND"
This works from anywhere inside the repo, including subdirectories such as docusaurus/. If it prints NOT_FOUND (the session is running outside strapi/documentation, or in another repo), do not fall back to writing only the cache: say the canonical copy is unreachable, print the row for the user to add themselves, and stop.
Cache copy (mirror, plugin installs only). If ${CLAUDE_PLUGIN_ROOT} is set and does not point inside this repo, copy the same row into ${CLAUDE_PLUGIN_ROOT}/skills/inki-references/prompts/integrity-known-pitfalls.md so the entry takes effect immediately in the running session, without waiting for a plugin update.
Verify they match (plugin installs only). The two files must be identical afterwards:
diff "$CANON" "${CLAUDE_PLUGIN_ROOT}/skills/inki-references/prompts/integrity-known-pitfalls.md"
If the diff shows entries present in the cache but missing from the canonical copy, those are earlier cache-only additions that were never persisted. Surface them to the user and offer to sync them into the canonical copy in the same pass, re-verifying each against the source per Step 2 before doing so.
Confirm what was added, to which category, and where (canonical copy, plus the plugin cache when there is one). State explicitly that the canonical copy is versioned and needs committing, and that a cache copy is a working mirror overwritten on the next plugin update.
The canonical copy is a tracked file in strapi/documentation, so remind the user to commit it (/inki-commit). Do not commit it as part of an unrelated documentation change unless the user asks.
pitfalls-checker agent stays strictly read-only.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub strapi/documentation --plugin inki25 skills in this plugin
/inki-branchCreate a new branch in strapi/documentation with auto-detected prefix (cms/, cloud/, repo/) based on the files that will be touched./inki-code-verifyVerify code blocks in a documentation file: check syntax, references, and consistency with the underlying Strapi APIs./inki-coherence-checkCheck a documentation file for cross-page coherence: terminology, links, and consistency with related pages./inki-commitStage and commit documentation changes in strapi/documentation. Enforces git-rules.md, protected paths, and branch prefix detection.Other plugins' skills for the same job