← Back to Skills Marketplace
sora-mury

Karpathy Compile

by sune · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
135
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install karpathy-compile
Description
Compile raw wiki entries from Phase 1 into structured, distilled knowledge points using LLM, grouping by topic and saving refined outputs.
README (SKILL.md)

Karpathy Compile Skill - Phase 2

描述

实现 Karpathy LLM Knowledge Base 的第二阶段:Wiki → Knowledge Points 编译。

将 Phase 1 生成的 wiki 条目通过 LLM distillation 编译为结构化的知识精华(knowledge points)。

工作流程

Phase 1: 用户查询 → Wiki 条目 (raw, 多条)
Phase 2: Wiki 条目 → Knowledge Points (精炼, 结构性)
Phase 3: Lint → 去重/合并/更新

Knowledge Point 格式

## Knowledge Point: [主题]

**核心概念**: [一句话概括]
**来源**: [wiki条目来源]
**详细说明**: [LLM生成的详细解释]
**标签**: [tag1, tag2]
**创建时间**: YYYY-MM-DD
**可信度**: high/medium/low

Compile Pipeline

  1. 读取 wiki 文件
  2. 按主题/标签分组
  3. 对每组使用 LLM distillation 生成 knowledge point
  4. 保存到 knowledge-points/ 目录

文件结构

karpathy-compile/
├── SKILL.md
├── scripts/
│   ├── __init__.py      # CompilePipeline
│   ├── distiller.py     # LLM distillation
│   ├── parser.py        # wiki 文件解析
│   └── test_compile.py  # 测试
└── knowledge-points/     # 输出目录

依赖

  • Phase 1 的 wiki 文件
  • M-Flow (用于存储编译后的 knowledge points)
  • Ollama LLM (qwen2.5:14b)
Usage Guidance
This skill appears to do what it says: parse local wiki markdown, distill topics with an LLM, and save knowledge-point markdown files. Before running/installing: 1) ensure you run the distillation only against a trusted LLM endpoint — by default it targets http://localhost:11434 and uses a hardcoded api_key value, so either run a local Ollama-compatible server or update the code to use a secure, authenticated endpoint you control; 2) be cautious running the provided test scripts (test_compile.py/test_e2e.py) because they dynamically import and execute sibling skills (phase1, lint, retrieval) which may perform network access or require credentials; review those other skills first; 3) note the SKILL.md mentions M-Flow though this package doesn't integrate with it—if you expect M-Flow integration, verify or extend the code; 4) consider installing the openai Python package and, if you prefer, modify the code to read API keys from environment variables rather than using a hardcoded string. If you need me to, I can review the other phase skill files (karpathy-query-feedback, karpathy-lint, dual-retrieval) to surface any additional concerns.
Capability Analysis
Type: OpenClaw Skill Name: karpathy-compile Version: 1.0.0 The skill implements a knowledge distillation pipeline (Phase 2) that parses local markdown wiki files and uses a local Ollama LLM instance to generate structured 'knowledge points'. The code in `scripts/__init__.py` and the test scripts (`test_compile.py`, `test_e2e.py`) are well-structured and align with the stated purpose of processing data within a multi-phase pipeline. While the test scripts dynamically load modules from sibling directories using `importlib`, this behavior is consistent with the integrated nature of the Karpathy LLM Knowledge Base project and does not exhibit malicious intent such as data exfiltration or unauthorized remote execution.
Capability Assessment
Purpose & Capability
The name/description (compile wiki → knowledge points) align with the code: parsing wiki markdown, grouping by tags, calling an LLM distiller, and writing markdown outputs. Minor incoherence: SKILL.md mentions M-Flow as a dependency but the included code does not call or integrate with any M-Flow APIs—it only writes local files. The skill also references Ollama/qwen in docs and the code uses an OpenAI-compatible client to a default local endpoint, which is consistent.
Instruction Scope
SKILL.md and the code keep scope to reading Phase 1 wiki files and producing knowledge-points files. Tests in scripts/test_compile.py and scripts/test_e2e.py dynamically load other skills (phase 1, lint, retrieval) from sibling directories; running those tests will execute other skills' code (which may have their own side effects). The compile pipeline itself reads only local knowledge/wiki files and writes to knowledge/knowledge-points.
Install Mechanism
This is instruction-only at install level (no install spec). Files are included in the skill bundle; nothing is downloaded or installed during install. The code does import openai, but there is no install step declared—this is an operational/runtime dependency rather than an install-time risk.
Credentials
The skill declares no required environment variables or credentials, which is consistent with local file I/O. Implementation detail: LLMDistiller hardcodes endpoint='http://localhost:11434/v1' and api_key='ollama' and uses the openai client; this is odd but not directly dangerous. It means the code expects a local Ollama-compatible server by default. If someone changes the endpoint to a remote URL, the pipeline would send wiki content to that endpoint — so users should ensure the LLM endpoint is trusted before running. No requests for unrelated credentials or config paths are present.
Persistence & Privilege
The skill is not always-enabled and is user-invocable; it does not request persistent platform privileges or modify other skills' configs. It writes outputs only to a local knowledge/knowledge-points directory inside the repository tree.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install karpathy-compile
  3. After installation, invoke the skill by name or use /karpathy-compile
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Wiki to Knowledge Points compilation pipeline
Metadata
Slug karpathy-compile
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Karpathy Compile?

Compile raw wiki entries from Phase 1 into structured, distilled knowledge points using LLM, grouping by topic and saving refined outputs. It is an AI Agent Skill for Claude Code / OpenClaw, with 135 downloads so far.

How do I install Karpathy Compile?

Run "/install karpathy-compile" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Karpathy Compile free?

Yes, Karpathy Compile is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Karpathy Compile support?

Karpathy Compile is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Karpathy Compile?

It is built and maintained by sune (@sora-mury); the current version is v1.0.0.

💬 Comments