self-learning
npx skills add https://github.com/philschmid/self-learning-skill --skill self-learning
Agent 安装分布
Skill 文档
Self-Learning Skill Generator
Autonomously research and learn new technologies from the web, then generate a reusable skill.
Usage
/learn <topic>
If <topic> is missing, show usage. If topic is ambiguous, ask to clarify:
- “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.
2. Discover Sources (Web Search)
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.
3. Extract Content (URL Reading)
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).
4. Generate Skill
Skills are modular, self-contained packages. Every skill consists of a required SKILL.md file and optional bundled resources:
skill-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
references/skill_creation_guide.mdto understand the format and principles. - 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.
5. Save the Skill
Antigravity supports two types of skills, save a global-workspace if asked.
.agent/skills/<skill-folder>/Workspace-specific~/.gemini/antigravity/skills/<skill-folder>/Global (all workspaces)
Create directory if it doesn’t exist, warn user before overwriting existing skill.
6. Confirm to User
Report:
â Created skill: <topic>
Sources scraped: <N>
Saved to: .agent/skills/<topic>/SKILL.md
This skill will auto-trigger when working with <topic>.
Tool Reference
search_web: Discover documentation URLsread_url_content: Extract content from static pagesbrowser_subagent: Extract content from JavaScript-heavy siteswrite_to_file: Save the generated skill
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.