Agent 生成器
- 作者仓库星标 983
- 作者更新于 实时读取
- 作者仓库 karpathy-llm-wiki
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @Astro-Han · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: karpathy-llm-wiki
description: Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sour…
category: AI 智能
runtime: 无特殊运行时
---
# karpathy-llm-wiki 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Architecture / Initialization / Ingest”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Architecture / Initialization / Ingest”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Architecture / Initialization / Ingest”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: karpathy-llm-wiki
description: Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sour…
category: AI 智能
source: Astro-Han/karpathy-llm-wiki
---
# karpathy-llm-wiki
## 什么时候使用
- 把AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Architecture / Initialization / Ingest」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "karpathy-llm-wiki" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Architecture / Initialization / Ingest
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Karpathy LLM Wiki
Build and maintain a personal knowledge base using LLMs. You manage two directories: raw/ (immutable source material) and wiki/ (compiled knowledge articles). Sources go into raw/, you compile them into wiki articles, and the wiki compounds over time.
Core ideas from Karpathy:
- "The LLM writes and maintains the wiki; the human reads and asks questions."
- "The wiki is a persistent, compounding artifact."
Architecture
Three layers, all under the user's project root:
raw/ — Immutable source material. You read, never modify. Organized by topic subdirectories (e.g., raw/machine-learning/).
wiki/ — Compiled knowledge articles. You have full ownership. Organized by topic subdirectories, one level only: wiki/<topic>/<article>.md. Contains two special files:
wiki/index.md— Global index. One row per article, grouped by topic, with link + summary + Updated date.wiki/log.md— Append-only operation log.
SKILL.md (this file) — Schema layer. Defines structure and workflow rules.
Templates live in references/ relative to this file. Read them when you need the exact format for raw files, articles, archive pages, or the index.
Initialization
Triggers only on the first Ingest. Check whether raw/ and wiki/ exist. Create only what is missing; never overwrite existing files:
raw/directory (with.gitkeep)wiki/directory (with.gitkeep)wiki/index.md— heading# Knowledge Base Index, empty bodywiki/log.md— heading# Wiki Log, empty body
If Query or Lint cannot find the wiki structure, tell the user: "Run an ingest first to initialize the wiki." Do not auto-create.
Ingest
Fetch a source into raw/, then compile it into wiki/. Always both steps, no exceptions.
Fetch (raw/)
Get the source content using whatever web or file tools your environment provides. If nothing can reach the source, ask the user to paste it directly.
Pick a topic directory. Check existing
raw/subdirectories first; reuse one if the topic is close enough. Create a new subdirectory only for genuinely distinct topics.Save as
raw/<topic>/YYYY-MM-DD-descriptive-slug.md.- Slug from source title, kebab-case, max 60 characters.
- Published date unknown → omit the date prefix from the file name (e.g.,
descriptive-slug.md). The metadata Published field still appears; set it toUnknown. - If a file with the same name already exists, append a numeric suffix (e.g.,
descriptive-slug-2.md). - Include metadata header: source URL, collected date, published date.
- Preserve original text. Clean formatting noise. Do not rewrite opinions.
See
references/raw-template.mdfor the exact format.
Compile (wiki/)
Determine where the new content belongs:
- Same core thesis as existing article → Merge into that article. Add the new source to Sources/Raw. Update affected sections.
- New concept → Create a new article in the most relevant topic directory. Name the file after the concept, not the raw file.
- Spans multiple topics → Place in the most relevant directory. Add See Also cross-references to related articles elsewhere.
These are not mutually exclusive. A single source may warrant merging into one article while also creating a separate article for a distinct concept it introduces. In all cases, check for factual conflicts: if the new source contradicts existing content, annotate the disagreement with source attribution. When merging, note the conflict within the merged article. When the conflicting content lives in separate articles, note it in both and cross-link them.
See references/article-template.md for article format. Key points:
- Sources field: author, organization, or publication name + date, semicolon-separated.
- Raw field: markdown links to raw/ files, semicolon-separated.
- Relative paths from
wiki/<topic>/use../../raw/<topic>/<file>.md(two levels up to project root).
Cascade Updates
After the primary article, check for ripple effects:
- Scan articles in the same topic directory for content affected by the new source.
- Scan
wiki/index.mdentries in other topics for articles covering related concepts. - Update every article whose content is materially affected. Each updated file gets its Updated date refreshed.
Archive pages are never cascade-updated (they are point-in-time snapshots).
Post-Ingest
Update wiki/index.md: add or update entries for every touched article. When adding a new topic section, include a one-line description. The Updated date reflects when the article's knowledge content last changed, not the file system timestamp. See references/index-template.md for format.
Append to wiki/log.md:
## [YYYY-MM-DD] ingest | <primary article title>
- Updated: <cascade-updated article title>
- Updated: <another cascade-updated article title>
Omit - Updated: lines when no cascade updates occur.
Query
Search the wiki and answer questions. Examples of triggers:
- "What do I know about X?"
- "Summarize everything related to Y"
- "Compare A and B based on my wiki"
Steps
- Read
wiki/index.mdto locate relevant articles. - Read those articles and synthesize an answer.
- Prefer wiki content over your own training knowledge. Cite sources with markdown links:
[Article Title](wiki/topic/article.md)(project-root-relative paths for in-conversation citations; within wiki/ files, use paths relative to the current file). - Output the answer in the conversation. Do not write files unless asked.
Archiving
When the user explicitly asks to archive or save the answer to the wiki:
- Write the answer as a new wiki page. See
references/archive-template.md. When converting conversation citations to the archive page, rewrite project-root-relative paths (e.g.,wiki/topic/article.md) to file-relative paths (e.g.,../topic/article.mdorarticle.mdfor same-directory).- Sources: markdown links to the wiki articles cited in the answer.
- No Raw field (content does not come from raw/).
- File name reflects the query topic, e.g.,
transformer-architectures-overview.md. - Place in the most relevant topic directory.
- Always create a new page. Never merge into existing articles (archive content is a synthesized answer, not raw material).
- Update
wiki/index.md. Prefix the Summary with[Archived]. - Append to
wiki/log.md:## [YYYY-MM-DD] query | Archived: <page title>
Lint
Quality checks on the wiki. Two categories with different authority levels.
Deterministic Checks (auto-fix)
Fix these automatically:
Index consistency — compare wiki/index.md against actual wiki/ files (excluding index.md and log.md):
- File exists but missing from index → add entry with
(no summary)placeholder. For Updated, use the article's metadata Updated date if present; otherwise fall back to file's last modified date. - Index entry points to nonexistent file → mark as
[MISSING]in the index. Do not delete the entry; let the user decide.
Internal links — for every markdown link in wiki/ article files (body text and Sources metadata), excluding Raw field links (validated by Raw references below) and excluding index.md/log.md (handled above):
- Target does not exist → search wiki/ for a file with the same name elsewhere.
- Exactly one match → fix the path.
- Zero or multiple matches → report to the user.
Raw references — every link in a Raw field must point to an existing raw/ file:
- Target does not exist → search raw/ for a file with the same name elsewhere.
- Exactly one match → fix the path.
- Zero or multiple matches → report to the user.
See Also — within each topic directory:
- Add obviously missing cross-references between related articles.
- Remove links to deleted files.
Heuristic Checks (report only)
These rely on your judgment. Report findings without auto-fixing:
- Factual contradictions across articles
- Outdated claims superseded by newer sources
- Missing conflict annotations where sources disagree
- Orphan pages with no inbound links from other wiki articles
- Missing cross-topic references
- Concepts frequently mentioned but lacking a dedicated page
- Archive pages whose cited source articles have been substantially updated since archival
Post-Lint
Append to wiki/log.md:
## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed
Conventions
- Standard markdown with relative links throughout.
- wiki/ supports one level of topic subdirectories only. No deeper nesting.
- Today's date for log entries, Collected dates, and Archived dates. Updated dates reflect when the article's knowledge content last changed. Published dates come from the source (use
Unknownwhen unavailable). - Inside wiki/ files, all markdown links use paths relative to the current file. In conversation output, use project-root-relative paths (e.g.,
wiki/topic/article.md). - Ingest updates both
wiki/index.mdandwiki/log.md. Archive (from Query) updates both. Lint updateswiki/log.md(andwiki/index.mdonly when auto-fixing index entries). Plain queries do not write any files.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核