From 5634014450aee6cf74d8cb3c19addea32bb7c1ce Mon Sep 17 00:00:00 2001 From: hanyuan <1712313289@qq.com> Date: Sat, 23 May 2026 15:54:14 +0800 Subject: [PATCH] docs: tighten SKILL.md description, add one-line install guide, modernize README - SKILL.md: compress description from ~300 to ~200 chars, front-load trigger keywords (benefits all platforms by avoiding skill listing budget truncation) - New docs/guide/installation.md: AI-agent-readable install guide with platform detection, curl-based download, and verification steps - README.md / README.en.md: add shields.io badges, emoji sections, collapsible use cases, one-line install, update OpenCode section to reflect native skill support - .gitignore: add .opencode/sessions/ --- .gitignore | 3 + README.en.md | 521 +++++++++------------------ README.md | 517 +++++++++----------------- docs/guide/installation.md | 118 ++++++ skills/learn-anything-skill/SKILL.md | 2 +- 5 files changed, 478 insertions(+), 683 deletions(-) create mode 100644 docs/guide/installation.md diff --git a/.gitignore b/.gitignore index e43b0f9..f8c6bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .DS_Store + +# OpenCode session artifacts +.opencode/sessions/ diff --git a/README.en.md b/README.en.md index 4eb9a9c..c7aee42 100644 --- a/README.en.md +++ b/README.en.md @@ -1,487 +1,322 @@ -# Learn Anything Skill +
-[中文说明](./README.md) +License +SKILL.md +Language +Platforms -A general-purpose AI learning skill for mastering almost any subject. -It acts as a **mentor + project coach** by default: teaching primarily in Chinese, staying warm but rigorous, and focusing on plans, structured explanations, project-style practice, mastery checks, and authoritative sources when the user does not provide materials. +
-Good fit for: +
-- learners who want a structured path into a new topic -- people who want to move from "I know it" to "I can apply and transfer it" -- builders who prefer project-driven learning over passive explanation -- toolmakers who want a reusable open-source skill for Codex, Claude Code, and OpenCode users +--- -## What This Is +# 🎓 Learn Anything Skill -`learn-anything-skill` is a portable `SKILL.md` workflow package whose goal is not just to answer questions, but to **help users actually learn**. +> A general-purpose AI learning skill. **Mentor + Project Coach** mode. +> Doesn't just answer questions — **helps you truly learn.** -It combines two default methods: +[中文说明](./README.md) -- **Project-driven learning**: turn each study cycle into an output, not just a conceptual explanation -- **Mastery Learning**: do not stop at "I get it"; push toward "I can explain, apply, adapt, and transfer it" +--- -This skill can help generate: +## ⚡ One-Line Install -- study plans -- study notes -- session reviews -- project briefs -- mastery checklists -- one-off topic explanations with follow-up practice +Copy this sentence to your AI Agent (OpenCode, Claude Code, Codex): -## Core Features +``` +Install learn-anything-skill by following the instructions at: https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md +``` -### 1. It behaves like a mentor, not a generic Q&A bot +The agent reads the guide, downloads files, configures everything. You just **restart**. -It first identifies the task type: +> 📖 Full guide: [docs/guide/installation.md](docs/guide/installation.md) -- learning a new topic -- building a study roadmap -- project coaching -- close reading of source material -- post-study review -- mastery evaluation +--- + +## 📖 What This Is -If the goal is unclear, it asks for the minimum missing context. If the goal is already clear, it moves directly into teaching. +A portable `SKILL.md` workflow package built on two methods: -### 2. It is project-driven without forcing everything into code +| Method | Description | +|--------|-------------| +| **Project-Driven Learning** | Every session produces a tangible output (demo, report, notes, script) | +| **Mastery Learning** | Mastery ≠ reading. Must explain, apply, transfer to pass | -For programming and engineering topics, it tends to assign: +**It can generate:** +- 📋 Study Plans · 📝 Notes · 🔄 Session Reviews +- 📦 Project Briefs · ✅ Mastery Checklists · 🎯 Topic Explanations -- minimum viable demos -- micro-projects -- debugging exercises -- small system briefs +--- -For non-programming topics, it converts learning into output-based projects such as: +## ✨ Key Features -- short research reports -- teaching scripts or presentation outlines -- case analyses -- knowledge maps -- reading notes -- speaking practice scripts +### 🤖 Mentor Mode, Not a Q&A Bot + +Auto-identifies task type: +``` +New Topic → Roadmap → Project Coaching → Source Reading → Review → Mastery Check +``` -### 3. It fills in authoritative sources when the user does not provide material +### 🏗 Project-Driven (Not Just Code) -Default source priority: +| Coding/Engineering | Non-Coding | +|-------------------|-----------| +| Minimal demo | Research report | +| Micro-project | Case analysis | +| Debugging task | Knowledge map | +| System brief | Teaching script | -1. Official documentation, primary sources, original standards -2. Canonical textbooks, classic works, authoritative institutions or courses -3. High-quality tutorials and best practices +### 📚 Auto-Sources Authority -It tries to distinguish between: +``` +Official Docs > Canonical Textbooks > Best Practices +``` -- **Factual basis**: definitions, principles, theorems, standards, source claims, historical facts -- **Judgment and advice**: study order, project design, exercise sequencing, engineering tradeoffs +Always distinguishes **factual basis** from **advisory judgment**. -### 4. It uses a built-in mastery lens +### 🎯 Built-in Mastery Levels -The skill models user progress across levels such as: +``` +Know → Use → Modify → Design → Transfer +``` -- know it -- use it -- modify it -- design with it -- transfer it +Stops asking "Do you understand?" Starts checking "Can you do it?" -It does not stop at "Do you understand?" It checks mastery through explanation, correction, variation, transfer, and concrete outputs. +--- -## Repository Structure +## 📂 Repository Structure -```text -skills/ -└── learn-anything-skill/ - ├── SKILL.md - ├── agents/ - │ └── openai.yaml - ├── references/ - │ ├── mastery-rubric.md - │ ├── project-patterns.md - │ ├── source-strategy.md - │ └── teaching-playbook.md - └── assets/ - ├── learning-plan-template.md - ├── mistakes-log-template.md - ├── mastery-check-template.md - ├── project-brief-template.md - ├── session-review-template.md - └── study-notes-template.md +``` +skills/learn-anything-skill/ +├── SKILL.md ← 🧠 Main skill file +├── agents/openai.yaml ← OpenAI agent config +├── references/ ← 📖 Deep reference rules +│ ├── mastery-rubric.md +│ ├── project-patterns.md +│ ├── source-strategy.md +│ └── teaching-playbook.md +└── assets/ ← 📄 Output templates + ├── learning-plan-template.md + ├── study-notes-template.md + ├── session-review-template.md + ├── project-brief-template.md + ├── mastery-check-template.md + └── mistakes-log-template.md ``` -## Recommended Learning Directory Workflow +--- -Do not study inside a cluttered general workspace if you can avoid it. -Create a dedicated learning directory first, then invoke the skill from inside that directory. +## 🚀 Recommended Workflow -For example, if you want to study AI in a structured way: +Create a dedicated directory per topic: ```bash -mkdir -p learn-ai -cd learn-ai +mkdir learn-ai && cd learn-ai ``` -Then use `learn-anything-skill` inside that directory. +The skill auto-saves output to `study/` in your current directory. Reuses existing structures when found. -Why this is recommended: +--- -- study plans can be saved automatically as Markdown files -- study notes can accumulate over time instead of disappearing into chat history -- session reviews, mastery checks, and mistake logs stay in one place -- materials, exercises, notes, and project briefs for one topic do not get mixed into unrelated projects +## 📦 Installation -By default, the skill prefers writing learning outputs into a `study/` subdirectory under the current working directory, for example: +### ⚡ One-Line Install (Recommended) -```text -learn-ai/ -└── study/ - ├── ai-learning-plan.md - ├── ai-notes.md - ├── ai-session-review.md - ├── ai-mastery-check.md - └── ai-mistakes-log.md +``` +Install learn-anything-skill by following the instructions at: https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md ``` -If the directory already has a better learning-material structure, the skill should reuse that existing structure instead of creating scattered duplicate files. - -## Installation +See the [installation guide](docs/guide/installation.md) for details. -## Install in Codex / OpenAI Skills +--- -### Option A: local directory install +### Install in Codex / OpenAI Skills -Copy the skill folder into your local skills directory: +**Option A: local directory install** ```bash mkdir -p ~/.codex/skills cp -R ./skills/learn-anything-skill ~/.codex/skills/ ``` -Then restart Codex or refresh the skills list. - -If your environment supports automatic discovery, the skill should appear as `learn-anything-skill`. - -### Option B: upload or import through a Skills UI - -OpenAI Skills use a portable format that can be shared across compatible products. -If your ChatGPT or Codex build exposes a Skills page or an import flow, you can also upload the entire `learn-anything-skill` folder there. +Restart Codex or refresh the skills list. -Upload the whole folder, not just `SKILL.md`, so `references/` and `assets/` remain available. +**Option B: upload via Skills UI** -## Install in Claude Code +Upload the entire `learn-anything-skill` folder, keeping `references/` and `assets/`. -Claude Code currently maps most closely to **Skills**. Two practical options: - -- project-local skill: `.claude/skills//SKILL.md` -- plugin distribution: `skills//SKILL.md` inside a plugin +--- -### Option A: use it as a project skill +### Install in Claude Code -Copy it into your project: +**Option A: project skill** ```bash mkdir -p .claude/skills cp -R ./skills/learn-anything-skill ./.claude/skills/ ``` -Then in Claude Code you can: - -- invoke `/learn-anything-skill` -- explicitly say `Use /learn-anything-skill ...` -- let Claude trigger it automatically on relevant tasks +Invoke with `/learn-anything-skill` or natural language. -### Option B: package it as a Claude Code plugin - -If you want to publish it more formally, wrap it with plugin metadata: +**Option B: Claude Code plugin** ```text my-plugin/ -├── .claude-plugin/ -│ └── plugin.json -└── skills/ - └── learn-anything-skill/ - └── SKILL.md +├── .claude-plugin/plugin.json +└── skills/learn-anything-skill/SKILL.md ``` -For local testing: - ```bash claude --plugin-dir ./my-plugin ``` -Then invoke it with: - -```text -/my-plugin:learn-anything-skill -``` - -If you just want to use it quickly, prefer Option A. +--- -## Install in OpenCode +### Install in OpenCode -OpenCode currently emphasizes **custom commands**, not the same native skill folder format used by OpenAI or Claude. -The safest approach is to adapt this skill into an OpenCode slash command. +OpenCode now natively supports **skills** (`SKILL.md` format), compatible with Codex and Claude Code. -### Option A: project-level command +**Use the one-line install** above — your agent handles everything. -Create the directory: +**Manual install:** ```bash -mkdir -p .opencode/commands -``` - -Create `.opencode/commands/learn-anything.md`: - -```md ---- -description: Chinese mentor-style learning and project coaching ---- - -Act as a mentor + project coach and help me learn this topic in Chinese: $ARGUMENTS - -Requirements: -- identify the task type first: new topic, roadmap, project coaching, source reading, review, mastery evaluation -- if the goal is unclear, ask for 1-3 critical pieces of context -- use Mastery Learning rather than stopping at surface understanding -- provide the smallest useful example, exercise, or output-based project -- if I do not provide material, proactively look for official docs, primary sources, canonical texts, authoritative institutions, and best practices -- distinguish between factual basis and advisory judgment -- end with the next study action -``` - -Then run: - -```text -/learn-anything calculus limits +mkdir -p .opencode/skills +cp -R ./skills/learn-anything-skill .opencode/skills/ ``` -### Option B: global command +Restart OpenCode. -If you want it available across projects, place it here: +**Global install (all projects):** -```text -~/.config/opencode/commands/learn-anything.md +```bash +mkdir -p ~/.config/opencode/skills +cp -R ./skills/learn-anything-skill ~/.config/opencode/skills/ ``` -### OpenCode adaptation note - -OpenCode command files are single-file prompt templates. They do not automatically carry the full `references/` and `assets/` folder structure. - -If you want fuller reuse inside OpenCode: - -- merge key rules from `references/` into the command template -- or keep this repository inside the workspace so the agent can read those files directly - -## Usage - -## 1. Explicit invocation - -It is recommended to enter a topic-specific learning directory first so generated plans, notes, and reviews can be saved into that workspace automatically. - -Use this when you already know what you want it to do: +--- -```text -Use $learn-anything-skill to teach me calculus and create a 4-week study plan. -``` +## 📚 Usage -Or in Chinese: +### 1. Explicit Invocation ```text -用 $learn-anything-skill 帮我学 SQL,并给我一个小项目任务书。 +Use learn-anything-skill to teach me calculus and create a 4-week study plan ``` -## 2. Natural-language triggering - -If your platform supports automatic skill triggering, prompts like these should work: +### 2. Natural-Language Triggering - Help me learn calculus and create a four-week plan -- Teach me how to read *The Wealth of Nations* and organize study notes -- I want to improve spoken English with project-style exercises and reviews -- Help me learn SQL and design a small project brief -- Check my understanding of probability and point out weak spots - -## 3. Use it with your own materials - -This is the recommended mode. You can hand it: - -- course slides -- lecture notes -- textbook chapters -- papers -- blog posts -- homework sets -- code repositories -- your own notes - -Then ask it to: +- Guide me through The Wealth of Nations with study notes +- Improve my spoken English with project-style exercises +- Check my understanding of probability -- read closely -- extract structure -- turn material into teaching notes -- fill prerequisite gaps -- create exercises -- run mastery checks +### 3. With Your Own Materials -## Use Cases +Hand it course slides, lecture notes, textbook chapters, papers, code repos — it reads closely, extracts structure, fills prerequisite gaps, creates exercises, and runs mastery checks. -## Case 1: a four-week study plan - -```text -Use $learn-anything-skill to help me learn linear algebra. -I only know high-school math and I can study 6 hours per week. -Please create a 4-week plan with weekly outputs and acceptance criteria. -``` - -Typical output: - -- starting-level assessment -- capability breakdown -- four-week roadmap -- weekly exercises and deliverables -- risk reminders - -## Case 2: guided reading - -```text -Use $learn-anything-skill to guide me through Volume 1 of The Wealth of Nations. -I do not want a summary only. Help me build structure, make reading notes, and prepare review questions after each chapter. -``` - -Typical output: +--- -- chapter structure -- key concepts and arguments -- common misunderstandings -- close-reading questions -- review questions +## 💡 Use Cases -## Case 3: project-based spoken English training +
+📋 Study Plan ```text -Use $learn-anything-skill to improve my spoken English. -My goal is to deliver a 3-minute self-introduction and project introduction in 6 weeks. -Please design the training in a project-driven way. +Use learn-anything-skill to help me learn linear algebra. +I only know high-school math, 6h/week. +Create a 4-week plan with outputs and acceptance criteria. ``` -Typical output: +→ Gets: level assessment · capability breakdown · weekly plan · deliverables · risk notes -- staged training roadmap -- weekly speaking themes and scripts -- recording and output tasks -- review and retest criteria +
-## Case 4: SQL plus a small project brief +
+📖 Guided Reading ```text -Use $learn-anything-skill to teach me SQL. -I know some Python but have never studied databases systematically. -Please give me a roadmap and design a small student-score analysis project brief. +Use learn-anything-skill to guide me through The Wealth of Nations Vol 1. +Help me build structure, take notes, prepare chapter review questions. ``` -Typical output: +→ Gets: chapter structure · key concepts · common misunderstandings · review questions -- minimum prerequisite diagnosis -- core SQL explanations -- graduated query practice -- small project brief -- mastery checkpoints +
-## Case 5: mastery checking +
+🗣 Spoken English ```text -Use $learn-anything-skill to assess my understanding of conditional probability and Bayes' rule. -Do not just ask whether I understand. Give me restatement tasks, variation tasks, and transfer tasks. +Use learn-anything-skill to improve my spoken English. +Goal: 3-minute self-introduction in 6 weeks. Project-driven training. ``` -Typical output: +→ Gets: staged roadmap · weekly scripts · recording tasks · retest criteria -- current mastery-level judgment -- evidence for that judgment -- weak-point diagnosis -- reinforcement tasks -- retest criteria +
-## Recommended Prompts - -If this is your first time using the skill, start with one of these: - -### Generate a study plan +
+💻 SQL + Project ```text -Use $learn-anything-skill to help me learn [topic]. -My current level is [current level], and I can spend [time] each week. -Please create a [2/4/8]-week plan with exercises, outputs, and acceptance criteria for each week. +Use learn-anything-skill to teach me SQL. +I know Python but not databases. +Give me a roadmap and a student-score analysis project brief. ``` -### Request a one-off explanation +→ Gets: prerequisite check · core concepts · graded exercises · project brief · checkpoints -```text -Use $learn-anything-skill to teach me [topic]. -Please structure the answer as: core concept -> smallest useful example or case -> common mistakes -> one micro-output task -> mastery check. -``` +
-### Run a post-study review +
+✅ Mastery Check ```text -Use $learn-anything-skill to review what I learned today about [topic]. -Help me separate what I truly understand, what is still fuzzy, and what I should study next. +Use learn-anything-skill to assess my understanding of conditional probability. +Don't ask if I understand — give me restatement, variation, and transfer tasks. ``` -### Generate a project brief +→ Gets: level judgment · evidence · weak points · reinforcement · retest standard -```text -Use $learn-anything-skill to turn [topic] into a project brief. -Include background, goal, deliverables, constraints, task breakdown, and acceptance criteria. -``` +
-## Suitable Topics - -This skill is not only for programmers. It works well for: +--- -- programming and software engineering -- mathematics and statistics -- economics and finance fundamentals -- English and other language learning -- history, social science, and humanities reading -- writing, speaking, and communication training -- AI, LLM, and data-related topics +## 🎨 Suitable Topics -## Customization +This skill isn't just for programmers: -If you want your own version, the most common changes are: +`Coding` · `Math` · `Stats` · `Economics` · `Finance` · `English` · `Japanese` · `History` · `Social Science` · `Writing` · `Speaking` · `AI/LLM` -- change the tone or default language -- shift project style toward exams, papers, real-world work, or portfolio building -- change source strategy to emphasize official docs or textbook reading -- change mastery checks to focus on problem solving, oral explanation, code implementation, or paper interpretation +--- -The best files to edit first: +## 🛠 Customization -- `skills/learn-anything-skill/SKILL.md` -- `skills/learn-anything-skill/references/source-strategy.md` -- `skills/learn-anything-skill/references/project-patterns.md` -- `skills/learn-anything-skill/references/mastery-rubric.md` +Want your own version? Start here: -## Compatibility Notes +| File | Controls | +|------|----------| +| `SKILL.md` | Overall behavior, task tree, teaching flow | +| `references/source-strategy.md` | Source lookup priority | +| `references/project-patterns.md` | Project-driven formats | +| `references/mastery-rubric.md` | Mastery criteria | -- **OpenAI / Codex / ChatGPT Skills**: this is the most native target format -- **Claude Code**: usable directly as a skill; for broader distribution, a plugin wrapper is recommended -- **OpenCode**: better treated as a command adaptation than as a fully identical skill system +--- -In short: the core asset in this repository is the portable `SKILL.md + references + assets` workflow. Installation entry points differ across agents, but the teaching logic is reusable. +## 🔗 Compatibility -## References +| Platform | Skill Format | Install | +|----------|-------------|---------| +| **OpenAI / Codex / ChatGPT Skills** | ✅ Native | `~/.codex/skills/` or Skills UI | +| **Claude Code** | ✅ Supported | `.claude/skills/` or Plugin | +| **OpenCode** | ✅ Native | `.opencode/skills/` or one-line install | -These official resources helped shape the installation and compatibility guidance in this repository: +> The core asset is the portable `SKILL.md + references + assets` workflow. Install entry points differ by platform, but the content itself is cross-platform. -- OpenAI Skills: -- ChatGPT Skills help: -- Codex app introduction: -- Claude Code cheatsheet: -- Claude Code plugins: -- OpenCode commands: +--- -## License +## 📄 License -This repository is released under the [MIT License](./LICENSE). +MIT · See [LICENSE](./LICENSE) diff --git a/README.md b/README.md index 23cb9cb..4bf6174 100644 --- a/README.md +++ b/README.md @@ -1,495 +1,334 @@ -# Learn Anything Skill +
-[English README](./README.en.md) +License +SKILL.md +Language +Platforms -一个面向“学习任何知识”的通用 AI 学习 Skill。 -它默认扮演 **导师 + 项目教练**:用中文主讲,温柔鼓励,专业幽默;不只解释概念,还会诊断你的起点、制定计划、组织项目化练习、检查掌握度,并在你没给资料时主动补官方文档与权威材料。 +
-A general-purpose AI learning skill for mastering almost any subject. -It acts as a **mentor + project coach** by default: teaching primarily in Chinese, staying warm but rigorous, and focusing on plans, structured explanations, project-style practice, mastery checks, and authoritative sources when the user does not provide materials. +
-适合: +--- -- 想系统学习一个新主题的人 -- 想把“知道”推进到“会用、会改、会迁移”的人 -- 想把学习过程产品化、项目化、可复盘的人 -- 想把 Skill 开源给 Codex / Claude Code / OpenCode 用户复用的人 +# 🎓 Learn Anything Skill -Good fit for: +> 一个 **中文导师 + 项目教练** 式的通用 AI 学习 Skill。 +> 不只回答问题,**帮你真的学会。** -- learners who want a structured path into a new topic -- people who want to move from "I know it" to "I can apply and transfer it" -- builders who prefer project-driven learning over passive explanation -- toolmakers who want a reusable open-source skill for Codex, Claude Code, and OpenCode users +> A general-purpose AI learning skill. **Mentor + Project Coach** mode. +> Doesn't just answer questions — **helps you truly learn.** -## 这是什么 +[English README](./README.en.md) -`learn-anything-skill` 是一个可移植的 `SKILL.md` 工作流包,核心目标不是“回答问题”,而是 **帮助用户真的学会**。 +--- -它默认结合两套方法: +## ⚡ 一句话安装 -- **项目驱动学习**:每轮学习尽量落到一个产出,而不只是停在概念解释 -- **Mastery Learning**:不把“看懂”当完成,而把“能解释、能应用、能迁移”当掌握 +把下面这句话复制给你的 AI Agent(OpenCode / Claude Code / Codex 均可): -这个 Skill 可以帮助用户生成: +``` +安装 learn-anything-skill,按这里的指南操作:https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md +``` + +Agent 会自动读安装指南、下载 skill 文件、完成配置。你只需要**重启 Agent**。 -- 学习计划 -- 学习笔记 -- 课后复盘 -- 项目任务书 -- 掌握度检查单 -- 单次主题讲解与后续练习 +> 📖 详细安装说明:[docs/guide/installation.md](docs/guide/installation.md) -## 核心特性 +--- -### 1. 默认是导师,而不是问答机器人 +## 📖 这是什么 -它会先判断当前任务属于哪类: +`learn-anything-skill` 是一个可移植的 `SKILL.md` 工作流包,核心目标不是「回答问题」,而是 **帮助用户真的学会**。 + +它默认结合两套方法: -- 学新知识 -- 制定学习路线 -- 做项目陪练 -- 精读资料 -- 课后复盘 -- 掌握度评估 +| 方法 | 说明 | +|------|------| +| **项目驱动学习** | 每轮学习落到一个产出(代码 demo、报告、笔记、演讲稿等),不空谈概念 | +| **Mastery Learning** | 掌握 ≠ 看懂。必须能解释、能应用、能迁移才算过 | -如果目标不清晰,它会先补最关键的信息;如果目标已经清晰,它会直接进入教学。 +**它能帮你生成:** +- 📋 学习计划 · 📝 学习笔记 · 🔄 课后复盘 +- 📦 项目任务书 · ✅ 掌握度检查单 · 🎯 单次主题讲解 -### 2. 项目驱动,但不强迫所有主题都写代码 +--- -对于编程/工程主题,它会倾向于: +## ✨ 核心特性 -- 最小功能 demo -- 微项目 -- 调试任务 -- 小型系统任务书 +### 🤖 导师模式,不是问答机器人 -对于非编程主题,它会自动转成产出型项目,比如: +自动判断任务类型: +``` +学新知识 → 路线规划 → 项目陪练 → 资料精读 → 课后复盘 → 掌握度评估 +``` -- 研究短报告 -- 讲解稿 / 演讲提纲 -- 案例分析 -- 知识地图 -- 读书笔记 -- 口语表达脚本 +目标不清晰?先补关键信息。目标清晰?直接开讲。 -### 3. 用户没有给资料时,会主动补权威来源 +### 🏗 项目驱动(不限编程) -默认资料优先级: +| 编程/工程主题 | 非编程主题 | +|-------------|-----------| +| 最小功能 demo | 研究短报告 | +| 微项目 | 案例分析 | +| 调试任务 | 知识地图 | +| 系统任务书 | 教学讲义 | -1. 官方文档、原始规范、第一手材料 -2. 经典教材、标准著作、权威机构或课程 -3. 高质量教程与最佳实践 +### 📚 自动补权威来源 -回答时会尽量区分: +``` +官方文档 > 经典教材 > 最佳实践 +``` -- **事实依据**:定义、原理、定理、规范、原文观点、史实 -- **建议判断**:学习顺序、项目设计、练习安排、工程取舍 +回答严格区分 **事实依据** 与 **建议判断**。 -### 4. 内置“掌握度”视角 +### 🎯 内置掌握度分级 -Skill 默认会把用户的掌握状态区分为: +``` +知道 → 会用 → 会改 → 会设计 → 会迁移 +``` -- 知道 -- 会用 -- 会改 -- 会设计 -- 会迁移 +不问「懂了没」,只验证「能不能做」。 -它不会只问“懂了吗”,而是会通过复述、改错、变式、迁移和小产出判断你是不是真的掌握。 +--- -## 目录结构 +## 📂 目录结构 -```text -skills/ -└── learn-anything-skill/ - ├── SKILL.md - ├── agents/ - │ └── openai.yaml - ├── references/ - │ ├── mastery-rubric.md - │ ├── project-patterns.md - │ ├── source-strategy.md - │ └── teaching-playbook.md - └── assets/ - ├── learning-plan-template.md - ├── mistakes-log-template.md - ├── mastery-check-template.md - ├── project-brief-template.md - ├── session-review-template.md - └── study-notes-template.md +``` +skills/learn-anything-skill/ +├── SKILL.md ← 🧠 Skill 主文件 +├── agents/openai.yaml ← OpenAI 代理配置 +├── references/ ← 📖 深度参考规则 +│ ├── mastery-rubric.md 掌握度分级细则 +│ ├── project-patterns.md 项目化模式 +│ ├── source-strategy.md 资料策略 +│ └── teaching-playbook.md 教学操作手册 +└── assets/ ← 📄 输出模板 + ├── learning-plan-template.md + ├── study-notes-template.md + ├── session-review-template.md + ├── project-brief-template.md + ├── mastery-check-template.md + └── mistakes-log-template.md ``` -## 推荐学习目录工作流 +--- -推荐不要直接在杂乱的工作目录里学习,而是先单独新建一个学习目录,再在这个目录里调用 Skill。 +## 🚀 推荐学习目录工作流 -例如你想系统学习 AI,可以先创建: +建议为每个学习主题单独建目录,再在这个目录里调用 Skill: ```bash -mkdir -p learn-ai -cd learn-ai +mkdir learn-ai && cd learn-ai ``` -然后在这个目录里使用 `learn-anything-skill`。 +Skill 会自动把学习产出写入当前目录的 `study/` 子文件夹,持续积累。已有学习资料目录时,优先复用现有结构。 -这样做的好处是: +--- -- 学习计划会自动保存为 Markdown 文件 -- 学习笔记会持续追加和沉淀 -- 课后复盘、掌握度检查、错题/卡点记录会留在同一个目录 -- 一个主题的资料、练习、笔记和项目任务书不会和其他项目混在一起 +## 📦 安装 -默认情况下,Skill 会优先把学习产出写到当前工作目录下的 `study/` 子目录,例如: +### ⚡ 一句话安装(推荐) -```text -learn-ai/ -└── study/ - ├── ai-learning-plan.md - ├── ai-notes.md - ├── ai-session-review.md - ├── ai-mastery-check.md - └── ai-mistakes-log.md +``` +安装 learn-anything-skill,按这里的指南操作:https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md ``` -如果目录里已经有更合适的学习资料结构,Skill 也应优先复用已有目录,而不是重复新建散文件。 - -## 安装 +详见 [安装指南](docs/guide/installation.md)。 -## 安装到 Codex / OpenAI Skills +--- -### 方式 A:本地目录安装(适合 Codex 桌面端 / 本地工作流) +### 安装到 Codex / OpenAI Skills -把本仓库里的 Skill 目录复制到本地 Skills 目录: +**方式 A:本地目录安装** ```bash mkdir -p ~/.codex/skills cp -R ./skills/learn-anything-skill ~/.codex/skills/ ``` -复制完成后,重启 Codex 或刷新 Skills 列表。 - -如果你的环境支持自动发现,本 Skill 会以 `learn-anything-skill` 的名字出现在可用 Skills 中。 +重启 Codex 或刷新 Skills 列表。 -### 方式 B:通过 Skills UI 上传 / 导入 +**方式 B:通过 Skills UI 上传 / 导入** -OpenAI 的 Skills 采用可移植的开放标准,支持在不同产品间共享。 -如果你使用的 ChatGPT / Codex 版本带有 Skills 页面或导入入口,也可以直接通过 UI 上传此 Skill。 +上传整个 `learn-anything-skill` 文件夹,保留 `references/` 与 `assets/`。 -建议上传整个 `learn-anything-skill` 文件夹,保留 `references/` 与 `assets/`,不要只上传单个 `SKILL.md`。 - -## 安装到 Claude Code - -Claude Code 当前最贴近的原生载体是 **Skills**。官方支持两种方式: - -- 项目内独立配置:`.claude/skills//SKILL.md` -- 插件方式分发:插件根目录下的 `skills//SKILL.md` +--- -### 方式 A:作为项目内 Skill 使用 +### 安装到 Claude Code -把目录复制到你的项目中: +**方式 A:作为项目内 Skill 使用** ```bash mkdir -p .claude/skills cp -R ./skills/learn-anything-skill ./.claude/skills/ ``` -然后在 Claude Code 中: - -- 直接输入 `/learn-anything-skill` -- 或在自然语言里显式说 `Use /learn-anything-skill ...` -- 或让 Claude 在相关任务里自动触发它 +然后输入 `/learn-anything-skill` 或自然语言触发。 -### 方式 B:作为 Claude Code Plugin 分发 - -如果你想把它发布成 Claude Code 插件,需要额外补一个插件清单: +**方式 B:作为 Claude Code Plugin 分发** ```text my-plugin/ -├── .claude-plugin/ -│ └── plugin.json -└── skills/ - └── learn-anything-skill/ - └── SKILL.md +├── .claude-plugin/plugin.json +└── skills/learn-anything-skill/SKILL.md ``` -开发阶段可本地测试: - ```bash claude --plugin-dir ./my-plugin ``` -然后通过命名空间方式调用: - -```text -/my-plugin:learn-anything-skill -``` - -如果你只是想快速使用,不想维护插件清单,优先用方式 A。 +--- -## 安装到 OpenCode +### 安装到 OpenCode -OpenCode 官方当前主打的是 **custom commands**,不是与 OpenAI / Claude 完全同构的 Skill 目录。 -因此最稳妥的做法是:**把本 Skill 的核心提示词适配成一个 OpenCode slash command**。 +OpenCode 现已原生支持 **skills**(`SKILL.md` 格式),与 Codex / Claude Code 兼容。 -### 方式 A:项目级命令 +**使用一句话安装**:发送安装提示词给 Agent,自动下载配置。 -创建目录: +**手动安装:** ```bash -mkdir -p .opencode/commands -``` - -创建文件 `.opencode/commands/learn-anything.md`: - -```md ---- -description: 中文导师式通用学习与项目陪练 ---- - -请扮演“导师 + 项目教练”,用中文主讲、温柔鼓励、专业幽默的风格帮助我学习这个主题:$ARGUMENTS - -要求: -- 先判断任务类型:学新知识、路线规划、项目陪练、资料精读、复盘纠偏、掌握度评估 -- 如果目标不清晰,先补 1-3 个关键信息 -- 按 Mastery Learning 推进,不把“看懂”视为掌握 -- 尽量给出最小案例、项目化任务或产出型练习 -- 如果我没有提供资料,主动查找官方文档、原始资料、经典教材、权威机构材料与最佳实践 -- 在回答中区分“事实依据”和“建议判断” -- 结尾给出下一步学习动作 +mkdir -p .opencode/skills +cp -R ./skills/learn-anything-skill .opencode/skills/ ``` -然后在 OpenCode 里输入: +重启 OpenCode 后生效。 -```text -/learn-anything 微积分极限 -``` +**全局安装(所有项目可用):** -### 方式 B:全局命令 - -如果你想在所有项目里复用,放到: - -```text -~/.config/opencode/commands/learn-anything.md +```bash +mkdir -p ~/.config/opencode/skills +cp -R ./skills/learn-anything-skill ~/.config/opencode/skills/ ``` -### OpenCode 适配说明 - -OpenCode 的 command 文件是单文件 prompt 模板;它不会像原生 Skill 包那样自动附带 `references/` 和 `assets/` 目录。 -所以如果你要在 OpenCode 里完整复用本仓库的结构化资源,建议: - -- 把 `references/` 里的规则手动合并到 command 模板 -- 或把这个仓库一起放进工作区,让 agent 可以直接读取这些文件 - -## 用法 - -## 1. 显式调用 +--- -推荐先进入你为某个主题单独创建的学习目录里再调用,这样生成的学习计划、笔记和复盘会自动保存到该目录下。 +## 📚 使用方式 -适合你已经知道想让它做什么时: +### 1. 显式调用 ```text -Use $learn-anything-skill to teach me calculus and create a 4-week study plan. +用 learn-anything-skill 帮我学 SQL,并给我一个小项目任务书 ``` -或直接中文: - ```text -用 $learn-anything-skill 帮我学 SQL,并给我一个小项目任务书。 +Use learn-anything-skill to teach me calculus and create a 4-week study plan ``` -## 2. 自然语言触发 - -如果你的平台支持自动触发 Skill,可以直接说: +### 2. 自然语言触发 - 帮我学微积分,并给我四周计划 - 教我读《国富论》,顺手整理学习笔记 - 我要学英语口语,给我项目式练习和复盘 -- 帮我学 SQL,并写一个小项目任务书 - 检查我对概率论的掌握度,指出薄弱点 -## 3. 与你自己的资料一起用 +### 3. 与你自己的资料一起用 -这是最推荐的用法。你可以把这些材料直接交给它: +把课程 PPT、讲义、教材、论文、代码仓库交给它,让它精读、提炼结构、出练习、做掌握度检查。 -- 课程 PPT -- 老师讲义 -- 教材章节 -- 论文 -- 博客文章 -- 作业题 -- 代码仓库 -- 自己写的笔记 - -然后让它: - -- 精读 -- 提炼结构 -- 转成讲义 -- 补前置知识 -- 出练习 -- 做掌握度检查 +--- -## 使用案例 +## 💡 使用案例 -## 案例 1:四周学习计划 +
+📋 四周学习计划 ```text -用 $learn-anything-skill 帮我学线性代数。 +用 learn-anything-skill 帮我学线性代数。 我现在只会高中数学,每周能学 6 小时。 -请给我做一个 4 周学习计划,并且每周都要有小产出和验收标准。 +给我做一个 4 周学习计划,每周都要有产出和验收标准。 ``` -你通常会得到: +→ 得到:起点评估 · 能力拆解 · 周计划 · 验收标准 · 风险提示 -- 当前起点评估 -- 主线能力点拆解 -- 4 周安排 -- 每周练习与产出 -- 风险提示 +
-## 案例 2:读书陪练 +
+📖 读书陪练 ```text -用 $learn-anything-skill 带我读《国富论》第一卷。 -我不想只看总结,请帮我建立结构、做读书笔记,并安排每章后的复盘问题。 +用 learn-anything-skill 带我读《国富论》第一卷。 +帮我建立结构、做读书笔记,安排每章后的复盘问题。 ``` -你通常会得到: +→ 得到:章节结构 · 关键概念 · 易误解点 · 精读问题 · 复盘问题 -- 章节结构 -- 关键概念和脉络 -- 容易误解的地方 -- 精读问题 -- 复盘问题 +
-## 案例 3:英语口语项目化练习 +
+🗣 英语口语训练 ```text -用 $learn-anything-skill 帮我提升英语口语。 -目标是 6 周后能做 3 分钟英文自我介绍和项目介绍。 +用 learn-anything-skill 帮我提升英语口语。 +目标是 6 周后能做 3 分钟英文自我介绍。 请按项目驱动方式安排训练。 ``` -你通常会得到: +→ 得到:分阶段路线 · 每周脚本 · 录音任务 · 复测标准 -- 分阶段训练路线 -- 每周脚本和练习主题 -- 录音/表达产出任务 -- 复盘和复测标准 +
-## 案例 4:SQL + 小项目任务书 +
+💻 SQL + 小项目任务书 ```text -用 $learn-anything-skill 教我 SQL。 +用 learn-anything-skill 教我 SQL。 我会一点 Python,但没系统学过数据库。 -请给我一个学习路线,并设计一个学生成绩分析的小项目任务书。 +给我一个学习路线,设计一个学生成绩分析的小项目任务书。 ``` -你通常会得到: +→ 得到:前置诊断 · 核心概念 · 梯度练习 · 项目任务书 · 掌握检查点 -- 最小前置知识诊断 -- SQL 核心概念讲解 -- 查询练习梯度 -- 小项目任务书 -- 掌握度检查点 +
-## 案例 5:掌握度检查 +
+✅ 掌握度检查 ```text -用 $learn-anything-skill 检查我对概率论里“条件概率”和“贝叶斯公式”的掌握度。 -不要只问我懂不懂,请给我复述题、变式题和迁移题。 +用 learn-anything-skill 检查我对条件概率和贝叶斯公式的掌握度。 +不要只问我懂不懂,给我复述题、变式题和迁移题。 ``` -你通常会得到: - -- 当前掌握等级判断 -- 证据说明 -- 薄弱点定位 -- 补强任务 -- 下一轮复测标准 - -## 推荐提示词 +→ 得到:等级判定 · 证据 · 薄弱点 · 补强任务 · 复测标准 -如果你第一次用这个 Skill,可以直接复制这些提示: +
-### 生成学习计划 - -```text -用 $learn-anything-skill 帮我学习 [主题]。 -我的基础是 [当前水平],我每周能投入 [时间]。 -请给我一个 [2/4/8] 周学习计划,每周都要有练习、产出和验收标准。 -``` - -### 做单次讲解 - -```text -用 $learn-anything-skill 给我讲清楚 [主题]。 -请按“核心概念 -> 最小示例/案例 -> 常见误区 -> 一个微产出任务 -> 掌握检查”的结构来讲。 -``` - -### 做课后复盘 - -```text -用 $learn-anything-skill 帮我复盘今天学的 [主题]。 -请帮我区分:我真正掌握了什么、我还模糊什么、下一步该补什么。 -``` - -### 生成项目任务书 - -```text -用 $learn-anything-skill 帮我把 [主题] 变成一个项目任务书。 -要求包括:背景、目标、交付物、约束、任务拆分、验收标准。 -``` - -## 适用主题 - -这个 Skill 不是只给程序员用的。它适用于: +--- -- 编程与软件工程 -- 数学与统计 -- 经济学与金融基础 -- 英语和其他语言学习 -- 历史、社会科学、人文阅读 -- 写作、演讲、表达训练 -- AI / LLM / 数据相关主题 +## 🎨 适用主题 -## 开发与定制 +这个 Skill 不只是给程序员用的: -如果你想改成自己的版本,最常见的修改点有: +`编程` · `数学` · `统计` · `经济学` · `金融` · `英语` · `日语` · `历史` · `社会科学` · `写作` · `演讲` · `AI/LLM` -- 改默认语气与输出语言 -- 改项目风格:更偏考试、论文、实战或作品集 -- 改资料策略:更强调官方文档或教材精读 -- 改掌握度检查方式:更偏题目、口头复述、代码实现或论文解读 +--- -建议优先修改这些文件: +## 🛠 开发与定制 -- `skills/learn-anything-skill/SKILL.md` -- `skills/learn-anything-skill/references/source-strategy.md` -- `skills/learn-anything-skill/references/project-patterns.md` -- `skills/learn-anything-skill/references/mastery-rubric.md` +想改成自己的版本?优先修改这些文件: -## 兼容性说明 +| 文件 | 控制什么 | +|------|---------| +| `SKILL.md` | 整体行为、任务决策树、教学流程 | +| `references/source-strategy.md` | 资料查找优先级 | +| `references/project-patterns.md` | 项目化方式 | +| `references/mastery-rubric.md` | 掌握度判定标准 | -- **OpenAI / Codex / ChatGPT Skills**:这是最原生的目标形态 -- **Claude Code**:可直接作为 Skill 使用;如果要发布给更多人,建议再包装成 plugin -- **OpenCode**:建议作为 command 适配,而不是假设它与本仓库的 Skill 目录完全同构 +--- -换句话说:这个仓库的核心资产是通用的 `SKILL.md + references + assets` 工作流;不同代理工具的安装入口不完全一样,但内容本身是可迁移的。 +## 🔗 兼容性说明 -## 参考资料 +| 平台 | Skill 格式 | 安装方式 | +|------|-----------|---------| +| **OpenAI / Codex / ChatGPT Skills** | ✅ 原生 | `~/.codex/skills/` 或 Skills UI | +| **Claude Code** | ✅ 支持 | `.claude/skills/` 或 Plugin | +| **OpenCode** | ✅ 原生 | `.opencode/skills/` 或一句话安装 | -以下官方资料对本 README 的安装说明和兼容性表述有帮助: +> 核心资产是通用的 `SKILL.md + references + assets` 工作流。不同平台的安装入口略有不同,但内容本身可跨平台迁移。 -- OpenAI Skills 说明: -- ChatGPT Skills 帮助中心: -- Codex 与 Skills 介绍: -- Claude Code Commands / Skills: -- Claude Code Plugins: -- OpenCode Commands: +--- -## License +## 📄 License -本仓库使用 [MIT License](./LICENSE)。 +MIT · 详见 [LICENSE](./LICENSE) diff --git a/docs/guide/installation.md b/docs/guide/installation.md new file mode 100644 index 0000000..e927015 --- /dev/null +++ b/docs/guide/installation.md @@ -0,0 +1,118 @@ +# 安装 learn-anything-skill + +## 给人类看的 + +把下面这句话复制粘贴给你的 AI Agent(OpenCode、Claude Code、Codex 均可): + +``` +安装 learn-anything-skill,按这里的指南操作:https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md +``` + +或者手动操作:把 `skills/learn-anything-skill/` 整个文件夹复制到你项目里的 `.opencode/skills/learn-anything-skill/`(或对应平台路径),重启 Agent。 + +--- + +## 给 LLM Agent 看的 + +如果你是一个帮助用户安装 `learn-anything-skill` 的 AI Agent,按以下步骤操作。 + +**重要:请用 `curl` 拉取文件内容,不要用 WebFetch。WebFetch 会摘要化内容、丢失文件结构。** + +```bash +curl -fsSL https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/docs/guide/installation.md +``` + +### Step 1: 检测当前平台 + +确定用户在使用哪个 Agent 平台: + +```bash +# 检测 OpenCode +if command -v opencode &> /dev/null; then + echo "OpenCode $(opencode --version) 已安装" + PLATFORM="opencode" +# 检测 Claude Code +elif command -v claude &> /dev/null; then + echo "Claude Code 已安装" + PLATFORM="claude" +else + echo "未检测到 OpenCode 或 Claude Code" + PLATFORM="unknown" +fi +``` + +### Step 2: 下载 skill 文件 + +根据平台选择目标路径: + +| 平台 | Skill 目标路径 | +|------|---------------| +| OpenCode | `.opencode/skills/learn-anything-skill/` | +| Claude Code | `.claude/skills/learn-anything-skill/` | +| Codex | `~/.codex/skills/learn-anything-skill/` | + +以 OpenCode 为例(当前推荐平台),按以下步骤操作: + +```bash +# 1. 创建目标目录 +mkdir -p .opencode/skills/learn-anything-skill +mkdir -p .opencode/skills/learn-anything-skill/references +mkdir -p .opencode/skills/learn-anything-skill/assets + +# 2. 下载核心文件 +BASE="https://raw.githubusercontent.com/read2017/learn-anything-with-AI/main/skills/learn-anything-skill" + +curl -fsSL "$BASE/SKILL.md" -o .opencode/skills/learn-anything-skill/SKILL.md + +# 3. 下载 reference 文件 +curl -fsSL "$BASE/references/mastery-rubric.md" -o .opencode/skills/learn-anything-skill/references/mastery-rubric.md +curl -fsSL "$BASE/references/project-patterns.md" -o .opencode/skills/learn-anything-skill/references/project-patterns.md +curl -fsSL "$BASE/references/source-strategy.md" -o .opencode/skills/learn-anything-skill/references/source-strategy.md +curl -fsSL "$BASE/references/teaching-playbook.md" -o .opencode/skills/learn-anything-skill/references/teaching-playbook.md + +# 4. 下载模板文件 +curl -fsSL "$BASE/assets/learning-plan-template.md" -o .opencode/skills/learn-anything-skill/assets/learning-plan-template.md +curl -fsSL "$BASE/assets/mastery-check-template.md" -o .opencode/skills/learn-anything-skill/assets/mastery-check-template.md +curl -fsSL "$BASE/assets/mistakes-log-template.md" -o .opencode/skills/learn-anything-skill/assets/mistakes-log-template.md +curl -fsSL "$BASE/assets/project-brief-template.md" -o .opencode/skills/learn-anything-skill/assets/project-brief-template.md +curl -fsSL "$BASE/assets/session-review-template.md" -o .opencode/skills/learn-anything-skill/assets/session-review-template.md +curl -fsSL "$BASE/assets/study-notes-template.md" -o .opencode/skills/learn-anything-skill/assets/study-notes-template.md +``` + +### Step 3: 验证安装 + +```bash +# 确认文件存在 +ls .opencode/skills/learn-anything-skill/SKILL.md && echo "✅ SKILL.md 已就位" +ls .opencode/skills/learn-anything-skill/references/ && echo "✅ references/ 已就位" +ls .opencode/skills/learn-anything-skill/assets/ && echo "✅ assets/ 已就位" +``` + +### Step 4: 告知用户 + +告诉用户: + +🎉 **learn-anything-skill 已安装成功!** + +下一步需要: +1. **重启 Agent**(skill 只在启动时加载,不热重载) +2. 重启后,试着输入:`帮我学微积分,给我做一个4周学习计划` +3. Skill 会自动触发,以中文导师 + 项目教练模式开始教学 +4. 学习产出(计划、笔记、复盘等)会自动保存到当前工作目录的 `study/` 子文件夹 + +### 可选:全局安装(所有项目可用) + +如果用户想在所有项目里都能用这个 skill: + +```bash +mkdir -p ~/.config/opencode/skills/learn-anything-skill +# 重复 Step 2 的下载步骤,目标路径改为 ~/.config/opencode/skills/learn-anything-skill/ +``` + +### 可选:通过 Git 安装 + +```bash +git clone https://github.com/read2017/learn-anything-with-AI.git /tmp/learn-anything-skill-install +cp -R /tmp/learn-anything-skill-install/skills/learn-anything-skill .opencode/skills/learn-anything-skill +rm -rf /tmp/learn-anything-skill-install +``` diff --git a/skills/learn-anything-skill/SKILL.md b/skills/learn-anything-skill/SKILL.md index f7a0960..549a59d 100644 --- a/skills/learn-anything-skill/SKILL.md +++ b/skills/learn-anything-skill/SKILL.md @@ -1,6 +1,6 @@ --- name: learn-anything-skill -description: 面向“学习任何知识”的通用导师型 skill。用于用户想学习新主题、制定学习计划、整理学习笔记、做课后复盘、生成项目任务书、做掌握度检查,或希望基于自己资料与外部权威资料进行中文导师式陪学时。默认采用“导师 + 项目教练”模式,以项目驱动和 Mastery Learning 推进;当用户未提供资料时,主动查找官方文档、原始资料、经典教材、权威机构材料与最佳实践,并区分事实依据与建议判断。 +description: 学习新知识、制定计划、整理笔记、课后复盘、项目陪练、掌握度检查。中文导师+项目教练模式,以项目驱动和Mastery Learning推进。主动查官方文档与权威材料。Use when user wants to learn a topic, create a study plan, review notes, or do mastery checks. --- # 万科学习导师