Skip to content

Create, Evaluate, and Connect AI Skills

update README.md

Jiang Chen083c9d7d6c33
diff --git a/README.md b/README.md
index f85bcf1..9838d02 100644
--- a/README.md
+++ b/README.md
@@ -3,103 +3,122 @@
<img src="images/skillnet.png" width="200" alt="SkillNet Logo">
</a>
-# SkillNet: Create, Evaluate, and Connect AI Skills
+<h1>SkillNet</h1>
-[![PyPI version](https://badge.fury.io/py/skillnet-ai.svg)](https://badge.fury.io/py/skillnet-ai)
+<p><strong>Open Infrastructure for Creating, Evaluating, and Connecting AI Agent Skills</strong></p>
+
+<p>
+Search 500+ community skills · One-line install · Auto-create from repos / docs / logs<br/>
+5-dimension quality scoring · Semantic relationship graph
+</p>
+
+[![PyPI version](https://badge.fury.io/py/skillnet-ai.svg)](https://pypi.org/project/skillnet-ai/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![arXiv](https://img.shields.io/badge/arXiv-b5212f.svg?logo=arxiv)](https://arxiv.org/)
-[![Website](https://img.shields.io/badge/Website-skillnet.openkg.cn-0078D4.svg)](http://skillnet.openkg.cn/)
+[![Website](https://img.shields.io/badge/🌐_Website-skillnet.openkg.cn-0078D4.svg)](http://skillnet.openkg.cn/)
</div>
-## 📖 Table of Contents
-
-- [📖 Overview](#-overview)
-- [📢 News](#-news)
-- [🚀 Features](#-features)
-- [🌐 API Access](#-api-access)
-- [🐍 Python Toolkit (`skillnet-ai`)](#-python-toolkit-skillnet-ai)
- - [🎬 Quick Start Demo](#-quick-start-demo)
- - [📥 Installation](#-installation)
- - [🛠 Python SDK Usage](#-usage-python-sdk)
- - [💻 CLI Usage](#-cli-usage)
-- [🔬 Example Use Case](#-example-use-case)
-- [🤖 OpenClaw Integration](#-openclaw-integration)
-- [📂 Skill Structure](#-skill-structure)
-- [🗺 Roadmap & Contributing](#-roadmap)
-
---
-## 📖 Overview
+**SkillNet** is an open-source platform that treats AI agent skills as first-class, shareable packages — like npm for AI capabilities. It provides end-to-end tooling to **search**, **install**, **create**, **evaluate**, and **organize** skills, so agents can learn from the community and continuously grow.
-SkillNet is an open infrastructure for creating, evaluating, and organizing AI skills at scale.
-
-![](images/graph.gif)
+<div align="center">
+ <img src="images/graph.gif" width="100%" alt="SkillNet Knowledge Graph">
+</div>
## 📢 News
-- **🤖 [2025-02] OpenClaw Integration Released!** — SkillNet is now available as a built-in skill for [OpenClaw](https://github.com/openclaw/openclaw). One command to install, zero config to use. The agent automatically searches, downloads, creates, evaluates, and analyzes skills on your behalf. [Get started →](#-openclaw-integration)
+- **🤖 [2025-02] OpenClaw Integration** — SkillNet is now a built-in skill for [OpenClaw](https://github.com/openclaw/openclaw). One command to install, zero config needed. [Get started →](#-openclaw-integration)
-## 🚀 Features
+## ✨ Key Features
-- **🔍 Search**: Find skills using keywords match or semantic search.
-- **📦 One-Line Installation**: Download skill packages directly from GitHub repositories.
-- **✨ Skill Creation**: Automatically convert various sources into structured, reusable `skills` using LLMs:
- - Execution trajectories / conversation logs
- - GitHub repositories
- - Office documents (PDF, PPT, Word)
- - Direct text prompts
-- **📊 Evaluation**: Evaluate and score skills for quality assurance (Safety, Completeness, Executability, Maintainability, Cost-Awareness).
-- **🕸️ Relationship Analysis**: Automatically map the connections between skills in your local library, identifying structural relationships between skills (similar_to, belong_to, compose_with, depend_on).
+| Feature | Description |
+| :--------------------------- | :---------------------------------------------------------------------------------------------------------------------- |
+| 🔍 **Search** | Find skills via keyword match or AI semantic search across 500+ curated skills |
+| 📦 **One-Line Install** | `skillnet download <url>` — grab any skill from GitHub in seconds |
+| ✨ **Auto-Create** | Convert GitHub repos, PDFs/PPTs/Word docs, conversation logs, or text prompts into structured skill packages using LLMs |
+| 📊 **5-D Evaluation** | Score skills on **Safety · Completeness · Executability · Maintainability · Cost-Awareness** |
+| 🕸️ **Relationship Analysis** | Auto-discover `similar_to` · `belong_to` · `compose_with` · `depend_on` links between skills |
-## 🎬 Quick Start Demo
+---
-https://github.com/user-attachments/assets/9f9d35b0-36fd-4d7d-a072-39afa380b241
+## 🚀 Quick Start
-# 🌐 API Access
+```bash
+pip install skillnet-ai
+```
-SkillNet provides a public API to search skills. Support both keywords match and semantic search.
+```python
+from skillnet_ai import SkillNetClient
-**Base Endpoint:** `http://api-skillnet.openkg.cn/v1/search`
+client = SkillNetClient() # No API key needed for search & download
-### ⚡ Quick Examples
+# Search for skills
+results = client.search(q="pdf", limit=5)
+print(results[0].skill_name, results[0].stars)
-**1. Keywords Match**
+# Install a skill
+client.download(url=results[0].skill_url, target_dir="./my_skills")
+```
-Find "development" tools sorted by stars.
+> **Need Create / Evaluate / Analyze?** Pass `api_key="sk-..."` (or set `API_KEY` env var). See [Configuration](#-configuration).
-```bash
-curl -X GET "http://api-skillnet.openkg.cn/v1/search?q=pdf&sort_by=stars&limit=5" \
- -H "accept: application/json"
-```
+<div align="center">
+
+https://github.com/user-attachments/assets/9f9d35b0-36fd-4d7d-a072-39afa380b241
-**2. Vector Semantic Search**
+</div>
-Find skills related to "reading charts" using AI similarity.
+---
-```bash
-curl -X GET "http://api-skillnet.openkg.cn/v1/search?q=reading%20charts&mode=vector&threshold=0.8" \
- -H "accept: application/json"
-```
+## 📖 Table of Contents
+
+- [Quick Start](#-quick-start)
+- [REST API](#-rest-api)
+- [Python SDK](#-python-sdk)
+- [CLI Reference](#-cli-reference)
+- [Configuration](#-configuration)
+- [Example: Scientific Discovery](#-example-scientific-discovery)
+- [OpenClaw Integration](#-openclaw-integration)
+- [Skill Structure](#-skill-structure)
+- [Roadmap](#-roadmap)
+- [Contributing](#-contributing)
+- [Citation](#-citation)
+- [License](#-license)
-### 📡 Parameter Reference
+---
-| Parameter | Type | Required | Default | Description |
-| :--------- | :----- | :------: | :-------- | :------------------------------------------------- |
-| `q` | string | ✅ | - | The search query (Keywords or Natural Language). |
-| `mode` | string | - | `keyword` | `keyword` (Fuzzy match) or `vector` (Semantic AI). |
-| `category` | string | - | `None` | Filter: Development, AIGC, Research, Science, etc. |
-| `limit` | int | - | `10` | Results per request (Max: 50). |
+## 🌐 REST API
-**Mode Specific Parameters:**
+The SkillNet search API is free, public, and requires no authentication.
-- **Keyword Mode:** `page` (int), `min_stars` (int), `sort_by` (string: `stars` or `recent`)
-- **Vector Mode:** `threshold` (float: `0.0` to `1.0`)
+```bash
+# Keyword search
+curl "http://api-skillnet.openkg.cn/v1/search?q=pdf&sort_by=stars&limit=5"
-### 📦 Response Structure
+# Semantic search
+curl "http://api-skillnet.openkg.cn/v1/search?q=reading%20charts&mode=vector&threshold=0.8"
+```
<details>
-<summary>Click to view JSON Response Example</summary>
+<summary><b>📡 Full Parameter Reference</b></summary>
+
+**Endpoint:** `GET http://api-skillnet.openkg.cn/v1/search`
+
+| Parameter | Type | Default | Description |
+| :---------- | :----- | :--------- | :------------------------------------------------- |
+| `q` | string | _required_ | Search query (keywords or natural language) |
+| `mode` | string | `keyword` | `keyword` (fuzzy match) or `vector` (semantic AI) |
+| `category` | string | — | Filter: Development, AIGC, Research, Science, etc. |
+| `limit` | int | `10` | Results per page (max 50) |
+| `page` | int | `1` | Page number _(keyword mode only)_ |
+| `min_stars` | int | `0` | Minimum star count _(keyword mode only)_ |
+| `sort_by` | string | `stars` | `stars` or `recent` _(keyword mode only)_ |
+| `threshold` | float | `0.8` | Similarity threshold 0.0–1.0 _(vector mode only)_ |
+
+**Response:**
```json
{
@@ -109,397 +128,249 @@ curl -X GET "http://api-skillnet.openkg.cn/v1/search?q=reading%20charts&mode=vec
"skill_description": "Extracts text and tables from PDF documents.",
"author": "openkg-team",
"stars": 128,
- "skill_url": "http://...",
+ "skill_url": "https://...",
"category": "Productivity"
}
],
- "meta": {
- "query": "pdf",
- "mode": "keyword",
- "total": 1,
- "limit": 10,
- ...
- },
+ "meta": { "query": "pdf", "mode": "keyword", "total": 1, "limit": 10 },
"success": true
}
```
</details>
-# 🐍 Python Toolkit (`skillnet-ai`)
-
-**skillnet-ai** is the official Python Toolkit. It functions seamlessly as both a library and a CLI to **Create**, **Evaluate**, and **Organize** skills.
-
-### 📥 Installation
-
-```bash
-pip install skillnet-ai
-```
-
-### 🛠 Usage (Python SDK)
+---
-The `SkillNetClient` is your main entry point.
+## 🐍 Python SDK
-#### 1. Initialization
+### Initialize
```python
from skillnet_ai import SkillNetClient
client = SkillNetClient(
- api_key="sk-...", # Required for Creation, and Evaluation
- # base_url="...", # Optional: Custom LLM base URL
- # github_token="ghp-..." # Optional: For private repos or higher rate limits
+ api_key="sk-...", # Required for create / evaluate / analyze
+ # base_url="...", # Optional: custom LLM endpoint
+ # github_token="ghp-..." # Optional: for private repos
)
```
-#### 2. Search for Skills
-
-Perform keywords match or semantic searches to find skills. (See [Parameter Reference](#-parameter-reference) for configuration details.)
+### Search
```python
-# 1. Standard Keywords Match
-results = client.search(q="pdf", mode="keyword", limit=10, min_stars=5, sort_by="stars")
+# Keyword search
+results = client.search(q="pdf", limit=10, min_stars=5, sort_by="stars")
-# 2. Semantic Search
-results = client.search(q="Help me analyze financial PDF reports", mode="vector", threshold=0.85)
+# Semantic search
+results = client.search(q="analyze financial PDF reports", mode="vector", threshold=0.85)
if results:
- top_skill = results[0]
- print(f"Found: {top_skill.skill_name} (Stars: {top_skill.stars})")
- print(f"URL: {top_skill.skill_url}")
+ print(f"{results[0].skill_name} ⭐{results[0].stars}")
```
-#### 3. Install Skills
-
-Download and install a skill directly from a URL (e.g., from above search results) into your local workspace.
+### Install
```python
-skill_url = "https://github.com/anthropics/skills/tree/main/skills/skill-creator"
-
-try:
- # Downloads to ./my_agent_skills
- local_path = client.download(url=skill_url, target_dir="./my_agent_skills")
- print(f"Skill successfully installed at: {local_path}")
-except Exception as e:
- print(f"Download failed: {e}")
+local_path = client.download(
+ url="https://github.com/anthropics/skills/tree/main/skills/skill-creator",
+ target_dir="./my_skills"
+)
```
-#### 4. Create Skills
+### Create
-Turn local trajectory, gitHub repository, office documents or text description into a polished Skill Package (SKILL.md, scripts, etc.).
+Convert diverse sources into structured skill packages with a single call:
```python
-# 1. Create skill from Local Trajectory
-# Prepare your trajectory (e.g., a conversation log string)
-trajectory_log = """
-User: I need to rename all .jpg files in this folder to .png.
-Agent: I will write a python script to iterate through the folder...
-Agent: Script executed. Renamed 5 files.
-"""
-# Generate Skill, Returns a list of paths to the generated skill folders
-created_paths = client.create(
- trajectory_content=trajectory_log,
- output_dir="./created_skills",
- model="gpt-4o"
-)
+# From conversation logs / execution traces
+client.create(trajectory_content="User: rename .jpg to .png\nAgent: Done.", output_dir="./skills")
-# 2. Create skill from GitHub Repository
-created_paths = client.create(
- github_url="https://github.com/zjunlp/DeepKE",
- output_dir="./created_skills",
- model="gpt-4o"
-)
-
-# 3. Create skill from a office documents (PDF, Word, PPT)
-created_paths = client.create(
- office_file="./docs/user_guide.pdf",
- output_dir="./created_skills"
-)
+# From GitHub repository
+client.create(github_url="https://github.com/zjunlp/DeepKE", output_dir="./skills")
-# 4. Create skill from a prompt description
-created_paths = client.create(
- prompt="Create a skill for web scraping that extracts article titles and content",
- output_dir="./created_skills"
-)
+# From office documents (PDF / PPT / Word)
+client.create(office_file="./guide.pdf", output_dir="./skills")
-print(f"Created {len(created_paths)} new skills.")
-for path in created_paths:
- print(f"- {path}")
+# From natural language prompt
+client.create(prompt="A skill for web scraping article titles", output_dir="./skills")
```
-#### 5. Skill Evaluation
+### Evaluate
-Assess the Safety, Completeness, Executability, Maintainability and Cost-Awareness of a skill. Supports both remote GitHub URLs and local directories.
+Score any skill across 5 quality dimensions. Accepts local paths or GitHub URLs.
```python
-# Evaluate from local directory
-# target_skill = "./my_skills/web_search"
-
-# Evaluate from GitHub URL (uses github_token if provided during initialization)
-target_skill = "https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"
-
-result = client.evaluate(target=target_skill, model="gpt-4o", cache_dir="./evaluate_cache_dir")
-print(f"Evaluation Result: {result}")
+result = client.evaluate(
+ target="https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"
+)
+# Returns: { "safety": {"level": "Good", "reason": "..."}, "completeness": {...}, ... }
```
-#### 6. Skill Relationship Analysis
+### Analyze Relationships
-Analyze a local directory containing multiple skills to infer a relationship graph. It identifies relationships like dependencies (depend_on), collaboration (compose_with), hierarchy (belong_to), and alternatives (similar_to).
+Map the connections between skills in a local directory — outputs `similar_to`, `belong_to`, `compose_with`, and `depend_on` edges.
```python
-# Directory containing multiple skill folders
-skills_directory = "./my_agent_skills"
-
-# Analyze relationships between skills
-# This will also save a 'relationships.json' in the directory by default
-relationships = client.analyze(skills_dir=skills_directory, save_to_file=True, model="gpt-4o")
+relationships = client.analyze(skills_dir="./my_skills")
-# Display the relationships
for rel in relationships:
print(f"{rel['source']} --[{rel['type']}]--> {rel['target']}")
- # Output: PDF_Parser --[compose_with]--> Text_Summarizer
+# PDF_Parser --[compose_with]--> Text_Summarizer
```
-### 💻 CLI Usage
-
-The CLI is powered by `Typer` and `Rich` for a beautiful terminal experience.
+---
-#### Common Commands
+## 💻 CLI Reference
-| Command | Action | Example |
-| :------------- | :---------------------- | :------------------------------------------- |
-| **`search`** | Search skills | `skillnet search "data viz" --mode vector` |
-| **`download`** | Install skill | `skillnet download <github_url> -d ./skills` |
-| **`create`** | Create skill | `skillnet create log.txt --model gpt-4o` |
-| **`evaluate`** | Evaluate skill quality | `skillnet evaluate ./my_tool` |
-| **`analyze`** | Analyze skill relations | `skillnet analyze ./my_agent_skills` |
+The CLI ships with `pip install skillnet-ai` and offers the same features with rich terminal output.
-> **Tip:** Use `skillnet [command] --help` to see all available options (e.g., thresholds, sorting).
+| Command | Description | Example |
+| :--------- | :--------------------- | :--------------------------------------- |
+| `search` | Find skills | `skillnet search "pdf" --mode vector` |
+| `download` | Install a skill | `skillnet download <url> -d ./skills` |
+| `create` | Create from any source | `skillnet create log.txt --model gpt-4o` |
+| `evaluate` | Quality report | `skillnet evaluate ./my_skill` |
+| `analyze` | Relationship graph | `skillnet analyze ./my_skills` |
-#### 1. Search Skills (`search`)
+> Use `skillnet <command> --help` for full options.
-Search the registry using keywords match or semantic search.
+### Search
```bash
-# Basic keywords match
skillnet search "pdf"
-
-# Semantic/Vector search (finds skills by meaning)
-skillnet search "Help me analyze financial PDF reports" --mode vector --threshold 0.85
-
-# Filter by category and sort results
+skillnet search "analyze financial reports" --mode vector --threshold 0.85
skillnet search "visualization" --category "Development" --sort-by stars --limit 10
```
-#### 2. Install Skills (`download`)
-
-Download and install a skill directly from a GitHub repository subdirectory.
+### Install
```bash
-# Download to the current directory
skillnet download https://github.com/anthropics/skills/tree/main/skills/algorithmic-art
-
-# Download to a specific target directory
-skillnet download https://github.com/anthropics/skills/tree/main/skills/algorithmic-art -d ./my_agent/skills
-
-# Download from a private repository
+skillnet download <url> -d ./my_agent/skills
skillnet download <private_url> --token <your_github_token>
```
-#### 3. Create Skills (`create`)
-
-Create structured Skill from various sources using LLMs.
-
-**Linux/macOS:**
-
-```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
-```
-
-**Windows PowerShell:**
-
-```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
-```
-
-**Usage Examples:**
+### Create
```bash
-# From a trajectory file
+# From trajectory file
skillnet create ./logs/trajectory.txt -d ./generated_skills
-# From a GitHub repository
+# From GitHub repo
skillnet create --github https://github.com/owner/repo
-# From an office document (PDF, PPT, Word)
+# From office document (PDF, PPT, Word)
skillnet create --office ./docs/guide.pdf
-# From a direct prompt
-skillnet create --prompt "Create a skill for extracting tables from images"
-
-# Specify a custom model
-skillnet create --office report.pdf --model gpt-4o
+# From prompt
+skillnet create --prompt "A skill for extracting tables from images"
```
-#### 4. Evaluate Skills (`evaluate`)
-
-Generate a comprehensive quality report (Safety, Completeness, Executability, Maintainability, Cost-Awareness) for a skill.
-
-**Linux/macOS:**
+### Evaluate
```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
-```
-
-**Windows PowerShell:**
-
-```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
-```
-
-**Usage Examples:**
-
-```bash
-# Evaluate a remote skill via GitHub URL
skillnet evaluate https://github.com/anthropics/skills/tree/main/skills/algorithmic-art
-
-# Evaluate a local skill directory
skillnet evaluate ./my_skills/web_search
-
-# Custom evaluation config
skillnet evaluate ./my_skills/tool --category "Development" --model gpt-4o
```
-#### 5. Analyze Relationships (`analyze`)
-
-Scan a local directory of skills to analyze their connections using AI.
-
-**Linux/macOS:**
+### Analyze
```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
+skillnet analyze ./my_agent_skills
+skillnet analyze ./my_agent_skills --no-save # print only, don't write file
+skillnet analyze ./my_agent_skills --model gpt-4o
```
-**Windows PowerShell:**
-
-```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
-```
+---
-**Usage Examples:**
+## ⚙️ Configuration
-```bash
-# Analyze a directory containing multiple skill folders
-skillnet analyze ./my_agent_skills
+### Environment Variables
-# Analyze without saving the result file (just print to console)
-skillnet analyze ./my_agent_skills --no-save
+| Variable | Required For | Default |
+| :------------- | :--------------------------------- | :-------------------------- |
+| `API_KEY` | `create` · `evaluate` · `analyze` | — |
+| `BASE_URL` | Custom LLM endpoint | `https://api.openai.com/v1` |
+| `GITHUB_TOKEN` | Private repos / higher rate limits | — |
-# Specify a model for the analysis
-skillnet analyze ./my_agent_skills --model gpt-4o
-```
+> `search` and `download` (public repos) work without any credentials.
-### Environment Configuration
-
-To use **Creation**, **Evaluation**, or **Analyze** features, set your environment variables:
-
-**Linux/macOS:**
+**Linux / macOS:**
```bash
-export API_KEY="your_api_key"
-export BASE_URL="https://xxxxx" # Optional
+export API_KEY="sk-..."
+export BASE_URL="https://..." # optional
```
**Windows PowerShell:**
```powershell
-$env:API_KEY = "your_api_key"
-$env:BASE_URL = "https://xxxxx" # Optional
+$env:API_KEY = "sk-..."
+$env:BASE_URL = "https://..." # optional
```
---
-## 🔬 Example Use Case
-
-To demonstrate the power of SkillNet, we provide a complete example of a Scientific Discovery. This scenario demonstrates how an AI Agent leverages the SkillNet infrastructure to autonomously plan and execute a complex scientific mission—from raw data processing to clinical validation.
-
-<div align="center"> <img src="images/science.gif" width="100%" alt="Scientific Discovery Demo"> </div>
+## 🔬 Example: Scientific Discovery
-👉 **[Try the Interactive Demo (Website: Scenarios->Science)](http://skillnet.openkg.cn/)**
+A complete end-to-end demo showing how an AI Agent uses SkillNet to autonomously plan and execute a complex scientific workflow — from raw scRNA-seq data to a cancer target validation report.
-### 🧬 Workflow Lifecycle
-
-- Task Definition: User provides a goal: "Analyze scRNA-seq data to find cancer targets."
-- AI Planning: The Agent decomposes the mission into logical steps (Data $\rightarrow$ Mechanism $\rightarrow$ Validation $\rightarrow$ Report).
-- Skill Discovery: The Agent uses client.search() to find specialized skills like cellxgene-census and kegg-database.
-- Acquisition & Orchestration: Skills are downloaded, quality-evaluated via client.evaluate(), and mapped for dependencies.
-- Execution: The skills are executed sequentially to generate a final discovery report.
-
-### 🚀 Try it yourself
+<div align="center">
+ <img src="images/science.gif" width="100%" alt="Scientific Discovery Workflow">
+</div>
-You can explore the full implementation, in our interactive Jupyter Notebook:
+<table>
+<tr><td>1️⃣</td><td><b>Task</b></td><td>User provides a goal: "Analyze scRNA-seq data to find cancer targets"</td></tr>
+<tr><td>2️⃣</td><td><b>Plan</b></td><td>Agent decomposes into: Data → Mechanism → Validation → Report</td></tr>
+<tr><td>3️⃣</td><td><b>Discover</b></td><td><code>client.search()</code> finds <em>cellxgene-census</em>, <em>kegg-database</em>, etc.</td></tr>
+<tr><td>4️⃣</td><td><b>Evaluate</b></td><td>Skills are quality-gated via <code>client.evaluate()</code> before use</td></tr>
+<tr><td>5️⃣</td><td><b>Execute</b></td><td>Skills run sequentially to produce a final discovery report</td></tr>
+</table>
-👉 **[View Scientific Discovery Demo (Notebook)](https://github.com/zjunlp/SkillNet/blob/main/examples/scientific_workflow_demo.ipynb)**
+👉 **[Try the Interactive Demo](http://skillnet.openkg.cn/)** (Website → Scenarios → Science)
+&nbsp;|&nbsp;
+📓 **[View Notebook](https://github.com/zjunlp/SkillNet/blob/main/examples/scientific_workflow_demo.ipynb)**
---
## 🤖 OpenClaw Integration
-SkillNet integrates with [OpenClaw](https://github.com/openclaw/openclaw) (open-source personal AI agent framework) as a built-in, lazy-loaded skill. You do **not** need OpenClaw's source code — only a working OpenClaw install. Once loaded, the agent automatically:
+SkillNet integrates with [OpenClaw](https://github.com/openclaw/openclaw) as a built-in, lazy-loaded skill. Once installed, your agent automatically:
-- **Searches & applies** existing skills before tackling complex or unfamiliar tasks
-- **Creates skills** from GitHub repos, documents (PDF/PPT/Word), or completed work via `skillnet create`
-- **Evaluates & analyzes** your local skill library for quality scores and inter-skill relationships
+- **Searches** existing skills before starting complex tasks
+- **Creates** new skills from repos, documents, or completed work
+- **Evaluates & analyzes** your local library for quality and inter-skill relationships
-This forms a closed loop: community skills guide execution → successful outcomes become new skills → periodic analysis keeps the library clean.
+> Community skills guide execution → successful outcomes become new skills → periodic analysis keeps the library clean.
-<div align="center"> <img src="images/openclaw_skillnet.gif" width="100%" alt="OpenClaw + SkillNet Demo"> </div>
-
-### 📋 Prerequisites
+<div align="center">
+ <img src="images/openclaw_skillnet.gif" width="100%" alt="OpenClaw + SkillNet Demo">
+</div>
-- [OpenClaw](https://github.com/openclaw/openclaw) installed with a configured workspace (default: `~/.openclaw/workspace`)
-- No OpenClaw repo checkout is required
+<details>
+<summary><b>📥 Installation</b></summary>
-### 📥 Install via ClawHub (Recommended)
+**Prerequisites:** [OpenClaw](https://github.com/openclaw/openclaw) installed (default workspace: `~/.openclaw/workspace`)
**Option A — CLI:**
```bash
-# 1. Install ClawHub CLI (once)
npm i -g clawhub
-
-# 2. Install the skill into your OpenClaw workspace (pick one)
-cd ~/.openclaw/workspace && clawhub install skillnet
-# — or from anywhere —
clawhub install skillnet --workdir ~/.openclaw/workspace
-
-# 3. Restart OpenClaw so it discovers the new skill
-openclaw gateway restart # or simply start a new chat session
+openclaw gateway restart
```
**Option B — Via OpenClaw chat:**
-Simply tell your agent:
-
```
Install the skillnet skill from ClawHub.
```
-The skill lands at `<workspace>/skills/skillnet` — workspace skills take precedence over global and bundled ones.
+</details>
-### 🧪 Quick Verification
+<details>
+<summary><b>🧪 Quick Verification</b></summary>
In your OpenClaw chat, try:
@@ -511,35 +382,67 @@ Search SkillNet for a "docker" skill and summarize the top result.
Create a skill from this GitHub repo: https://github.com/owner/repo (then evaluate it).
```
-> 👉 The source of this skill package is also available at [`skills/skillnet/`](skills/skillnet/) for reference, but the recommended install method is via **ClawHub** as shown above.
+</details>
+
+> The skill source is also available at [`skills/skillnet/`](skills/skillnet/) for reference.
---
## 📂 Skill Structure
-Standardized structure for all SkillNet packages:
+Every SkillNet package follows a standardized layout:
```text
skill-name/
-├── SKILL.md # [Required] Metadata (YAML) + Instructions
-├── scripts/ # [Optional] Executable Python/Bash scripts
-├── references/ # [Optional] Static docs or API specs
-└── assets/ # [Optional] Icons, templates, examples
+├── SKILL.md # [Required] YAML metadata + markdown instructions
+├── scripts/ # [Optional] Executable Python / Bash scripts
+├── references/ # [Optional] Static docs, API specs, schemas
+└── assets/ # [Optional] Templates, icons, examples
```
---
## 🗺 Roadmap
-- ✅ Keyword Match & Semantic Search
-- ✅ Skill Installer
-- ✅ Skill Creator (Local File & GitHub Repository)
-- ✅ Skill Evaluation & Scoring
-- ✅ Skill Relationship Analysis
+- [x] Keyword match & semantic search
+- [x] One-line skill installer
+- [x] Skill creator (trajectory · GitHub · office docs · prompt)
+- [x] 5-dimension quality evaluation
+- [x] Skill relationship analysis
+- [ ] Skill versioning & dependency resolution
+- [ ] Community skill marketplace
+- [ ] Multi-agent collaborative skill execution
+
+---
## 🤝 Contributing
-Contributions are welcome! Please submit a Pull Request or open an Issue on GitHub.
+Contributions of all kinds are welcome! Whether it's fixing a typo, adding a feature, or sharing a new skill — every contribution counts.
+
+1. **Fork** the repository
+2. **Create** a feature branch (`git checkout -b feat/amazing-feature`)
+3. **Commit** your changes (`git commit -m 'feat: add amazing feature'`)
+4. **Push** to the branch (`git push origin feat/amazing-feature`)
+5. **Open** a Pull Request
+
+You can also [open an Issue](https://github.com/zjunlp/SkillNet/issues) to report bugs or suggest features.
+
+---
+
+## 📝 Citation
+
+If you find SkillNet useful in your research, please consider citing:
+
+```bibtex
+@misc{skillnet2025,
+ title={SkillNet: Open Infrastructure for Creating, Evaluating, and Connecting AI Agent Skills},
+ author={SkillNet Team},
+ year={2025},
+ url={http://skillnet.openkg.cn}
+}
+```
+
+---
## 📄 License
diff --git a/skillnet-ai/README.md b/skillnet-ai/README.md
index b540e57..87f2ff0 100644
--- a/skillnet-ai/README.md
+++ b/skillnet-ai/README.md
@@ -1,385 +1,293 @@
+<div align="center">
+
# skillnet-ai
-[![PyPI version](https://badge.fury.io/py/skillnet-ai.svg)](https://badge.fury.io/py/skillnet-ai)
+**The official Python SDK & CLI for [SkillNet](http://skillnet.openkg.cn/) — search, install, create, evaluate, and connect AI agent skills.**
+
+[![PyPI version](https://badge.fury.io/py/skillnet-ai.svg)](https://pypi.org/project/skillnet-ai/)
+[![Downloads](https://img.shields.io/pypi/dm/skillnet-ai.svg)](https://pypi.org/project/skillnet-ai/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
-**skillnet-ai** is the official Python Toolkit for interacting with the SkillNet platform. It allows AI Agents to **Create**, **Evaluate** and **Organize** AI skills at scale. It functions seamlessly as both a powerful Python Library and a feature-rich Command Line Interface (CLI).
-
----
-
-## 🚀 Features
+[Website](http://skillnet.openkg.cn/) · [GitHub](https://github.com/zjunlp/SkillNet) · [PyPI](https://pypi.org/project/skillnet-ai/)
-- **🔍 Search**: Find skills using keywords match or semantic search.
-- **📦 One-Line Installation**: Download skill packages directly from GitHub repositories.
-- **✨ Skill Creation**: Automatically convert various sources into structured, reusable `skill` packages using LLMs:
- - Execution trajectories / conversation logs
- - GitHub repositories
- - Office documents (PDF, PPT, Word)
- - Direct text prompts
-- **📊 Evaluation**: Evaluate and score skills for quality assurance (Safety, Completeness, Excutability, Maintainability, Cost-Awareness).
-- **🕸️ Relationship Analysis**: Automatically map the connections between skills in your local library, identifying structural relationships between skills (similar_to, belong_to, compose_with, depend_on).
+</div>
---
-## 📥 Installation
+## Quick Start
```bash
pip install skillnet-ai
```
+```python
+from skillnet_ai import SkillNetClient
+
+client = SkillNetClient() # No API key needed for search & download
+
+# Find a skill
+results = client.search(q="pdf", limit=5)
+print(results[0].skill_name, results[0].stars)
+
+# Install it
+client.download(url=results[0].skill_url, target_dir="./my_skills")
+```
+
+That's it. Search and download are free — no API key, no rate limit.
+
+> For **create**, **evaluate**, and **analyze**, set `API_KEY` (any OpenAI-compatible key). See [Configuration](#%EF%B8%8F-configuration).
+
---
-## 🛠 Usage (Python SDK)
+## Features
-The `SkillNetClient` provides a unified interface for searching, downloading, creating, and evaluating skills.
+| | Feature | What it does |
+| :-- | :----------- | :----------------------------------------------------------------------------------------------------- |
+| 🔍 | **Search** | Keyword match or AI semantic search across 500+ community skills |
+| 📦 | **Install** | One-line download from any GitHub skill directory |
+| ✨ | **Create** | Auto-convert repos, PDFs, conversation logs, or text prompts → structured skill packages |
+| 📊 | **Evaluate** | Score skills on 5 dimensions: Safety · Completeness · Executability · Maintainability · Cost-Awareness |
+| 🕸️ | **Analyze** | Map `similar_to` · `belong_to` · `compose_with` · `depend_on` relationships between skills |
+
+---
-### 1. Initialize the Client
+## Python SDK
-Initialize the client with your credentials. You can also set `API_KEY` and `GITHUB_TOKEN` in your environment variables.
+### Initialize
```python
from skillnet_ai import SkillNetClient
-# Initialize with optional credentials
client = SkillNetClient(
- api_key="sk-...", # Required for Create, Evaluate, and Analyze functions
- # base_url="...", # Optional custom LLM base URL
- # github_token="ghp-..." # Optional, for private repos or higher rate limits
+ api_key="sk-...", # Required for create / evaluate / analyze
+ # base_url="...", # Optional: custom LLM endpoint (default: OpenAI)
+ # github_token="ghp-..." # Optional: for private repos or higher rate limits
)
```
-### 2. Search for Skills
-Perform keywords match or semantic searches to find skills.
+Credentials can also be set via environment variables: `API_KEY`, `BASE_URL`, `GITHUB_TOKEN`.
+
+### Search
```python
-# 1. Standard Keywords Match
-results = client.search(q="pdf")
+# Keyword search
+results = client.search(q="pdf", limit=10, min_stars=5, sort_by="stars")
-# 2. Semantic Search
-results = client.search(q="Help me analyze financial PDF reports", mode="vector")
+# Semantic search — find skills by meaning, not just keywords
+results = client.search(q="analyze financial PDF reports", mode="vector", threshold=0.85)
if results:
- top_skill = results[0]
- print(f"Found: {top_skill.skill_name} (Stars: {top_skill.stars})")
- print(f"URL: {top_skill.skill_url}")
+ print(f"{results[0].skill_name} ⭐{results[0].stars}")
+ print(results[0].skill_url)
```
-#### Parameter Reference
-| Parameter | Type | Default | Description |
-|------------|--------|-------------|-------------|
-| q | str | Required | Search query (keywords or natural language). |
-| mode | str | "keyword" | Search mode: "keyword" or "vector". |
-| category | str | None | Filter skills by category. |
-| limit | int | 20 | Maximum number of results per request. |
-| page | int | 1 | [Keyword Mode Only] Page number for pagination. |
-| min_stars | int | 0 | [Keyword Mode Only] Filter by minimum star count. |
-| sort_by | str | "stars" | [Keyword Mode Only] Sort by "stars" or "recent". |
-| threshold | float | 0.8 | [Vector Mode Only] Minimum similarity threshold (0.0 - 1.0). |
-
-
-### 3. Install Skills
-Download and install a skill directly from a URL (e.g., from above search results) into your local workspace.
-```python
-skill_url = "https://github.com/anthropics/skills/tree/main/skills/skill-creator"
-
-try:
- # Downloads to ./my_agent_skills
- local_path = client.download(url=skill_url, target_dir="./my_agent_skills")
- print(f"Skill successfully installed at: {local_path}")
-except Exception as e:
- print(f"Download failed: {e}")
-```
+<details>
+<summary><b>Search Parameters</b></summary>
-### 4. Create Skills
-#### 4.1 Create from Local Trajectory
-Turn conversation logs or execution traces into a polished Skill Package (SKILL.md, scripts, etc.).
-
-```python
-# 1. Prepare your trajectory (e.g., a conversation log string)
-trajectory_log = """
-User: I need to rename all .jpg files in this folder to .png.
-Agent: I will write a python script to iterate through the folder...
-Agent: Script executed. Renamed 5 files.
-"""
-
-# 2. Generate Skills
-# Returns a list of paths to the generated skill folders
-created_paths = client.create(
- trajectory_content=trajectory_log,
- output_dir="./created_skills",
- model="gpt-4o"
-)
+| Parameter | Type | Default | Description |
+| :---------- | :---- | :---------- | :------------------------------------------- |
+| `q` | str | _required_ | Search query (keywords or natural language) |
+| `mode` | str | `"keyword"` | `"keyword"` or `"vector"` |
+| `category` | str | `None` | Filter by category |
+| `limit` | int | `20` | Max results per request |
+| `page` | int | `1` | Page number _(keyword only)_ |
+| `min_stars` | int | `0` | Minimum star count _(keyword only)_ |
+| `sort_by` | str | `"stars"` | `"stars"` or `"recent"` _(keyword only)_ |
+| `threshold` | float | `0.8` | Similarity threshold 0.0–1.0 _(vector only)_ |
-print(f"Created {len(created_paths)} new skills.")
-for path in created_paths:
- print(f"- {path}")
-```
+</details>
-#### 4.2 Create from GitHub Repository
-Convert an existing GitHub repository into a skill package.
+### Install
```python
-# Create skill from a GitHub repository
-created_paths = client.create(
- github_url="https://github.com/zjunlp/DeepKE",
- output_dir="./created_skills",
- model="gpt-4o"
+local_path = client.download(
+ url="https://github.com/anthropics/skills/tree/main/skills/skill-creator",
+ target_dir="./my_skills"
)
+print(f"Installed at: {local_path}")
```
-#### 4.3 Create from Office Documents
-Convert PDF, PowerPoint, or Word documents into skill packages.
+### Create
+
+Convert diverse sources into structured skill packages:
```python
-# Create skill from a PDF document
-created_paths = client.create(
- office_file="./docs/user_guide.pdf",
- output_dir="./created_skills"
-)
-```
+# From conversation logs / execution traces
+client.create(trajectory_content="User: rename .jpg→.png\nAgent: Done.", output_dir="./skills")
-#### 4.4 Create from Prompt
-Generate a skill directly from a text description.
+# From a GitHub repository
+client.create(github_url="https://github.com/zjunlp/DeepKE", output_dir="./skills")
-```python
-# Create skill from a prompt description
-created_paths = client.create(
- prompt="Create a skill for web scraping that extracts article titles and content",
- output_dir="./created_skills"
-)
+# From office documents (PDF / PPT / Word)
+client.create(office_file="./guide.pdf", output_dir="./skills")
+
+# From a natural language description
+client.create(prompt="A skill for web scraping article titles", output_dir="./skills")
```
-### 5. Skill Evaluation
-Assess the Safety, Completeness, Executability, Maintainability and Cost-Awareness of a skill. Supports both remote GitHub URLs and local directories.
+All modes auto-generate a complete skill package: `SKILL.md` + optional `scripts/`, `references/`, `assets/`.
-```python
-# Evaluate from local directory
-# target_skill = "./my_skills/web_search"
+### Evaluate
-# Evaluate from GitHub URL (uses github_token if provided during initialization)
-target_skill = "https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"
+Score any skill on 5 quality dimensions. Accepts local paths or GitHub URLs:
-result = client.evaluate(target=target_skill)
-print(f"Evaluation Result: {result}")
+```python
+result = client.evaluate(
+ target="https://github.com/anthropics/skills/tree/main/skills/algorithmic-art"
+)
+# {
+# "safety": {"level": "Good", "reason": "..."},
+# "completeness": {"level": "Good", "reason": "..."},
+# "executability": {"level": "Average", "reason": "..."},
+# "maintainability": {"level": "Good", "reason": "..."},
+# "cost_awareness": {"level": "Good", "reason": "..."}
+# }
```
-### 6. Skill Relationship Analysis
-Analyze a local directory containing multiple skills to infer a relationship graph. It identifies relationships like dependencies (depend_on), collaboration (compose_with), hierarchy (belong_to), and alternatives (similar_to).
+### Analyze Relationships
-```python
-# Directory containing multiple skill folders
-skills_directory = "./my_agent_skills"
+Discover connections between skills in a local directory:
-# Analyze relationships between skills
-# This will also save a 'relationships.json' in the directory by default
-relationships = client.analyze(skills_dir=skills_directory)
+```python
+relationships = client.analyze(skills_dir="./my_skills")
-# Display the relationships
for rel in relationships:
print(f"{rel['source']} --[{rel['type']}]--> {rel['target']}")
- # Output: PDF_Parser --[compose_with]--> Text_Summarizer
+# PDF_Parser --[compose_with]--> Text_Summarizer
+# Web_Scraper --[similar_to]--> Data_Extractor
```
+Detects four relationship types: `similar_to` · `belong_to` · `compose_with` · `depend_on`. Results are saved to `relationships.json` by default.
+
---
-## 💻 CLI Usage
+## CLI
+
+The CLI ships automatically with `pip install skillnet-ai` — powered by [Typer](https://typer.tiangolo.com/) + [Rich](https://rich.readthedocs.io/) for beautiful terminal output.
-skillnet-ai provides a robust Command Line Interface (CLI) powered by `Typer` and `Rich`. It allows you to create, evaluate, and organize skills directly from the terminal with visual feedback.
+```
+skillnet <command> --help # Full options for any command
+```
-**Tip:** You can view the full list of options for any command using `--help` (e.g., `skillnet search --help`).
+### Commands at a Glance
-### 1. Search Skills (`search`)
+| Command | What it does | Example |
+| :--------- | :--------------------- | :------------------------------------ |
+| `search` | Find skills | `skillnet search "pdf" --mode vector` |
+| `download` | Install a skill | `skillnet download <url> -d ./skills` |
+| `create` | Create from any source | `skillnet create log.txt -d ./skills` |
+| `evaluate` | Quality report | `skillnet evaluate ./my_skill` |
+| `analyze` | Relationship graph | `skillnet analyze ./my_skills` |
-Search the registry using keywords match or semantic search.
+### Search
```bash
-# Basic keywords match
skillnet search "pdf"
-
-# Semantic/Vector search (finds skills by meaning)
-skillnet search "Help me analyze financial PDF reports" --mode vector --threshold 0.85
-
-# Filter by category and sort results
+skillnet search "analyze financial reports" --mode vector --threshold 0.85
skillnet search "visualization" --category "Development" --sort-by stars --limit 10
```
-#### Key Options:
-
-| Option | Type | Default | Description |
-|--------------|-------|----------|-------------|
-| q (Argument) | str | Required | Your search query (keywords or natural language description). |
-| --mode | str | keyword | Search mode: keyword (fuzzy match) or vector (AI semantic). |
-| --category | str | None | Filter results by category (e.g., `Development`, `Business`). |
-| --limit | int | 20 | Maximum number of results to return. |
-| **[Keyword Mode Only]** | | | |
-| --page | int | 1 | Page number for pagination. |
-| --min-stars | int | 0 | Minimum star rating required. |
-| --sort-by | str | stars | Sort criteria: stars or recent. |
-| **[Vector Mode Only]** | | | |
-| --threshold | float | 0.8 | Similarity threshold (0.0–1.0). Higher is stricter. |
-
-
-### 2. Install Skills (`download`)
-
-Download and install a skill directly from a GitHub repository subdirectory.
+### Install
```bash
-# Download to the current directory
skillnet download https://github.com/anthropics/skills/tree/main/skills/algorithmic-art
-
-# Download to a specific target directory
-skillnet download https://github.com/anthropics/skills/tree/main/skills/algorithmic-art -d ./my_agent/skills
-
-# Download from a private repository
+skillnet download <url> -d ./my_agent/skills
skillnet download <private_url> --token <your_github_token>
```
-### 3. Create Skills (`create`)
-
-Generate structured Skill Packages from various sources using LLMs.
-
-**Linux/macOS:**
+### Create
```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
+skillnet create ./logs/trajectory.txt -d ./skills # from trajectory
+skillnet create --github https://github.com/owner/repo # from GitHub repo
+skillnet create --office ./docs/guide.pdf # from PDF/PPT/Word
+skillnet create --prompt "A skill for table extraction" # from prompt
+skillnet create --office report.pdf --model gpt-4o # custom model
```
-**Windows PowerShell:**
-
-```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
-```
-
-**Usage Examples:**
+### Evaluate
```bash
-# From a trajectory file
-skillnet create ./logs/trajectory.txt -d ./generated_skills
-
-# From a GitHub repository
-skillnet create --github https://github.com/owner/repo
-
-# From an office document (PDF, PPT, Word)
-skillnet create --office ./docs/guide.pdf
-
-# From a direct prompt
-skillnet create --prompt "Create a skill for extracting tables from images"
-
-# Specify a custom model
-skillnet create --office report.pdf --model gpt-4o
+skillnet evaluate ./my_skills/web_search
+skillnet evaluate https://github.com/anthropics/skills/tree/main/skills/algorithmic-art
+skillnet evaluate ./my_skill --category "Development" --model gpt-4o
```
-### 4. Evaluate Skills (`evaluate`)
-Generate a comprehensive quality report (Safety, Completeness, Executability, Maintainability, Cost-Awareness) for a skill.
-
-**Linux/macOS:**
+### Analyze
```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
-```
-
-**Windows PowerShell:**
-
-```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
+skillnet analyze ./my_skills
+skillnet analyze ./my_skills --no-save # print only, don't write file
+skillnet analyze ./my_skills --model gpt-4o
```
-**Usage Examples:**
+---
-```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-# Evaluate a remote skill via GitHub URL
-skillnet evaluate https://github.com/anthropics/skills/tree/main/skills/algorithmic-art
+## ⚙️ Configuration
-# Evaluate a local skill directory
-skillnet evaluate ./my_skills/web_search
+### Environment Variables
-# Custom evaluation config
-skillnet evaluate ./my_skills/tool --category "Development" --model gpt-4o
-```
+| Variable | Required For | Default |
+| :------------- | :--------------------------------- | :-------------------------- |
+| `API_KEY` | `create` · `evaluate` · `analyze` | — |
+| `BASE_URL` | Custom LLM endpoint | `https://api.openai.com/v1` |
+| `GITHUB_TOKEN` | Private repos / higher rate limits | — |
-### 5. Analyze Relationships (`analyze`)
-Scan a directory of skills to analyze their connections using AI.
+> `search` and `download` (public repos) require **no credentials at all**.
-**Linux/macOS:**
+**Linux / macOS:**
```bash
-# Requirement: Ensure API_KEY is set in your environment variables.
-export API_KEY=sk-xxxxx
-export BASE_URL=xxxxxx # Optional custom LLM base URL
+export API_KEY="sk-..."
+export BASE_URL="https://..." # optional
```
**Windows PowerShell:**
```powershell
-# Requirement: Ensure API_KEY is set in your environment variables.
-$env:API_KEY = "sk-xxxxx"
-$env:BASE_URL = "xxxxxx" # Optional custom LLM base URL
+$env:API_KEY = "sk-..."
+$env:BASE_URL = "https://..." # optional
```
-**Usage Examples:**
+Or pass credentials directly in code:
-```bash
-# Analyze a directory containing multiple skill folders
-skillnet analyze ./my_agent_skills
-
-# Analyze without saving the result file (just print to console)
-skillnet analyze ./my_agent_skills --no-save
-
-# Specify a model for the analysis
-skillnet analyze ./my_agent_skills --model gpt-4o
+```python
+client = SkillNetClient(api_key="sk-...", base_url="https://...")
```
-## ⚙️ Configuration
-
-### Environment Variables
-
-If you are using the **Creation**, **Evaluation**, or **Analyze** feature, you must configure your LLM provider.
-
-| Variable | Description | Default |
-| :--- | :--- | :--- |
-| `API_KEY` | Required for creating or evaluating skills. | `None` |
-| `BASE_URL` | Optional. Useful if using a proxy or compatible API. | `https://api.openai.com/v1` |
-
---
## 📂 Skill Structure
-When you create or install a skill, it follows the **Standard Skill Structure**:
+Every created or downloaded skill follows a standardized layout:
```text
skill-name/
-├── SKILL.md # (required) Main orchestration file (YAML metadata + Instructions)
-├── scripts/ # (optional) Executable Python/Bash scripts
-├── references/ # (optional) Static documentation or API specs
-└── assets/ # (optional) Templates, icons, etc.
+├── SKILL.md # [Required] YAML metadata + markdown instructions
+├── scripts/ # [Optional] Executable Python / Bash scripts
+├── references/ # [Optional] Static docs, API specs, schemas
+└── assets/ # [Optional] Templates, icons, examples
```
---
## 🗺 Roadmap
-- ✅ Keyword Match & Semantic Search
-- ✅ Skill Installer
-- ✅ Skill Creator (Local File & GitHub Repository)
-- ✅ Skill Evaluation & Scoring
-- ✅ Skill Relationship Analysis
+- [x] Keyword match & semantic search
+- [x] One-line skill installer
+- [x] Skill creator (trajectory · GitHub · office docs · prompt)
+- [x] 5-dimension quality evaluation
+- [x] Skill relationship analysis
+- [ ] Skill versioning & dependency resolution
+- [ ] Community skill marketplace
---
## 🤝 Contributing
-Contributions are welcome! Please submit a Pull Request or open an Issue on GitHub.
+Contributions are welcome! Feel free to [open an Issue](https://github.com/zjunlp/SkillNet/issues) or submit a Pull Request.
## 📄 License
-This project is licensed under the [MIT License](LICENSE).
+[MIT](LICENSE)
diff --git a/skills/skillnet/SKILL.md b/skills/skillnet/SKILL.md
index 7bfa603..8582e26 100644
--- a/skills/skillnet/SKILL.md
+++ b/skills/skillnet/SKILL.md
@@ -20,25 +20,18 @@ metadata:
"install":
[
{
- "id": "script",
- "kind": "shell",
- "command": "bash {baseDir}/scripts/install_skillnet.sh",
- "bins": ["skillnet"],
- "label": "Auto-detect best method (recommended, handles PEP 668 + PATH)",
- },
- {
- "id": "uv",
+ "id": "pipx",
"kind": "shell",
- "command": 'curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" && (uv pip install --system skillnet-ai 2>/dev/null || (uv venv $HOME/.local/share/skillnet/venv && VIRTUAL_ENV=$HOME/.local/share/skillnet/venv uv pip install skillnet-ai && mkdir -p $HOME/.local/bin && ln -sf $HOME/.local/share/skillnet/venv/bin/skillnet $HOME/.local/bin/skillnet))',
+ "command": "pipx install skillnet-ai",
"bins": ["skillnet"],
- "label": "Install skillnet-ai via uv (with venv fallback)",
+ "label": "Install skillnet-ai via pipx (recommended, isolated environment)",
},
{
- "id": "pipx",
+ "id": "pip",
"kind": "shell",
- "command": "pipx install skillnet-ai",
+ "command": "pip install skillnet-ai",
"bins": ["skillnet"],
- "label": "Install skillnet-ai via pipx",
+ "label": "Install skillnet-ai via pip",
},
],
},
@@ -104,16 +97,16 @@ Download a skill and **immediately** load it into your current context:
# Download to local skill library
# <skill-url> must point to a specific skill subdirectory, e.g.:
# https://github.com/openclaw/openclaw/tree/main/skills/summarize
-skillnet download "<skill-url>" -d ~/.openclaw/skills
+skillnet download "<skill-url>" -d ~/.openclaw/workspace/skills
# Read SKILL.md — the skill's core instructions (always read this first)
-cat ~/.openclaw/skills/<skill-name>/SKILL.md
+cat ~/.openclaw/workspace/skills/<skill-name>/SKILL.md
# Read scripts and references relevant to current task
-ls ~/.openclaw/skills/<skill-name>/scripts/ 2>/dev/null
-cat ~/.openclaw/skills/<skill-name>/scripts/<relevant-script> 2>/dev/null
-ls ~/.openclaw/skills/<skill-name>/references/ 2>/dev/null
-cat ~/.openclaw/skills/<skill-name>/references/<relevant-file> 2>/dev/null
+ls ~/.openclaw/workspace/skills/<skill-name>/scripts/ 2>/dev/null
+cat ~/.openclaw/workspace/skills/<skill-name>/scripts/<relevant-script> 2>/dev/null
+ls ~/.openclaw/workspace/skills/<skill-name>/references/ 2>/dev/null
+cat ~/.openclaw/workspace/skills/<skill-name>/references/<relevant-file> 2>/dev/null
```
No user permission needed to search, download, or load.
@@ -132,16 +125,16 @@ Apply does **not** mean blindly copy the entire skill. If the skill covers 80% o
**Dedup check** — before downloading or creating, check for existing local skills:
```bash
-ls ~/.openclaw/skills/
-grep -rl "<keyword>" ~/.openclaw/skills/*/SKILL.md 2>/dev/null
+ls ~/.openclaw/workspace/skills/
+grep -rl "<keyword>" ~/.openclaw/workspace/skills/*/SKILL.md 2>/dev/null
```
-| Found | Action |
-| ------------------------------------- | -------------------------- |
-| Same trigger + same solution | Skip download |
-| Same trigger + better solution | Replace old |
-| Overlapping domain, different problem | Keep both |
-| Outdated | `rm -rf` old → install new |
+| Found | Action |
+| ------------------------------------- | ------------------------ |
+| Same trigger + same solution | Skip download |
+| Same trigger + better solution | Replace old |
+| Overlapping domain, different problem | Keep both |
+| Outdated | Remove old → install new |
---
@@ -165,23 +158,23 @@ Four modes — auto-detected from input:
```bash
# From GitHub repo
skillnet create --github https://github.com/owner/repo \
- --output-dir ~/.openclaw/skills
+ --output-dir ~/.openclaw/workspace/skills
# From document (PDF/PPT/DOCX)
-skillnet create --office report.pdf --output-dir ~/.openclaw/skills
+skillnet create --office report.pdf --output-dir ~/.openclaw/workspace/skills
# From execution trajectory / log
-skillnet create trajectory.txt --output-dir ~/.openclaw/skills
+skillnet create trajectory.txt --output-dir ~/.openclaw/workspace/skills
# From natural-language description
skillnet create --prompt "A skill for managing Docker Compose" \
- --output-dir ~/.openclaw/skills
+ --output-dir ~/.openclaw/workspace/skills
```
**Always evaluate after creating:**
```bash
-skillnet evaluate ~/.openclaw/skills/<new-skill>
+skillnet evaluate ~/.openclaw/workspace/skills/<new-skill>
```
**Trigger → mode mapping:**
@@ -198,7 +191,7 @@ skillnet evaluate ~/.openclaw/skills/<new-skill>
Requires `API_KEY`. Scores five dimensions (Good / Average / Poor): **Safety**, **Completeness**, **Executability**, **Maintainability**, **Cost-Awareness**.
```bash
-skillnet evaluate ~/.openclaw/skills/my-skill
+skillnet evaluate ~/.openclaw/workspace/skills/my-skill
skillnet evaluate "https://github.com/owner/repo/tree/main/skills/foo"
```
@@ -209,7 +202,7 @@ skillnet evaluate "https://github.com/owner/repo/tree/main/skills/foo"
Requires `API_KEY`. Detects: `similar_to`, `belong_to`, `compose_with`, `depend_on`.
```bash
-skillnet analyze ~/.openclaw/skills
+skillnet analyze ~/.openclaw/workspace/skills
# → outputs relationships.json in the same directory
```
@@ -217,7 +210,7 @@ When skill count exceeds ~30, or when user asks to organize:
```bash
# Generate full relationship report
-skillnet analyze ~/.openclaw/skills
+skillnet analyze ~/.openclaw/workspace/skills
# Review relationships.json:
# similar_to pairs → compare & prune duplicates
@@ -225,11 +218,11 @@ skillnet analyze ~/.openclaw/skills
# belong_to → consider organizing into subdirectories
# Evaluate and compare competing skills
-skillnet evaluate ~/.openclaw/skills/skill-a
-skillnet evaluate ~/.openclaw/skills/skill-b
+skillnet evaluate ~/.openclaw/workspace/skills/skill-a
+skillnet evaluate ~/.openclaw/workspace/skills/skill-b
```
-`skillnet analyze` only generates a report — it never modifies or deletes skills. Any cleanup actions (removing duplicates, pruning low-quality skills) require user confirmation before executing.
+`skillnet analyze` only generates a report — it never modifies or deletes skills. Any cleanup actions (removing duplicates, pruning low-quality skills) require user confirmation before executing. Use safe removal (e.g., `mv <skill> ~/.openclaw/trash/`) rather than permanent deletion.
---
@@ -237,13 +230,13 @@ skillnet evaluate ~/.openclaw/skills/skill-b
During execution, if any of these occur, act immediately — do not wait for user instruction:
-| Trigger | Action |
-| ------------------------------------------- | ---------------------------------------------------------------------------- |
-| Encounter unfamiliar tool/framework/library | `skillnet search "<name>"` → download → read SKILL.md → extract useful parts |
-| User provides a GitHub URL | `skillnet create --github <url>` → evaluate → read SKILL.md → apply |
-| User shares a PDF/DOCX/PPT | `skillnet create --office <file>` → evaluate → read SKILL.md → apply |
-| User provides execution logs or data | `skillnet create <file>` → evaluate → read SKILL.md → apply |
-| Task hits a wall, no idea how to proceed | `skillnet search "<problem>" --mode vector` → check results |
+| Trigger | Action |
+| ------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| Encounter unfamiliar tool/framework/library | `skillnet search "<name>"` → download → read SKILL.md → extract useful parts |
+| User provides a GitHub URL | `skillnet create --github <url> -d ~/.openclaw/workspace/skills` → evaluate → read SKILL.md → apply |
+| User shares a PDF/DOCX/PPT | `skillnet create --office <file> -d ~/.openclaw/workspace/skills` → evaluate → read SKILL.md → apply |
+| User provides execution logs or data | `skillnet create <file> -d ~/.openclaw/workspace/skills` → evaluate → read SKILL.md → apply |
+| Task hits a wall, no idea how to proceed | `skillnet search "<problem>" --mode vector` → check results |
**Pragmatic note**: In-task triggers should not interrupt flow. If you're in the middle of producing output, finish the current step first, then trigger the search/create. If the task is time-sensitive and you already have a working approach, a search can run in parallel or be deferred to post-task.
@@ -251,21 +244,19 @@ During execution, if any of these occur, act immediately — do not wait for use
After completing a significant task, consider: was this difficult, reusable, and high-quality enough to preserve?
-If at least two are true — (1) the solution required non-obvious work, (2) it's clearly reusable, (3) the user asked to preserve it — ask for a key and create:
+If at least two are true — (1) the solution required non-obvious work, (2) it's clearly reusable, (3) the user asked to preserve it — check credentials and create:
-> 这次任务产出了有价值的可复用经验。我想用 SkillNet 的 create 把它沉淀成技能,方便以后一键复用。需要一个 OpenAI 兼容的 API_KEY(可选 BASE_URL 和模型名称,默认 gpt-4o)。只用于本次 create/evaluate,不会外传。可以现在提供吗?
+1. If `API_KEY` is already configured → proceed silently.
+2. If not → use the standard API_KEY ask template (see "Environment Variables & Credential Strategy").
+3. If user declines → acknowledge and move on.
```bash
-export API_KEY="<value>"
-# If user provided BASE_URL and model:
-export BASE_URL="<value>"
+# Credentials already available (configured or just provided)
skillnet create --prompt "A skill that teaches: [lesson]. Use when: [triggers]. Key steps: [solution]" \
- --output-dir ~/.openclaw/skills --model <model-name>
-skillnet evaluate ~/.openclaw/skills/<new-skill> --model <model-name>
+ --output-dir ~/.openclaw/workspace/skills --model <model-name>
+skillnet evaluate ~/.openclaw/workspace/skills/<new-skill> --model <model-name>
```
-If user declines → acknowledge and move on.
-
---
## Search Reference
@@ -284,7 +275,9 @@ Categories: ai-agent-building, ai-audio-speech, bioinformatics-compbio, cheminfo
Fallback: keyword returns 0 → try broader/simpler keywords → then `--mode vector --threshold 0.65`.
-## Environment Variables
+## Environment Variables & Credential Strategy
+
+### Variable Reference
| Variable | Needed for | Default |
| -------------- | ----------------------------------------- | --------------------------- |
@@ -292,25 +285,78 @@ Fallback: keyword returns 0 → try broader/simpler keywords → then `--mode ve
| `BASE_URL` | custom LLM endpoint | `https://api.openai.com/v1` |
| `GITHUB_TOKEN` | download, create --github (private repos) | — (60 req/hr without) |
-**Important**: `search` and `download` (public repos) are **completely free** — no API key, no token. Never ask for credentials before searching.
+### Command ↔ Variable Requirement
+
+| Command | `API_KEY` | `BASE_URL` | `GITHUB_TOKEN` |
+| ------------------- | ------------ | ---------- | ----------------------------- |
+| `skillnet search` | — | — | — |
+| `skillnet download` | — | — | Private repos only |
+| `skillnet create` | **Required** | Optional | `--github` private repos only |
+| `skillnet evaluate` | **Required** | Optional | — |
+| `skillnet analyze` | **Required** | Optional | — |
+
+**No env vars are required for install, search, or download (public repos).** The skill is always visible and callable without any credentials.
+
+### Just-in-Time Credential Strategy
+
+Credentials follow a **"silent if configured, ask only when needed"** pattern:
-**Just-in-time key requests** — ask when actually needed, after you've shown the user some value:
+1. **If already configured** (via `openclaw.json`, environment, or earlier in the session) → **use silently**, never re-ask.
+2. **If missing and the command needs it** → ask the user **once** using the standard templates below.
+3. **If the user declines** → acknowledge and continue the main task. Never block.
-- Before `create`/`evaluate`/`analyze`: check `API_KEY`. If empty → ask:
+**Execution convention** — inject credentials for the current invocation only:
- > **中文**: 我想用 SkillNet 的 create 把这次方案沉淀成一个可复用技能,方便以后一键复用与分享。需要一个 OpenAI 兼容的 API_KEY(可选 BASE_URL 和模型名称,默认 gpt-4o)。只会用于本次 create/evaluate,不会外传。可以现在提供吗?
- >
- > **English**: I'd like to use SkillNet create to package our solution as a reusable skill. This needs an OpenAI-compatible API_KEY (optionally BASE_URL and model name, default gpt-4o). It will only be used for create/evaluate in this run. May I proceed with your key now?
+```bash
+# One-shot injection (does not pollute the global environment)
+API_KEY="..." BASE_URL="..." skillnet create --prompt "..." --output-dir ~/.openclaw/workspace/skills
+
+# Or export for the session if multiple commands follow
+export API_KEY="<value>"
+export BASE_URL="<value>" # only if user provided
+export GITHUB_TOKEN="<value>" # only if needed
+```
- Then `export API_KEY="<value>"` (and `export BASE_URL` + `--model` if provided) and proceed.
- If user declines → continue the main task.
+Never tell the user to set env vars themselves — ask for the value, inject it, proceed.
-- If `download` or `create --github` fails (403/rate-limit): check `GITHUB_TOKEN`. If empty → ask:
- > "The download hit a GitHub rate limit. A Personal Access Token (classic, repo scope) would resolve this. Could you provide one?"
- > Then `export GITHUB_TOKEN="<value>"` and retry.
- > If user declines → proceed without that skill.
+### Standard Ask Templates
-Never tell user to set env vars themselves — ask for the value, export it, proceed. Never block the main task on a missing key.
+**API_KEY** — triggered before `create`/`evaluate`/`analyze` when not configured:
+
+> I need an OpenAI-compatible API_KEY (used only for create/evaluate/analyze in this run). Optionally provide BASE_URL and model name (default gpt-4o). May I proceed with your key?
+
+**GITHUB_TOKEN** — triggered only on private repo access or rate-limit (403):
+
+> We hit GitHub rate limits or need private repo access. Can you share a read-only Personal Access Token (`repo:read` scope)?
+
+**BASE_URL** — triggered only if user explicitly wants a custom endpoint but hasn't provided one:
+
+> Would you like to use a custom LLM BASE_URL? (default `https://api.openai.com/v1`)
+
+### OpenClaw Pre-Configuration (Silent Use)
+
+If credentials are provided in `openclaw.json`, they are injected automatically — no prompts, no interruptions:
+
+```json
+{
+ "skills": {
+ "entries": {
+ "skillnet": {
+ "enabled": true,
+ "apiKey": "sk-xxxx",
+ "env": {
+ "BASE_URL": "https://api.openai.com/v1",
+ "GITHUB_TOKEN": "ghp_xxx"
+ }
+ }
+ }
+ }
+}
+```
+
+- `apiKey` → injected as `API_KEY` (bound via `primaryEnv` in metadata).
+- `env.BASE_URL` / `env.GITHUB_TOKEN` → injected as environment variables.
+- Once configured, all commands run silently without asking the user.
---
@@ -331,8 +377,8 @@ skillnet search "langgraph supervisor agent" --mode vector --threshold 0.65
**Step 2 — Download & Selective Apply:**
```bash
-skillnet download "https://github.com/.../langgraph-supervisor-template" -d ~/.openclaw/skills
-cat ~/.openclaw/skills/langgraph-supervisor-template/SKILL.md
+skillnet download "https://github.com/.../langgraph-supervisor-template" -d ~/.openclaw/workspace/skills
+cat ~/.openclaw/workspace/skills/langgraph-supervisor-template/SKILL.md
# → Useful: supervisor routing pattern, state schema design, tool-calling conventions
# → Not useful: generic example agents (we need "search→code→review" specifically)
```
@@ -345,9 +391,9 @@ User says: "Also reference https://github.com/langchain-ai/langgraph for the lat
```bash
# API_KEY needed → ask user (they've already seen initial progress, so this is non-disruptive)
-skillnet create --github https://github.com/langchain-ai/langgraph --output-dir ~/.openclaw/skills
-skillnet evaluate ~/.openclaw/skills/langgraph
-cat ~/.openclaw/skills/langgraph/SKILL.md
+skillnet create --github https://github.com/langchain-ai/langgraph --output-dir ~/.openclaw/workspace/skills
+skillnet evaluate ~/.openclaw/workspace/skills/langgraph
+cat ~/.openclaw/workspace/skills/langgraph/SKILL.md
# → Now have detailed API patterns to improve the implementation
```
@@ -359,8 +405,8 @@ The "search→code→review" pipeline required non-obvious routing logic (condit
skillnet create --prompt "Multi-agent code pipeline with LangGraph: searcher→coder→reviewer \
with conditional retry routing when review fails. Use when: building multi-agent code generation \
systems. Key: use Command for dynamic routing, separate state channels per agent." \
- --output-dir ~/.openclaw/skills
-skillnet evaluate ~/.openclaw/skills/langgraph-code-pipeline
+ --output-dir ~/.openclaw/workspace/skills
+skillnet evaluate ~/.openclaw/workspace/skills/langgraph-code-pipeline
# → Safety: Good, Completeness: Good, Executability: Average — acceptable
```
@@ -372,3 +418,23 @@ skillnet evaluate ~/.openclaw/skills/langgraph-code-pipeline
- `skillnet create` outputs a standard skill directory with SKILL.md — no post-processing needed.
- For CLI flags, REST API, and Python SDK reference, see `{baseDir}/references/api-reference.md`.
- For workflow patterns and decision recipes, see `{baseDir}/references/workflow-patterns.md`.
+
+## Security & Privacy Notes
+
+### Credential Scope
+
+- **API_KEY**: Used solely for authenticating with your chosen LLM endpoint (`BASE_URL`). It is **never** sent to the SkillNet search API or any other third party.
+- **GITHUB_TOKEN**: Sent only to `api.github.com` to access repositories. Only `repo:read` scope is needed. Never forwarded to any other service.
+
+### Network Endpoints
+
+- **search / download**: Only the query string is sent to `https://api-skillnet.openkg.cn`. No local files, credentials, or personal data are transmitted.
+- **create / evaluate / analyze**: Content is processed via the LLM endpoint you configure (`BASE_URL`, default: `https://api.openai.com/v1`). No data is sent to the SkillNet service for these operations.
+- **Local/air-gapped friendly**: Point `BASE_URL` to a local endpoint (e.g., `http://127.0.0.1:8000/v1` for vLLM, LM Studio, Ollama).
+
+### Output & Side Effects
+
+- **No background processes**: The CLI runs only when invoked and exits immediately after producing output.
+- **No system modifications**: Installation uses standard Python package managers (`pipx` or `pip`). No remote shell scripts are executed.
+- **Local output only**: Created skills are written to the specified output directory and nowhere else.
+- `skillnet analyze` only generates a report — it never modifies or deletes skills.
diff --git a/skills/skillnet/references/api-reference.md b/skills/skillnet/references/api-reference.md
index c99405f..c59ac99 100644
--- a/skills/skillnet/references/api-reference.md
+++ b/skills/skillnet/references/api-reference.md
@@ -2,7 +2,9 @@
## REST API (Public, No Auth)
-**Base URL**: `http://api-skillnet.openkg.cn/v1`
+**Base URL**: `https://api-skillnet.openkg.cn/v1`
+
+> **Data handling**: The search API only sends your query string to return matching skills. No local files, credentials, or personal data are transmitted during search or download operations.
### `GET /search`
@@ -53,7 +55,7 @@
## CLI Commands
-Install: `pip install skillnet-ai` (provides `skillnet` command)
+Install: `pip install skillnet-ai` or `pipx install skillnet-ai` (provides `skillnet` command)
### `skillnet search`
@@ -83,7 +85,7 @@ Arguments:
Options:
-d, --target-dir TEXT Local install directory [default: .]
- --token TEXT GitHub token override
+ -t, --token TEXT GitHub token override
```
### `skillnet create`
@@ -205,3 +207,24 @@ Returns `List[Dict[str, Any]]` — relationship edges.
| `API_KEY` | LLM API key (OpenAI-compatible) | For create, evaluate, analyze |
| `BASE_URL` | Custom LLM endpoint | No (defaults to OpenAI) |
| `GITHUB_TOKEN` | GitHub PAT for private repos | No |
+
+## Security & Privacy
+
+### Credential Scope
+
+- **API_KEY**: Used exclusively for authenticating with the LLM endpoint (`BASE_URL`). It is never sent to the SkillNet API or any other third-party service.
+- **GITHUB_TOKEN**: Sent only to `api.github.com` (read-only `repo` scope sufficient). Never forwarded elsewhere.
+
+### Network Endpoints
+
+The CLI only contacts:
+
+- `api-skillnet.openkg.cn` — skill search/download (read-only, no auth)
+- `api.github.com` — repo access (only with GITHUB_TOKEN)
+- Your configured `BASE_URL` — LLM processing
+
+Set `BASE_URL` to a local endpoint (e.g., `http://127.0.0.1:8000/v1`) for air-gapped usage.
+
+### No Destructive Operations
+
+The CLI never executes file deletion commands. Skill cleanup should be performed manually using safe methods (e.g., moving to a backup directory).
diff --git a/skills/skillnet/references/workflow-patterns.md b/skills/skillnet/references/workflow-patterns.md
index ffcce2d..15510c6 100644
--- a/skills/skillnet/references/workflow-patterns.md
+++ b/skills/skillnet/references/workflow-patterns.md
@@ -14,7 +14,7 @@ Recipes for common scenarios. Each pattern shows the trigger signal, the recomme
2. `skillnet search "kubernetes helm" --limit 5`
3. If 0 results → retry: `skillnet search "kubernetes deployment" --mode vector --threshold 0.65`
4. Review results — check evaluation scores (prefer Good Safety + Good Executability)
-5. `skillnet download "<top-result-url>" -d ~/.openclaw/skills`
+5. `skillnet download "<top-result-url>" -d ~/.openclaw/workspace/skills`
6. Read the downloaded SKILL.md — extract patterns, constraints, and tool choices relevant to your task
7. If the skill only partially matches, use what's useful and fill gaps yourself
@@ -28,9 +28,9 @@ Recipes for common scenarios. Each pattern shows the trigger signal, the recomme
**Steps**:
-1. `skillnet create --github https://github.com/owner/repo --output-dir ~/.openclaw/skills`
+1. `skillnet create --github https://github.com/owner/repo --output-dir ~/.openclaw/workspace/skills`
2. Wait for creation (analyses README, source structure, key files)
-3. `skillnet evaluate ~/.openclaw/skills/<generated-name>`
+3. `skillnet evaluate ~/.openclaw/workspace/skills/<generated-name>`
4. If evaluation shows "Poor" on any dimension → warn the user, suggest manual review
5. Read the generated SKILL.md — now you understand the project's architecture, patterns, and usage
@@ -55,8 +55,8 @@ Routine tasks, minor fixes, or straightforward work → do NOT create.
1. If no `API_KEY` → use the standard ask text to request one
2. Formulate what you learned as a concise description
3. **MUST use `skillnet create`** — never manually write a SKILL.md
-4. `skillnet create --prompt "A skill that teaches: [lesson learned]. Use when: [trigger conditions]. Key steps: [solution outline]" --output-dir ~/.openclaw/skills`
-5. `skillnet evaluate ~/.openclaw/skills/<new-skill>`
+4. `skillnet create --prompt "A skill that teaches: [lesson learned]. Use when: [trigger conditions]. Key steps: [solution outline]" --output-dir ~/.openclaw/workspace/skills`
+5. `skillnet evaluate ~/.openclaw/workspace/skills/<new-skill>`
**Outcome**: Knowledge is preserved via SkillNet's standardized format. If user declined the key, do NOT hand-write a SKILL.md as workaround — either use `skillnet create` or skip.
@@ -87,13 +87,13 @@ Routine tasks, minor fixes, or straightforward work → do NOT create.
**Steps**:
-1. `skillnet analyze ~/.openclaw/skills`
+1. `skillnet analyze ~/.openclaw/workspace/skills`
2. Review `relationships.json`:
- `similar_to` pairs → consider merging (keep the one with higher evaluation scores)
- `depend_on` chains → ensure dependencies are all installed
- `belong_to` hierarchies → organize into subdirectories if helpful
3. For skills with unknown quality → `skillnet evaluate <skill-path>`
-4. Remove or archive skills scoring "Poor" on Safety or multiple "Poor" dimensions
+4. Remove or archive skills scoring "Poor" on Safety or multiple "Poor" dimensions (use safe removal: `mv <skill> ~/.openclaw/trash/`)
**Outcome**: A lean, high-quality skill library with understood relationships.
@@ -106,7 +106,7 @@ Routine tasks, minor fixes, or straightforward work → do NOT create.
**Steps**:
1. Save the document to a local path if not already on disk
-2. `skillnet create --office /path/to/document.pdf --output-dir ~/.openclaw/skills`
+2. `skillnet create --office /path/to/document.pdf --output-dir ~/.openclaw/workspace/skills`
3. Evaluate the created skill
4. Read SKILL.md to verify the knowledge was correctly extracted
@@ -116,12 +116,12 @@ Routine tasks, minor fixes, or straightforward work → do NOT create.
## Decision Matrix: Which SkillNet Feature to Use
-| Situation | Feature | Command |
-| ------------------------------------ | ------------------------- | ---------------------------------------------- |
-| Need expertise in a new domain | **search** + **download** | `skillnet search ... && skillnet download ...` |
-| User provides a GitHub repo to learn | **create** (github) | `skillnet create --github <url>` |
-| Finished a complex task with lessons | **create** (prompt) | `skillnet create --prompt "..."` |
-| User shares a knowledge document | **create** (office) | `skillnet create --office <file>` |
-| User provides execution logs or data | **create** (trajectory) | `skillnet create --trajectory <trajectory-file>` |
-| Unsure about a skill's quality | **evaluate** | `skillnet evaluate <path-or-url>` |
-| Too many skills, need organization | **analyze** | `skillnet analyze <dir>` |
+| Situation | Feature | Command |
+| ------------------------------------ | ------------------------- | ----------------------------------------------------------------- |
+| Need expertise in a new domain | **search** + **download** | `skillnet search ... && skillnet download ...` |
+| User provides a GitHub repo to learn | **create** (github) | `skillnet create --github <url> -d ~/.openclaw/workspace/skills` |
+| Finished a complex task with lessons | **create** (prompt) | `skillnet create --prompt "..." -d ~/.openclaw/workspace/skills` |
+| User shares a knowledge document | **create** (office) | `skillnet create --office <file> -d ~/.openclaw/workspace/skills` |
+| User provides execution logs or data | **create** (trajectory) | `skillnet create <file> -d ~/.openclaw/workspace/skills` |
+| Unsure about a skill's quality | **evaluate** | `skillnet evaluate <path-or-url>` |
+| Too many skills, need organization | **analyze** | `skillnet analyze <dir>` |
diff --git a/skills/skillnet/scripts/create_skill.py b/skills/skillnet/scripts/create_skill.py
index 81ff535..ad69c3f 100644
--- a/skills/skillnet/scripts/create_skill.py
+++ b/skills/skillnet/scripts/create_skill.py
@@ -16,14 +16,12 @@ Usage:
Requires: pip install skillnet-ai
Environment variable: API_KEY
- Optional: --model to override default (gpt-4o)
- Optional: BASE_URL for OpenAI-compatible endpoints (default: https://api.openai.com/v1)
"""
import argparse
import os
import sys
-DEFAULT_OUTPUT = os.path.expanduser("~/.openclaw/skills")
+DEFAULT_OUTPUT = os.path.expanduser("~/.openclaw/workspace/skills")
def main():
diff --git a/skills/skillnet/scripts/install_skillnet.sh b/skills/skillnet/scripts/install_skillnet.sh
index 442d592..44e1428 100644
--- a/skills/skillnet/scripts/install_skillnet.sh
+++ b/skills/skillnet/scripts/install_skillnet.sh
@@ -1,12 +1,11 @@
#!/usr/bin/env bash
# install_skillnet.sh — Install the skillnet-ai Python SDK
-# Targets: macOS / Linux (Ubuntu 24.04+, Debian 13+, Fedora 38+, etc.)
-# Handles PEP 668 "externally-managed" environments automatically.
-# Priority: uv > pipx > venv+pip > pip (--break-system-packages as last resort)
+# Targets: macOS / Linux / Windows (via Git Bash / WSL)
+# Uses only standard Python package managers already present on the system.
+# Priority: pipx > pip (no remote scripts, no system modifications)
set -euo pipefail
PACKAGE="skillnet-ai"
-VENV_DIR="${HOME}/.local/share/skillnet/venv"
echo "🧠 SkillNet SDK Installer"
echo "========================="
@@ -18,129 +17,50 @@ if command -v skillnet &>/dev/null; then
exit 0
fi
-# ─── Detect PEP 668 (externally-managed Python) ─────────────────────
-is_externally_managed() {
- local py="${1:-python3}"
- local stdlib_dir
- stdlib_dir=$("$py" -c "import sysconfig; print(sysconfig.get_path('stdlib'))" 2>/dev/null) || return 1
- [ -f "${stdlib_dir}/EXTERNALLY-MANAGED" ]
-}
+# ─── Find Python ─────────────────────────────────────────────────────
+PY=""
+for candidate in python3 python; do
+ if command -v "$candidate" &>/dev/null; then PY="$candidate"; break; fi
+done
-# ─── Helper: try installing uv itself ────────────────────────────────
-ensure_uv() {
- if command -v uv &>/dev/null; then return 0; fi
-
- echo "→ uv not found, attempting to install uv..."
-
- # Method 1: official installer (works on macOS + Linux, no root needed)
- if command -v curl &>/dev/null; then
- curl -LsSf https://astral.sh/uv/install.sh | sh 2>/dev/null && {
- # shellcheck source=/dev/null
- export PATH="${HOME}/.local/bin:${HOME}/.cargo/bin:${PATH}"
- command -v uv &>/dev/null && { echo " ✅ uv installed via official installer"; return 0; }
- }
- fi
-
- # Method 2: brew (macOS)
- if command -v brew &>/dev/null; then
- brew install uv 2>/dev/null && { echo " ✅ uv installed via Homebrew"; return 0; }
- fi
-
- # Method 3: apt (Debian/Ubuntu — available since Ubuntu 24.10+ repos)
- if command -v apt-get &>/dev/null && [ "$(id -u)" = "0" ] 2>/dev/null; then
- apt-get update -qq && apt-get install -y -qq uv 2>/dev/null && { echo " ✅ uv installed via apt"; return 0; }
- fi
+if [ -z "${PY:-}" ]; then
+ echo "❌ Python not found. Please install Python 3.9+ first."
+ exit 1
+fi
- return 1
-}
+echo "→ Using Python: $($PY --version 2>&1)"
# ─── Install strategy ────────────────────────────────────────────────
install_success=false
-# Strategy 1: uv (preferred — fast, handles venvs transparently)
-if ensure_uv; then
- echo "→ Installing ${PACKAGE} via uv..."
- uv pip install --system "${PACKAGE}" 2>/dev/null && install_success=true
-
- # If --system failed (PEP 668 / no permission), use uv with a venv
- if [ "$install_success" = false ]; then
- echo " → System install blocked, creating venv at ${VENV_DIR}..."
- uv venv "${VENV_DIR}" 2>/dev/null
- VIRTUAL_ENV="${VENV_DIR}" uv pip install "${PACKAGE}" 2>/dev/null && install_success=true
- fi
+# Strategy 1: pipx (recommended — installs into an isolated environment)
+if command -v pipx &>/dev/null; then
+ echo "→ Installing ${PACKAGE} via pipx (isolated environment)..."
+ pipx install "${PACKAGE}" && install_success=true
fi
-# Strategy 2: pipx (installs into isolated env, puts CLI on PATH)
-if [ "$install_success" = false ] && command -v pipx &>/dev/null; then
- echo "→ Installing ${PACKAGE} via pipx..."
- pipx install "${PACKAGE}" 2>/dev/null && install_success=true
-fi
-
-# Strategy 3: Create a venv manually + pip inside it
+# Strategy 2: pip install (standard)
if [ "$install_success" = false ]; then
- PY=""
- for candidate in python3 python; do
- if command -v "$candidate" &>/dev/null; then PY="$candidate"; break; fi
- done
-
- if [ -n "${PY:-}" ]; then
- if is_externally_managed "$PY"; then
- echo "→ PEP 668 detected (externally-managed Python). Creating venv at ${VENV_DIR}..."
- "$PY" -m venv "${VENV_DIR}" 2>/dev/null && {
- "${VENV_DIR}/bin/pip" install --upgrade pip 2>/dev/null
- "${VENV_DIR}/bin/pip" install "${PACKAGE}" && install_success=true
- }
- else
- # Non-managed Python — direct pip is safe
- echo "→ Installing ${PACKAGE} via ${PY} -m pip..."
- "$PY" -m pip install "${PACKAGE}" 2>/dev/null && install_success=true
- fi
- fi
-fi
-
-# Strategy 4: last resort — --break-system-packages (warn user)
-if [ "$install_success" = false ]; then
- PY=""
- for candidate in python3 python; do
- if command -v "$candidate" &>/dev/null; then PY="$candidate"; break; fi
- done
- if [ -n "${PY:-}" ]; then
- echo "⚠️ Last resort: installing with --break-system-packages"
- echo " This may affect system Python packages."
- "$PY" -m pip install --break-system-packages "${PACKAGE}" 2>/dev/null && install_success=true
- fi
+ echo "→ Installing ${PACKAGE} via pip..."
+ "$PY" -m pip install "${PACKAGE}" && install_success=true
fi
if [ "$install_success" = false ]; then
echo "❌ Failed to install ${PACKAGE}."
- echo " Please install Python 3.9+ and one of: uv, pipx, or pip."
- echo " Recommended: curl -LsSf https://astral.sh/uv/install.sh | sh"
+ echo " If pip failed due to PEP 668 (externally-managed-environment), try one of:"
+ echo " 1. Install pipx first: apt install pipx / brew install pipx"
+ echo " Then: pipx install skillnet-ai"
+ echo " 2. Use a venv: python3 -m venv .venv && .venv/bin/pip install skillnet-ai"
+ echo " Otherwise, ensure Python 3.9+ and pip or pipx are available."
exit 1
fi
-# ─── Ensure skillnet is on PATH ──────────────────────────────────────
-export PATH="${HOME}/.local/bin:${VENV_DIR}/bin:${PATH}"
-
+# ─── Verify ──────────────────────────────────────────────────────────
if command -v skillnet &>/dev/null; then
echo "✅ skillnet CLI installed successfully."
skillnet --help | head -5
else
- # Auto-create symlink for venv installs so skillnet is on PATH
- if [ -x "${VENV_DIR}/bin/skillnet" ]; then
- mkdir -p "${HOME}/.local/bin"
- ln -sf "${VENV_DIR}/bin/skillnet" "${HOME}/.local/bin/skillnet"
- export PATH="${HOME}/.local/bin:${PATH}"
- if command -v skillnet &>/dev/null; then
- echo "✅ skillnet CLI installed (symlinked to ~/.local/bin/skillnet)"
- skillnet --help | head -5
- else
- echo "✅ Installed and symlinked to ~/.local/bin/skillnet"
- echo " Add to your shell profile if not on PATH:"
- echo " export PATH=\"\$HOME/.local/bin:\${PATH}\""
- fi
- else
- echo "⚠️ Installation succeeded but 'skillnet' not found on PATH."
- echo " Try: python3 -m skillnet_ai.cli --help"
- fi
+ echo "✅ Package installed. If 'skillnet' is not on PATH, try:"
+ echo " $PY -m skillnet_ai.cli --help"
fi
diff --git a/skills/skillnet/scripts/search_and_download.py b/skills/skillnet/scripts/search_and_download.py
index db7d1b5..23e05d8 100644
--- a/skills/skillnet/scripts/search_and_download.py
+++ b/skills/skillnet/scripts/search_and_download.py
@@ -3,7 +3,7 @@
Usage:
python search_and_download.py "query" [--mode vector] [--threshold 0.7] \
- [--download] [--target-dir ~/.openclaw/skills] [--no-fallback]
+ [--download] [--target-dir ~/.openclaw/workspace/skills] [--no-fallback]
Requires: pip install skillnet-ai
"""
@@ -21,7 +21,7 @@ def main():
parser.add_argument("--threshold", type=float, default=0.75, help="Similarity threshold (vector mode)")
parser.add_argument("--min-stars", type=int, default=0, help="Minimum star rating")
parser.add_argument("--download", action="store_true", help="Auto-download the top result")
- parser.add_argument("--target-dir", default=os.path.expanduser("~/.openclaw/skills"),
+ parser.add_argument("--target-dir", default=os.path.expanduser("~/.openclaw/workspace/skills"),
help="Directory to install downloaded skills into")
parser.add_argument("--no-fallback", action="store_true",
help="Disable automatic retry with vector mode when keyword returns 0 results")