self-learning
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSelf-Learning Skill Generator
自学习Skill生成器
Autonomously research and learn new technologies from the web, then generate a reusable skill.
可自主从网络调研并学习新技术,进而生成可复用的Skill。
Usage
使用方法
/learn <topic>If is missing, show usage. If topic is ambiguous, ask to clarify:
<topic>- "react" → "React for web, React Native, or a specific library like react-query?"
- "apollo" → "Apollo GraphQL client, Apollo Server, or Apollo Federation?"
- "aws" → "Which AWS service? (S3, Lambda, DynamoDB, etc.)"
Normalize to kebab-case for filenames.
/learn <topic>如果缺失,则显示使用方法。如果主题不明确,请要求用户澄清:
<topic>- "react" → "是指Web端React、React Native,还是像react-query这样的特定库?"
- "apollo" → "是指Apollo GraphQL客户端、Apollo Server还是Apollo Federation?"
- "aws" → "指的是哪项AWS服务?(S3、Lambda、DynamoDB等)"
文件名需统一为短横线分隔格式(kebab-case)。
2. Discover Sources (Web Search)
2. 发现数据源(网页搜索)
Use web search tool to find authoritative documentation:
Search queries to try:
<topic> official documentation<topic> getting started guide<topic> API reference<topic> GitHub repository
Source prioritization:
- Official docs sites (e.g., docs.*, *.dev)
- Official GitHub repositories (README, /docs)
- Official blogs/announcements
Select 3–5 high-quality URLs maximum.
If no credible sources found, ask user to provide a URL.
使用网页搜索工具查找权威文档:
可尝试的搜索查询词:
<topic> official documentation<topic> getting started guide<topic> API reference<topic> GitHub repository
数据源优先级:
- 官方文档网站(例如:docs.、.dev)
- 官方GitHub仓库(README、/docs目录)
- 官方博客/公告
最多选择3-5个高质量URL。
如果未找到可信数据源,请要求用户提供URL。
3. Extract Content (URL Reading)
3. 提取内容(URL读取)
For each selected URL, read the content:
Extract only relevant sections:
- Installation / setup
- Core concepts
- API reference / key functions
- Common patterns / examples
- Version information
Skip irrelevant content:
- Navigation, ads, login prompts
- Unrelated sidebar content
- Comments, forums
If reading the content fails (JavaScript-heavy sites), fall back to browser agent:
Task: Navigate to <URL> and extract the main content including:
- Installation instructions
- Core concepts and API reference
- Code examples
Return the extracted content as markdown.Record scrape timestamp for each source (use current date: YYYY-MM-DD format).
读取每个选中URL的内容:
仅提取相关章节:
- 安装/设置
- 核心概念
- API参考/核心函数
- 常见模式/示例
- 版本信息
跳过无关内容:
- 导航栏、广告、登录提示
- 无关侧边栏内容
- 评论、论坛
如果读取内容失败(如依赖JavaScript的网站),则改用浏览器Agent:
Task: Navigate to <URL> and extract the main content including:
- Installation instructions
- Core concepts and API reference
- Code examples
Return the extracted content as markdown.记录每个数据源的抓取时间戳(使用当前日期:YYYY-MM-DD格式)。
4. Generate Skill
4. 生成Skill
Skills are modular, self-contained packages. Every skill consists of a required file and optional bundled resources:
SKILL.mdskill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)- Read to understand the format and principles.
references/skill_creation_guide.md - Synthesize the learned and extracted information into a new skill.
- Trigger: Write a description that clearly defines when to use it.
- Workflow: Create step-by-step instructions.
- Format: Ensure valid YAML frontmatter and proper file structure.
Skill是模块化、独立的包。每个Skill都包含一个必填的文件和可选的捆绑资源:
SKILL.mdskill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)- 阅读以了解格式和原则。
references/skill_creation_guide.md - 将学习和提取到的信息合成新的Skill。
- 触发条件: 编写清晰的描述,定义该Skill的适用场景。
- 工作流程: 创建分步操作说明。
- 格式: 确保YAML前置元数据有效,文件结构正确。
5. Save the Skill
5. 保存Skill
Antigravity supports two types of skills, save a global-workspace if asked.
- Workspace-specific
.agent/skills/<skill-folder>/ - Global (all workspaces)
~/.gemini/antigravity/skills/<skill-folder>/
Create directory if it doesn't exist, warn user before overwriting existing skill.
Antigravity支持两种类型的Skill,若用户要求则保存为全局工作区版本。
- 工作区专属
.agent/skills/<skill-folder>/ - 全局(所有工作区)
~/.gemini/antigravity/skills/<skill-folder>/
如果目录不存在则创建,覆盖现有Skill前需向用户发出警告。
6. Confirm to User
6. 向用户确认
Report:
✓ Created skill: <topic>
Sources scraped: <N>
Saved to: .agent/skills/<topic>/SKILL.md
This skill will auto-trigger when working with <topic>.反馈内容:
✓ Created skill: <topic>
Sources scraped: <N>
Saved to: .agent/skills/<topic>/SKILL.md
This skill will auto-trigger when working with <topic>.Tool Reference
工具参考
- : Discover documentation URLs
search_web - : Extract content from static pages
read_url_content - : Extract content from JavaScript-heavy sites
browser_subagent - : Save the generated skill
write_to_file
- : 发现文档URL
search_web - : 从静态页面提取内容
read_url_content - : 从依赖JavaScript的网站提取内容
browser_subagent - : 保存生成的Skill
write_to_file
Critical Rules
重要规则
- Never hallucinate documentation: Only include information from scraped sources.
- Never invent APIs: If documentation is unclear, ask the user what to do.
- Ask for URLs: If automated discovery fails, ask user for specific URLs.
- Verify sources: Prefer official sources over third-party tutorials.
- 切勿虚构文档: 仅包含从抓取数据源获取的信息。
- 切勿编造API: 如果文档内容不明确,请询问用户如何处理。
- 主动索要URL: 如果自动发现失败,请要求用户提供特定URL。
- 验证数据源: 优先使用官方数据源,而非第三方教程。