feat(skills): add neuledge-context skill for @neuledge/context MCP server

Adds a complete cross-cutting skill to install, configure, and manage
@neuledge/context — a local-first MCP server that delivers version-specific
library docs to AI agents via SQLite FTS5.

Includes:
- SKILL.md with 9-step process: install, global MCP registration, per-project
  --libs scoping, package management, auth, custom registry, upgrade, uninstall
- setup-neuledge-context.sh: pinned version install, idempotent version check
- secure-context-config.sh: chmod 600 on ~/.context/config.json after auth
- 13-case test suite covering both scripts (all pass)
- eval.yaml with 6 trigger tests and 4 output tests
- references/: context-cli-reference.md, http-mode.md, install-notes.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TP4EGbBg3XMcyF28Lx78XJ
This commit is contained in:
2026-06-20 23:16:27 +00:00
parent 8f5e4eeaa5
commit 75c6ea1dd5
9 changed files with 850 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
# Sets secure file permissions on ~/.context/config.json.
# Run after every `context auth add` to protect stored credentials.
# Safe to run when the file does not exist yet.
CONFIG="${HOME}/.context/config.json"
if [ ! -f "$CONFIG" ]; then
echo "Skipped: ${CONFIG} does not exist — no permissions to set."
exit 0
fi
chmod 600 "$CONFIG"
echo "Secured: ${CONFIG} set to 600 (owner read/write only)."

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
# Installs @neuledge/context globally at a pinned version.
# Usage: setup-neuledge-context.sh [VERSION]
# VERSION — npm version string (default: 1.2.0)
# Idempotent: skips install if already at the target version.
TARGET_VERSION="${1:-1.2.0}"
current_version() {
context --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo ""
}
CURRENT="$(current_version)"
if [ "$CURRENT" = "$TARGET_VERSION" ]; then
echo "Already at @neuledge/context@${TARGET_VERSION} — nothing to do."
exit 0
fi
if [ -n "$CURRENT" ]; then
echo "Upgrading @neuledge/context from ${CURRENT} to ${TARGET_VERSION}..."
else
echo "Installing @neuledge/context@${TARGET_VERSION}..."
fi
npm install -g "@neuledge/context@${TARGET_VERSION}"
INSTALLED="$(current_version)"
if [ "$INSTALLED" = "$TARGET_VERSION" ]; then
echo "Done: @neuledge/context@${TARGET_VERSION} installed."
else
echo "Error: expected version ${TARGET_VERSION} but got '${INSTALLED}'" >&2
exit 1
fi