
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
opencode-knowledge
Advanced tools

An OpenCode plugin that dynamically loads knowledge from your vault on-demand. Add any content you want, the AI figures out what to load using tags and descriptions.
Organize coding standards, patterns, and best practices in markdown files with frontmatter metadata.
Tag-based search finds relevant packages. The AI uses tags and descriptions to discover the right context.
Automatically indexes your vault on session start and tracks loaded packages.
Add the plugin to your OpenCode config:
Global config (~/.config/opencode/opencode.json or opencode.jsonc):
{
"plugin": ["opencode-knowledge"]
}
Or per-project (opencode.json or opencode.jsonc in your project root):
{
"plugin": ["opencode-knowledge"]
}
Create the vault directory structure:
mkdir -p .opencode/knowledge/vault/standards
Create .opencode/knowledge/vault/standards/code-conventions.md:
---
tags:
- standards
- typescript
- conventions
description: Core code conventions and style guide
category: standards
---
# Code Conventions
## Naming
- Use camelCase for variables and functions
- Use PascalCase for classes and types
## Formatting
- Use single quotes for strings
- Line width: 100 characters
- Always use semicolons
The knowledge catalog is automatically built on session start. Just start a new session and the plugin will:
Knowledge packages are markdown files with YAML frontmatter:
---
tags:
- tag1
- tag2
- tag3
description: Brief description of this package
category: category-name
required_knowledge:
- other-package-1
- other-package-2
file_patterns:
- '*.tsx'
- '*.test.ts'
---
# Package Title
Your knowledge content here...
| Field | Required | Description |
|---|---|---|
tags | Yes | Array of searchable tags |
description | Yes | Brief summary (used in search results) |
category | Yes | Category for organization (e.g., frontend, backend, standards) |
required_knowledge | No | Other packages that should be loaded automatically before this one (supports recursive dependencies) |
file_patterns | No | File patterns where this knowledge applies (not yet implemented) |
The required_knowledge field enables automatic dependency loading. When you load a package, the plugin automatically loads all its dependencies first, recursively.
Example:
## <!-- vault/personal/blog-writing.md -->
tags: [blog, writing]
description: Blog writing guidelines
category: personal
required_knowledge:
- personal/author-context
---
When AI loads personal/blog-writing.md, the plugin:
required_knowledge dependencypersonal/author-context.md firstpersonal/blog-writing.mdThis ensures the AI always has complete context without manual tracking. Dependencies can be nested (Package A requires B, B requires C), and the plugin handles circular dependencies gracefully.
your-project/
└── .opencode/
└── knowledge/
├── knowledge.json
├── vault/
│ ├── frontend/
│ │ ├── react-patterns.md
│ │ └── state-management.md
│ ├── backend/
│ │ └── api-design.md
│ └── standards/
│ ├── code-conventions.md
│ └── testing-guide.md
└── tracker/
├── session-state.jsonl
└── knowledge-reads.jsonl
mise run build
Or directly with Bun:
bun build ./src/index.ts --outdir dist --target bun
mise run lint # Check for issues
mise run lint:fix # Auto-fix issues
mise run format
Contributions welcome! Please:
AGENTS.mdmise run lint before committingSpecial thanks to @canyavall for being the creative mind that came up with the idea and initial working solution. He continues to improve this in the shadows to this day.
MIT License. See the LICENSE file for details.
FAQs
An OpenCode plugin
The npm package opencode-knowledge receives a total of 25 weekly downloads. As such, opencode-knowledge popularity was classified as not popular.
We found that opencode-knowledge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.