skills/add-product-knowledge/SKILL.md
Add a new entry to the product knowledge base. Wizard-guided — prompts for category, title, and content, then writes a structured markdown file and rebuilds the manifest.
npx skillsauth add nexus-a1/claude-skills add-product-knowledgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add a new entry to the product knowledge base used by the product-expert agent.
Use this skill to capture product context mid-conversation — after a requirements session, after debugging a complex domain flow, or when you learn something about the product that should be preserved for future sessions.
The product-expert agent reads all .md files in the configured product-knowledge directory. This skill creates a properly-structured file and updates the manifest so the new entry is immediately searchable.
/add-product-knowledge # Full wizard
/add-product-knowledge Payment Flow # Pre-fill title, wizard for rest
Arguments: $ARGUMENTS
if [ -f "${CLAUDE_PLUGIN_ROOT}/shared/resolve-config.sh" ]; then
source "${CLAUDE_PLUGIN_ROOT}/shared/resolve-config.sh"
elif [ -f "$HOME/.claude/shared/resolve-config.sh" ]; then
source "$HOME/.claude/shared/resolve-config.sh"
else
echo "ERROR: resolve-config.sh not found. Install via marketplace or run ./install.sh" >&2
exit 1
fi
IFS='|' read -r KB_PATH _TYPE <<< "$(resolve_artifact_typed product-knowledge .)"
if [[ ! -d "$KB_PATH" ]]; then
echo "ERROR: Knowledge base directory not found: $KB_PATH" >&2
exit 1
fi
If the location type is git, sync before writing:
if [[ "$_TYPE" == "git" ]]; then
git -C "$KB_PATH" pull --ff-only 2>/dev/null || true
fi
Parse $ARGUMENTS. If non-empty, treat the full string as the initial title suggestion.
If $ARGUMENTS is empty, use AskUserQuestion:
What do you want to document?
(e.g. "Payment Flow Architecture", "Auth Token Lifecycle", "Subscription Tier Rules")
Store as {title}.
List existing categories (subdirectories of $KB_PATH):
find "$KB_PATH" -mindepth 1 -maxdepth 1 -type d -not -name '.*' \
| xargs -I{} basename {} | sort
Use AskUserQuestion with the list as options plus "other":
Category for "{title}":
1. architecture
2. api
3. business-rules
4. data-models
... (existing categories)
N. other (enter a new category name)
Store as {category}. If "other", ask for the new category name.
Use AskUserQuestion:
What should this entry document?
You can:
- Describe it in plain text (I'll structure it)
- Paste existing notes or diagrams
- Say "from conversation" to extract from our current discussion
Store as {raw_content}.
If the user says "from conversation", extract the most relevant product/domain insight from the current conversation context — focus on business rules, architecture patterns, API contracts, data models, or workflow states. Exclude code-level details (those belong to archaeologist).
Based on {category}, produce structured markdown using the appropriate template:
architecture — system components, integration patterns, service boundaries, data flow api — endpoints, request/response shapes, auth requirements, rate limits business-rules — domain logic, validation rules, workflow states, edge cases data-models — entity definitions, field constraints, relationships, lifecycle other — freeform with headings derived from the content
Keep it factual and cite evidence where possible. No speculation. If something is uncertain, mark it *(unverified)*.
# Slugify the title
SLUG=$(echo "{title}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-\|-$//g')
DEST="$KB_PATH/{category}/${SLUG}.md"
Check if the file already exists:
if [[ -f "$DEST" ]]; then
# Show the user what's there and ask: overwrite, rename, or cancel
fi
Write $DEST with this structure:
---
tags: [{derived tags}]
---
# {title}
{structured content}
Tags are inferred from the title and content — use 3–6 short lowercase terms.
Create the category directory if it doesn't exist:
mkdir -p "$KB_PATH/{category}"
Invalidate the manifest so product-expert picks up the new file immediately:
MANIFEST="$KB_PATH/manifest.json"
if [[ -f "$MANIFEST" ]]; then
# Touch last_updated to force product-expert to rebuild on next read
_TMP=$(mktemp) && jq '.last_updated = "1970-01-01T00:00:00Z"' "$MANIFEST" > "$_TMP" \
&& mv "$_TMP" "$MANIFEST"
fi
If $_TYPE == "git":
git -C "$KB_PATH" add "$DEST" "$MANIFEST"
git -C "$KB_PATH" commit -m "docs(product-knowledge): add {title}"
git -C "$KB_PATH" push
✓ Knowledge base entry created
File: {category}/{slug}.md
Title: {title}
Tags: {tags}
Location: $DEST
The product-expert agent will pick this up on the next invocation.
Run /rebuild-index product-knowledge to rebuild the full manifest now.
data-ai
Show all active work sessions across brainstorms, requirements, proposals, and epics. Supports --update to advance lifecycle on one session and --sync to sweep them all.
documentation
Review and update project documentation using an agent team. Inventories docs, identifies gaps and drift, updates technical and API docs in parallel.
tools
Annotate an active work session with a note, scope change, or new finding. Auto-detects the active session, synthesizes the salient points of the current conversation, and appends a timestamped entry to state.json after a single target confirmation. Use mid-session when you learn something that should be preserved.
tools
--- name: troubleshoot category: implementation model: claude-opus-4-7 userInvocable: true description: Systematically troubleshoot a failing feature or error. Discovers code, investigates root cause, applies fix, verifies with tests, and commits. Use when something isn't working as expected. Runs in the current working tree by default — set `worktree.enabled: true` in `.claude/configuration.yml` to isolate work in a git worktree. argument-hint: <error-or-description> allowed-tools: Read, Write,