TypeScript SDK for SkillNet - Open Infrastructure for Creating, Evaluating, and Connecting AI Agent Skills.
- 🔍 Search - Find skills via keyword match or AI semantic search
- 📦 Download - Install skills from GitHub repositories
- ✨ Create - Convert various sources into structured skill packages
- 📊 Evaluate - Score skills on 5 quality dimensions
- 🕸️ Analyze - Map relationships between skills
npm install skillnet-clientOr using yarn:
yarn add skillnet-clientimport { SkillNetClient, SearchMode } from 'skillnet-client';
const client = new SkillNetClient();
// Search for skills
const results = await client.search({ q: 'pdf', limit: 5 });
console.log(results[0].skillName, results[0].stars);
// Semantic search
const semanticResults = await client.search({
q: 'analyze financial PDF reports',
mode: SearchMode.Vector,
threshold: 0.85
});
// Download a skill
const localPath = await client.download({
url: 'https://github.com/anthropics/skills/tree/main/skills/skill-creator',
targetDir: './my_skills'
});const client = new SkillNetClient({
apiKey: 'sk-...', // Required for create/evaluate/analyze
skillnetUrl: 'http://api-skillnet.openkg.cn/v1', // SkillNet API server
baseUrl: 'https://api.openai.com/v1', // LLM API endpoint
githubToken: 'ghp-...' // Optional: for private repos
});If you're behind a corporate proxy or need to use a mirror, configure it as follows:
# Set proxy
export HTTP_PROXY=http://user:[email protected]:8080
export HTTPS_PROXY=https://proxy.example.com:443
# Or set GitHub mirror
export GITHUB_MIRROR=https://ghfast.top/
# Or set GitHub token for higher rate limits
export GITHUB_TOKEN=ghp_your_token_hereconst client = new SkillNetClient({
githubToken: 'ghp_xxx',
githubMirror: 'https://ghfast.top/',
githubProxy: {
host: 'proxy.example.com',
port: 8080,
auth: {
username: 'user',
password: 'password'
}
}
});If you need to bypass proxy for direct connections:
const client = new SkillNetClient({
githubProxy: false // Disable proxy completely
});// Keyword search
const results = await client.search({
q: 'pdf',
limit: 10,
minStars: 5,
sortBy: 'stars' // or 'recent'
});
// Semantic search
const results = await client.search({
q: 'analyze financial reports',
mode: SearchMode.Vector,
threshold: 0.85
});
// Filter by category
const results = await client.search({
q: 'pdf',
category: 'Development'
});const path = await client.download({
url: 'https://github.com/owner/repo',
targetDir: './skills'
});Requires API key.
// From trajectory/logs
const result = await client.create({
trajectoryContent: 'User: rename .jpg to .png\nAgent: Done.',
outputDir: './skills'
});
// From GitHub repo
const result = await client.create({
githubUrl: 'https://github.com/owner/repo',
outputDir: './skills'
});
// From office document
const result = await client.create({
officeFile: './guide.pdf',
outputDir: './skills'
});
// From prompt with custom model
const result = await client.create({
prompt: 'A skill for web scraping',
outputDir: './skills',
model: 'gpt-4o'
});Requires API key. Scores skills on 5 dimensions: Safety, Completeness, Executability, Maintainability, Cost-Awareness.
const result = await client.evaluate({
target: 'https://github.com/owner/repo'
});
console.log(result.evaluation.safety);
console.log(result.evaluation.completeness);Requires API key. Maps relationships between skills.
const relationships = await client.analyze({
skillsDir: './my_skills'
});
for (const rel of relationships) {
console.log(`${rel.source} --[${rel.type}]--> ${rel.target}`);
}| Variable | Required For | Default |
|---|---|---|
API_KEY |
create · evaluate · analyze | — |
SKILLNET_URL |
Custom SkillNet server | http://api-skillnet.openkg.cn/v1 |
BASE_URL |
Custom LLM endpoint | https://api.openai.com/v1 |
GITHUB_TOKEN |
Private repos | — |
MIT