- Added new
install-skillCLI command to easily install the bundledknowledge-builderskill directly into an agent's skills directory. - Enabled
install-skillto automatically default to the current working directory (.) if no path argument is provided. - Added comprehensive integration tests in
tests/cli.test.tsto verify programmatic copying and overwriting of bundled skills.
- Migrated MCP server setup from the deprecated
Serverto the recommendedMcpServerAPI (@modelcontextprotocol/sdk/server/mcp.js). - Migrated tool registrations from manual
setRequestHandler+ListToolsRequestSchema/CallToolRequestSchematoserver.registerTool. - Replaced plain JSON Schema objects with Zod-based type-safe input schemas (
z.object()) for all tools — enables automatic argument validation by the SDK. - Added
zodas a runtime dependency.
- Fixed
run_workflowinputsparameter type: changed fromstring(requiring manualJSON.stringifyby the caller) toobject(z.record(z.string(), z.string())), matching MCP conventions. UpdatedtoolRunWorkflowto acceptunknownand coerce values to string instead of callingJSON.parse. - Fixed
list_docstool description which had been incorrectly set to a context-gatherer agent description unrelated to the tool's purpose.
- Added MCP server
instructionsfield with guidance on when and how to use each tool, recommended call order (search_docs→get_manifest→get_doc/get_doc_section/get_resource→run_workflow), and the two knowledge formats. - Improved all tool descriptions with usage guidance, cross-tool hints, and path format examples:
search_docs: clarified it should be called first before any task; documented scoring order.get_doc: added hint to preferget_doc_sectionfor large documents.get_doc_section: noted context efficiency and partial heading match support.get_resource: added "useget_manifestfirst to discover paths" and path format example.get_manifest: added "always call beforerun_workflow" guidance.run_workflow: noted side effects (file creation, script execution).
- Improved all tool parameter descriptions with path format clarifications (relative to knowledge directory root) and concrete examples.
- Fixed path traversal vulnerability in
get_doc,get_manifest, andrun_workflow— all tool inputs are now validated to stay inside the knowledge directory - Fixed command injection in workflow
runsteps — replacedexecSyncstring concatenation withspawnSyncarray args (shell is never invoked) - Fixed command injection in CLI git operations (
add,update) — replacedexecSyncstring interpolation withspawnSyncarray args - Fixed PowerShell command injection in
exporton Windows — single quotes in paths are now escaped with'' - Fixed symlink traversal in
get_resource,get_doc,get_manifest,run_workflow—realpathSyncis used to resolve symlinks before boundary check, and the resolved canonical path is returned to callers - Fixed script path traversal in workflow
runsteps — script path is validated to stay inside the knowledge unit folder before execution - Fixed missing cleanup of temporary clone directory on
addfailure - Added interpreter whitelist for workflow scripts (
python,python3,node,pwsh,powershell,bash,sh)
walkDirin both MCP server and CLI now skips.git,.cache, andnode_modulesdirectories
- Frontmatter parsing in MCP server now uses
\r?\nsplit for consistent behavior on Windows (CRLF line endings)
- Added
repository,homepage, andbugsfields topackage.jsonfor npm registry display
Initial release of Knowledge Shelf — a personal knowledge management system for AI coding assistants, built as an MCP server.
Give your AI on-demand access to your local knowledge base through 7 tools:
list_docs— Discover all available knowledge units and documentssearch_docs— Find relevant knowledge by keyword with relevance scoringget_doc— Read the main documentation of a knowledge unitget_doc_section— Read a specific section without loading the full documentget_resource— Read code files, templates, and configs from a unitget_manifest— Inspect what a unit contains (modules, workflows, references)run_workflow— Execute multi-step automation (scaffold, copy files, run scripts)
Knowledge formats supported:
- Manifest-based units — folders with
manifest.jsonfor code patterns, templates, and workflows (supports modules, scripts, references, placeholders) - Standalone
.mddocuments — plain markdown files with optional YAML frontmatter (description,tags,aliases)
Search scoring: aliases (12) → title (10) → tags (8) → type (7) → modules/filename (6) → sections (4) → description (2)
Security: Path traversal protection on get_resource
Default knowledge directory: ~/.knowledge
Manage knowledge sources from git repositories — like npm for documentation.
init— Initialize knowledge directory with.gitignoreand registryadd— Clone from git repos; supports--path,--name,--all, and sparse checkoutlist— Show installed sources with origin and versioninfo— Detailed view of a knowledge unit (type, modules, size, source)search— CLI keyword search using the same scoring as the MCP toolvalidate— Check manifest integrity (required fields, file references, workflow JSON)update— Pull latest from remotes (respects pinned sources)pin/unpin— Version locking to prevent unwanted updatesexport— Package a unit as.zipor.tar.gzfor sharingremove— Delete a knowledge unit and its registry entry
Directory resolution order: --dir flag → KNOWLEDGE_DIR env → walk-up .registry.json → ~/.knowledge
knowledge-builder— AI-assisted skill for scaffolding new knowledge units, generating reference docs from source code, converting loose docs into manifest-based units, and validating structure
docs/cli-reference.md— Full CLI command reference (11 commands, options, exit codes)docs/tools-reference.md— MCP tool parameters, responses, and examplesdocs/knowledge-folder-guide.md— How to organize knowledge directories and write manifestsdocs/publishing-knowledge.md— Git repo layouts for team sharing