Persistent memory and security system for AI agents. Stores memories with semantic search, knowledge graphs, and decay. Scans agent inputs/outputs for prompt...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install shieldcortex或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install shieldcortex⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/shieldcortex/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: shieldcortex description: > Persistent memory and security system for AI agents (ShieldCortex product). Use when: developing ShieldCortex features, writing ShieldCortex content/blogs, managing the ShieldCortex npm package or ClawHub skill, or answering questions about ShieldCortex capabilities. Covers memory persistence, semantic search, knowledge graphs, and the 6-layer security pipeline. Do NOT use when: the task is about OpenClaw's built-in memory search, general security auditing (use iron-dome), or unrelated products. ---
Give your AI agent a brain that persists between sessions — and protect it from memory poisoning attacks.
ShieldCortex is a complete memory system with built-in security. It gives AI agents persistent, intelligent memory with semantic search, knowledge graphs, decay-based forgetting, and contradiction detection. Every memory write passes through a 6-layer defence pipeline that blocks prompt injection, credential leaks, and poisoning attacks.
Use when:
Do NOT use when:
npm install -g shieldcortex
For OpenClaw integration (installs the cortex-memory hook):
npx shieldcortex openclaw install
For Claude Code / VS Code / Cursor MCP integration:
npx shieldcortex install
After npx shieldcortex openclaw install, the hook activates on next restart:
# Check status
npx shieldcortex status
# Scan content for threats
npx shieldcortex scan "some text to check"
# Full security audit of your agent environment
npx shieldcortex audit
# Scan all installed skills/instruction files for hidden threats
npx shieldcortex scan-skills
# Scan a single skill file
npx shieldcortex scan-skill ./path/to/SKILL.md
# Build knowledge graph from existing memories
npx shieldcortex graph backfill
# Start the visual dashboard
npx shieldcortex --dashboard
import {
addMemory,
getMemoryById,
runDefencePipeline,
scanSkill,
extractFromMemory,
consolidate,
initDatabase
} from 'shieldcortex';
// Initialize
initDatabase('/path/to/memories.db');
// Add a memory (automatically passes through defence pipeline)
addMemory({
title: 'API uses OAuth2',
content: 'The payment API requires OAuth2 bearer tokens, not API keys',
category: 'architecture',
importance: 'high',
project: 'my-project'
});
// Scan content before processing
const result = runDefencePipeline(untrustedContent, 'Email Import', {
type: 'external',
identifier: 'email-scanner'
});
if (result.allowed) {
// Safe to process
}
// Extract knowledge graph entities
const { entities, triples } = extractFromMemory(
'Database Migration',
'We switched from MySQL to PostgreSQL for the auth service',
'architecture'
);
// entities: [{name: 'MySQL', type: 'service'}, {name: 'PostgreSQL', type: 'service'}, ...]
// triples: [{subject: 'auth service', predicate: 'uses', object: 'PostgreSQL'}, ...]
| Feature | Description | |---------|-------------| | Persistent Storage | SQLite-backed, survives restarts and compaction | | Semantic Search | Find memories by meaning, not just keywords | | Project Scoping | Isolate memories per project/workspace | | Importance Levels | Critical, high, normal, low with auto-decay | | Categories | Architecture, decisions, preferences, context, learnings, errors | | Decay & Forgetting | Old, unaccessed memories fade — like a real brain | | Consolidation | Automatic merging of similar/duplicate memories | | Contradiction Detection | Flags when new memories conflict with existing ones | | Knowledge Graph | Extracts entities and relationships from memories | | Activation Scoring | Recently accessed memories get retrieval priority | | Salience Scoring | Important memories surface first in search |
| Layer | Protection | |-------|-----------| | Input Sanitisation | Strip control characters, null bytes, dangerous formatting | | Pattern Detection | Regex matching for known injection patterns | | Anomaly Scoring | Entropy analysis, behavioural deviation detection | | Credential Leak Detection | Blocks API keys, tokens, private keys (25+ patterns, 11 providers) | | Trust Scoring | Source-based reliability scoring for memory writes | | Audit Trail | Full forensic log of every memory operation | | Skill Scanner | Detect prompt injection in SKILL.md, .cursorrules, CLAUDE.md |
Sync audit data to a team dashboard for cross-project visibility:
npx shieldcortex config set-api-key <your-key>
Free local package is unlimited. Cloud adds team dashboards, audit aggregation, and alerts.
The library exports 70 named functions and types covering defence, memory, knowledge graph, skill scanning, and audit. Full list in the CHANGELOG.
| Feature | Description | |---------|-------------| | Memory Types | user, feedback, project, reference — typed memories with validation | | Staleness Scoring | Age-based decay with warnings on old memories | | LLM-Powered Reranking | Hybrid recall: embedding search + LLM reranker for precision | | Dream Mode | Background memory consolidation (shieldcortex consolidate) — like sleep for AI | | Memory Scopes | private vs team for multi-agent deployments | | Positive Feedback | shieldcortex cortex confirm — learn from success, not just mistakes | | Save Filtering | Blocks saving derivable info (file paths, git refs) |
On-demand security scanning for files, directories, plugins, and npm packages:
# Scan a local file or directory
shieldcortex xray ./path
# Deep scan an npm package (registry + local)
shieldcortex xray some-package --deep
# CI/CD pipeline gate
shieldcortex xray --ci --threshold=HIGH
# Continuous file monitoring
shieldcortex xray --watch
# npm pre-install hook
shieldcortex xray-preinstall
...
安装 ShieldCortex 后,可以对 AI 说这些话来触发它
Help me get started with ShieldCortex
Explains what ShieldCortex does, walks through the setup, and runs a quick demo based on your current project
Use ShieldCortex to persistent memory and security system for AI agents
Invokes ShieldCortex with the right parameters and returns the result directly in the conversation
What can I do with ShieldCortex in my data & analytics workflow?
Lists the top use cases for ShieldCortex, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/shieldcortex/ 目录(个人级,所有项目可用),或 .claude/skills/shieldcortex/(项目级)。重启 AI 客户端后,用 /shieldcortex 主动调用,或让 AI 根据上下文自动发现并使用。
ShieldCortex 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ShieldCortex 可免费安装使用。请查阅仓库了解许可证信息。
Persistent memory and security system for AI agents. Stores memories with semantic search, knowledge graphs, and decay. Scans agent inputs/outputs for prompt...
ShieldCortex 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using ShieldCortex
Identifies repetitive steps in your workflow and sets up ShieldCortex to handle them automatically