cortex-compiler

cortex-compiler is a skill for Claude Code, Codex, Cursor from synpulse8-opensource/pulse8-ai-cortex-knowledge-vault. It costs 39 tokens per session (555 once invoked), scanned A, original, Apache-2.0.

A pipeline that turns raw files into Markdown wiki pages, then builds a graph and search index from them. It also provides ways to add files and start or check compilation jobs.

In plain words
What is it for?
Use it to ingest files or uploaded content, compile one file or many files from a directory, run bulk jobs with limited concurrency, preview a bulk run, and check compilation status.
Why use it?
It helps avoid compiling files one by one and repeating work that has already succeeded. Manifests record completed files, skips, and failures so later runs can focus on pending work.

Skill for Claude CodeCodexCursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault/cortex-compiler
Any agent
npx skills add synpulse8-opensource/pulse8-ai-cortex-knowledge-vault --skill cortex-compiler
Clone the repo
git clone --depth 1 https://github.com/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault

Made for: Claude Code, Codex, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex-compiler

README.md
[![agentmods](https://agentmods.dev/badge/skills/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault/cortex-compiler.svg)](https://agentmods.dev/skills/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault/cortex-compiler)
Your own site
<a href="https://agentmods.dev/skills/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault/cortex-compiler"><img src="https://agentmods.dev/badge/skills/synpulse8-opensource/pulse8-ai-cortex-knowledge-vault/cortex-compiler.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00555
Opus 5 $0.00019 $0.00278
Sonnet 5 $0.00008 $0.00111
Haiku 4.5 $0.00004 $0.00056

Measured 4d ago against content hash 6b79030ede72, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cortex-compiler scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/cortex-compiler/SKILL.md · 71 lines

What it actually says

Cortex compiler

Pipeline overview

raw/  →  Compiler (LLM)  →  wiki/*.md  →  graph + QMD index

Key modules

Module Role
cortex/compiler/compiler.py Single-file compile
cortex/compiler/bulk.py Recursive directory scan, concurrency, manifests
cortex/compiler/prompts.py LLM prompts
cortex/mcp/tools.py vault_ingest, vault_compile

Manifests (under .cortex/)

  • ingest-manifest.json — SHA-256 of successfully compiled raw files (skip on re-run unless force)
  • ingest-skip-manifest.json — failures and skips

REST endpoints

Endpoint Behavior
POST /api/v1/ingest JSON content → raw/
POST /api/v1/ingest/upload Multipart upload
POST /api/v1/compile Async compile all pending (202)
GET /api/v1/compile/status Job status
POST /api/v1/bulk-ingest Scan source_dir on server filesystem

Bulk ingest body

{
  "source_dir": "/ingest",
  "concurrency": 4,
  "force": false,
  "dry_run": false
}

Logs (cortex.compiler.bulk): Scanning source directory, per-file progress. Also logged from cortex.api.routes on request receipt.

Recursive scan: source_dir is walked recursively; subfolder structure is preserved under the vault raw dir (e.g. source_dir/abcde/a.html{VAULT_RAW_DIR}/abcde/a.html).

Common failure: source_dir not mounted in container → 400 before bulk runs.

MCP

  • vault_ingest — write bytes to raw/
  • vault_compile — trigger compile pass

Config

LLM provider settings in cortex/config.py (model, API keys via env). See .env.example.

  • Vault layout: cortex-vault
  • Deploy /ingest mount: cortex-deploy
  • API details: cortex-api
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 71 lines · 39 tokens per session scan A 6b79030ede72

Subscribe to this mod's changes

cortex-compiler is a skill published in the GitHub repository synpulse8-opensource/pulse8-ai-cortex-knowledge-vault (14 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 555 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-wiki-ingest

Ingest a newly provided raw source into the LLM Wiki OKF bundle. Use whenever the operator asks to add a source to the wiki, process a file under raw/sources or raw/assets, summarize and file an article/paper/transcript, or mentions ingestion, importing sources, or updating the wiki from a document.

TrueHOOHA/LLM-Wiki · 72 tokens

tdoc_orchestrator

"文档创作与美化的统一编排入口(本地通道)。当用户意图涉及文档写作或排版美化时调用。职责:识别意图 → 编排 stage 能力链(S1 创作 / S2 美化 / S3 HTML→DOCX 转换)→ 委派 generateword/generateword/generateword 执行;S3 产出 .docx 后强制 系统下载卡片(自动生成) 打开预览,本 skill 调用结束。⚠️ 文档编辑不在本 skill 内承接,由 tencent-docs-routing skill 处理。不适用:纯代码文件、非文档类操作。".

crane-in-clear-sky/WorkWit-AI-Agent · 163 tokens

doc_typeset

| 消费 design tokens + 文档内容,输出排版美化的 HTML。 内置 7 种垂类模板(合同/学术论文/公文/商务报告/会议纪要/研报/年报)和 4 个装饰组件,所有样式通过 CSS 变量引用 Token,禁止裸值。 在 generateword 流水线中每当需要将文本内容转化为结构化美化 HTML 时,必须使用此 skill; 不要自己写 HTML 或内联 CSS——doc-typeset 是内容→HTML 的唯一标准转换路径。.

crane-in-clear-sky/WorkWit-AI-Agent · 127 tokens

html_to_docx

| 将 HTML 字符串或文件高保真转换为 Microsoft Word (.docx) 文档。 支持 CSS 变量预处理、10+ 种 HTML 元素精确映射、14 种 CSS 属性映射、中文字体、4 种装饰组件、TOC 目录、页眉页脚、图片嵌入。 提供 CLI(subprocess)和 Python API 双模式调用;在需要将 HTML 文档转为可编辑 Word 文件时使用此 skill。.

crane-in-clear-sky/WorkWit-AI-Agent · 110 tokens

format_extract

> 把 .docx 文档转为语义化 HTML + 提取内嵌图片(标题层级、表格样式、段落缩进、字体颜色等结构信息),供调用方做后续格式分析;也可独立评估 HTML 转换质量。适用场景(技术性底层调用):"docx 转 HTML"、"提取 docx 结构为 HTML"、"HTML 转换质量评估"。本 Skill 是底层格式提取工具,不自行判断是否应被触发、不猜测输出位置——是否调用、何时调用、产物落在哪一律由上层调用方(如 generateword)决定,调用时必须显式传入 --output-dir。用户关于"文档排版 / 套模板 / 参考这份 docx 生成"等需求,应由 orchestrator 统一编排入口接管,不要旁路直点本…

crane-in-clear-sky/WorkWit-AI-Agent · 217 tokens

library

当要写/整理在线文档、建数据表增删改查、导入 CSV·Excel、做看板/dashboard/运营页/汇报页、md 转网页或演示 HTML 发布、建目录、上传下载网盘文件、审阅修订、分享协作,以及提到资料库/知识库/网盘/空间/workbuddy.cn/space 链接时使用。资料库是 WorkBuddy 原生的内容管理、分享协作与轻发布模块,覆盖在线文档(doc)、网页链接(link)、结构化数据表(database)、数据/汇报页面(page)、网盘文件(drive)与空间管理(manage);凡说资料库/知识库或出现 space 链接、未显式点名腾讯文档/飞书/Notion/乐享/金山文档/iWiki 等外部产品时一律走本…

crane-in-clear-sky/WorkWit-AI-Agent · 207 tokens