🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

skillgrade

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skillgrade - npm Package Compare versions

Comparing version
0.0.1
to
0.1.0
+33
-9
dist/commands/init.js

@@ -59,7 +59,7 @@ "use strict";

}
console.log('\n 📝 Initializing eval.yaml...\n');
console.log('\nskillgrade init\n');
// Detect skills
const skills = await (0, skills_1.detectSkills)(dir);
if (skills.length === 0) {
console.log(' ⚠ No SKILL.md found. Creating a generic template.');
console.log(' No SKILL.md found. Creating a generic template.');
console.log(' Place a SKILL.md in this directory for better scaffolding.\n');

@@ -83,10 +83,12 @@ await writeTemplate(evalPath, 'my-skill', 'Describe what the agent should do with this skill.');

const anthropicKey = process.env.ANTHROPIC_API_KEY;
const llmProvider = geminiKey ? 'gemini' : anthropicKey ? 'anthropic' : null;
const llmApiKey = geminiKey || anthropicKey;
const openaiKey = process.env.OPENAI_API_KEY;
const llmProvider = geminiKey ? 'gemini' : anthropicKey ? 'anthropic' : openaiKey ? 'openai' : null;
const llmApiKey = geminiKey || anthropicKey || openaiKey;
const providerLabel = { gemini: 'Gemini', anthropic: 'Anthropic', openai: 'OpenAI' };
if (llmProvider && llmApiKey) {
console.log(` 🤖 Generating eval tasks with ${llmProvider === 'gemini' ? 'Gemini' : 'Anthropic'}...\n`);
console.log(` Generating eval tasks with ${providerLabel[llmProvider]}...\n`);
try {
const config = await generateWithLLM(skills, llmApiKey, llmProvider);
await fs.writeFile(evalPath, config, 'utf-8');
console.log(` ✅ Created eval.yaml with AI-generated tasks`);
console.log(` Created eval.yaml with AI-generated tasks.`);
console.log(` Review and edit the file, then run: skillgrade\n`);

@@ -96,3 +98,3 @@ return;

catch (err) {
console.log(` ⚠ AI generation failed: ${err.message}`);
console.log(` AI generation failed: ${err.message}`);
console.log(' Falling back to template.\n');

@@ -102,3 +104,3 @@ }

else {
console.log(' 💡 Set GEMINI_API_KEY or ANTHROPIC_API_KEY for AI-powered eval generation.\n');
console.log(' Set GEMINI_API_KEY, ANTHROPIC_API_KEY, or OPENAI_API_KEY for AI-powered eval generation.\n');
}

@@ -125,3 +127,3 @@ // Fallback: template-based scaffold

await fs.writeFile(evalPath, result, 'utf-8');
console.log(` ✅ Created eval.yaml`);
console.log(` Created eval.yaml.`);
console.log(` Edit the file to define your eval tasks, then run: skillgrade\n`);

@@ -260,2 +262,24 @@ }

}
else if (provider === 'openai') {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`,
},
body: JSON.stringify({
model: 'gpt-4o',
max_tokens: 4096,
messages: [{ role: 'user', content: prompt }],
temperature: 0.3,
}),
});
if (!response.ok) {
throw new Error(`OpenAI API returned ${response.status}`);
}
const data = await response.json();
text = data.choices?.[0]?.message?.content;
if (!text)
throw new Error('Empty response from OpenAI API');
}
else {

@@ -262,0 +286,0 @@ const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:generateContent?key=${apiKey}`, {

{
"name": "skillgrade",
"version": "0.0.1",
"version": "0.1.0",
"description": "The easiest way to evaluate your Agent Skills — test that AI agents correctly discover and use your skills",

@@ -5,0 +5,0 @@ "main": "dist/skillgrade.js",

@@ -21,3 +21,3 @@ # Skillgrade

cd my-skill/
GEMINI_API_KEY=your-key skillgrade init # or ANTHROPIC_API_KEY
GEMINI_API_KEY=your-key skillgrade init # or ANTHROPIC_API_KEY / OPENAI_API_KEY
# Use --force to overwrite an existing eval.yaml

@@ -230,3 +230,3 @@ ```

| `ANTHROPIC_API_KEY` | Agent execution, LLM grading, `skillgrade init` |
| `OPENAI_API_KEY` | Agent execution (Codex) |
| `OPENAI_API_KEY` | Agent execution (Codex), `skillgrade init` |

@@ -233,0 +233,0 @@ Variables are also loaded from `.env` in the skill directory. Shell values override `.env`. All values are **redacted** from persisted session logs.