Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
fix: resolve dashboard skill placeholders
MERChallengefddd5c88f937
diff --git a/tests/skill/understand/test_skill_security_snippets.test.mjs b/tests/skill/understand/test_skill_security_snippets.test.mjsindex 68a58df2..5f95f40b 100644--- a/tests/skill/understand/test_skill_security_snippets.test.mjs+++ b/tests/skill/understand/test_skill_security_snippets.test.mjs@@ -42,8 +42,18 @@ describe('skill command hardening', () => {it('quotes dashboard cd targets and GRAPH_DIR assignment', () => {const content = readRepoFile('understand-anything-plugin/skills/understand-dashboard/SKILL.md');+ expect(content).not.toMatch(/<(?:dashboard-dir|plugin-root|project-dir)>/);expect(content).not.toMatch(/\bcd <(?:dashboard-dir|plugin-root)>/);expect(content).not.toMatch(/GRAPH_DIR=<project-dir>/);+ expect(content).toMatch(/PROJECT_DIR=\$\(pwd -P\)/);+ expect(content).toMatch(/UA_DIR="\$PROJECT_DIR\/\.understand-anything"/);+ expect(content).toMatch(/\[ ! -f "\$UA_DIR\/knowledge-graph\.json" \]/);+ expect(content).toMatch(/DASHBOARD_DIR="\$PLUGIN_ROOT\/packages\/dashboard"/);+ expect(content).toMatch(/: "\$\{PLUGIN_ROOT:\?Run step 3 first so PLUGIN_ROOT is set\}"/);+ expect(content).toMatch(/: "\$\{PROJECT_DIR:\?Run step 1 first so PROJECT_DIR is set\}"/);+ expect(content).toMatch(/: "\$\{DASHBOARD_DIR:\?Run step 4 first so DASHBOARD_DIR is set\}"/);+ expect(content).toMatch(/cd "\$PLUGIN_ROOT" && pnpm --filter @understand-anything\/core build/);+ expect(content).toMatch(/cd "\$DASHBOARD_DIR" && GRAPH_DIR="\$PROJECT_DIR" npx vite/);});it('marks project-controlled context as untrusted data', () => {diff --git a/understand-anything-plugin/skills/understand-dashboard/SKILL.md b/understand-anything-plugin/skills/understand-dashboard/SKILL.mdindex 3aa8398f..73437e6f 100644--- a/understand-anything-plugin/skills/understand-dashboard/SKILL.md+++ b/understand-anything-plugin/skills/understand-dashboard/SKILL.md@@ -10,15 +10,45 @@ Start the Understand Anything dashboard to visualize the knowledge graph for the## Instructions-1. Determine the project directory:+1. Determine the project directory and data directory:- If `$ARGUMENTS` contains a path, use that as the project directory- Otherwise, use the current working directory+ - Prefer the legacy `.understand-anything/` data directory when it exists, otherwise use `.ua/`-2. **Resolve the data directory `$UA_DIR`.** Within the project directory, run `UA_DIR="<project-dir>/$([ -d "<project-dir>/.understand-anything" ] && echo .understand-anything || echo .ua)"` — this selects the legacy `.understand-anything/` when it already exists, otherwise the new `.ua/`. Check that `$UA_DIR/knowledge-graph.json` exists in the project directory. If not, tell the user:+ Use the Bash tool to resolve:+ ```bash+ PROJECT_ARG="$ARGUMENTS"+ if [ -n "$PROJECT_ARG" ]; then+ PROJECT_DIR=$(cd "$PROJECT_ARG" 2>/dev/null && pwd -P)+ else+ PROJECT_DIR=$(pwd -P)+ fi++ if [ -z "$PROJECT_DIR" ] || [ ! -d "$PROJECT_DIR" ]; then+ echo "Error: Project directory not found: ${PROJECT_ARG:-$PWD}"+ exit 1+ fi++ if [ -d "$PROJECT_DIR/.understand-anything" ]; then+ UA_DIR="$PROJECT_DIR/.understand-anything"+ else+ UA_DIR="$PROJECT_DIR/.ua"+ fi+ ```++2. Check that `$UA_DIR/knowledge-graph.json` exists in the project directory. If not, tell the user:```No knowledge graph found. Run /understand first to analyze this project.```+ Use the Bash tool to check:+ ```bash+ if [ ! -f "$UA_DIR/knowledge-graph.json" ]; then+ echo "No knowledge graph found. Run /understand first to analyze this project."+ exit 1+ fi+ ```+3. Find the dashboard code. The dashboard is at `packages/dashboard/` relative to this plugin's root directory. Check these paths in order and use the first that exists:- `${CLAUDE_PLUGIN_ROOT}/packages/dashboard/` (Claude Code runtime root, highest priority)- `~/.understand-anything-plugin/packages/dashboard/` (universal symlink, all installs)@@ -66,20 +96,27 @@ Start the Understand Anything dashboard to visualize the knowledge graph for theecho "Make sure you followed the installation instructions for your platform."exit 1fi++ DASHBOARD_DIR="$PLUGIN_ROOT/packages/dashboard"```4. Install dependencies and build if needed:```bash- cd "<dashboard-dir>" && (pnpm install --frozen-lockfile 2>/dev/null || pnpm install)+ : "${PLUGIN_ROOT:?Run step 3 first so PLUGIN_ROOT is set}"+ DASHBOARD_DIR="${DASHBOARD_DIR:-$PLUGIN_ROOT/packages/dashboard}"+ cd "$DASHBOARD_DIR" && (pnpm install --frozen-lockfile 2>/dev/null || pnpm install)```Then ensure the core package is built (the dashboard depends on it):```bash- cd "<plugin-root>" && pnpm --filter @understand-anything/core build+ : "${PLUGIN_ROOT:?Run step 3 first so PLUGIN_ROOT is set}"+ cd "$PLUGIN_ROOT" && pnpm --filter @understand-anything/core build```5. Start the Vite dev server pointing at the project's knowledge graph:```bash- cd "<dashboard-dir>" && GRAPH_DIR="<project-dir>" npx vite --host 127.0.0.1+ : "${PROJECT_DIR:?Run step 1 first so PROJECT_DIR is set}"+ : "${DASHBOARD_DIR:?Run step 4 first so DASHBOARD_DIR is set}"+ cd "$DASHBOARD_DIR" && GRAPH_DIR="$PROJECT_DIR" npx vite --host 127.0.0.1```Run this in the background so the user can continue working.