NEW in v5.0 – Proactive Discovery analyzes your workflow context and suggests relevant skills from the community before you ask.
Overview
Proactive Discovery is Auto-Skill’s intelligent recommendation engine that searches 27,000+ community skills from Skills.sh and suggests the most relevant ones based on your current workflow context.
Unlike traditional search, Proactive Discovery automatically detects :
Detected frameworks (React, Next.js, Vue, etc.)
Programming languages (TypeScript, Python, Rust, etc.)
Tool usage patterns (Bash + Grep = code search patterns)
User intent (debug, test, implement, refactor)
How It Works
The system extracts workflow context from detected patterns:
export interface WorkflowContext {
/** Detected frameworks (react, nextjs, vue, etc.) */
frameworks : string [];
/** Detected languages (typescript, python, rust, etc.) */
languages : string [];
/** Tool sequence being used */
tools : string [];
/** User intent (debug, implement, test, refactor, etc.) */
intent : string | null ;
/** File extensions being modified */
fileExtensions : string [];
/** Import/require statements detected */
imports : string [];
}
src/core/proactive-discovery.ts
function extractContext ( pattern : DetectedPattern ) : WorkflowContext {
const context : WorkflowContext = {
frameworks: [],
languages: [],
tools: pattern . toolSequence ,
intent: null ,
fileExtensions: [],
imports: [],
};
// Extract from session context
if ( pattern . sessionContext ) {
const ctx = pattern . sessionContext as Record < string , unknown >;
if ( ctx . primary_intent ) {
context . intent = String ( ctx . primary_intent );
}
if ( ctx . problem_domains && Array . isArray ( ctx . problem_domains )) {
for ( const domain of ctx . problem_domains ) {
const d = String ( domain ). toLowerCase ();
// Framework detection
if ( d . includes ( "react" )) context . frameworks . push ( "react" );
if ( d . includes ( "next" )) context . frameworks . push ( "nextjs" );
if ( d . includes ( "vue" )) context . frameworks . push ( "vue" );
}
}
}
return context ;
}
2. Query Generation
Based on the context, the system generates targeted search queries:
src/core/proactive-discovery.ts
function generateSearchQueries ( context : WorkflowContext ) : string [] {
const queries : string [] = [];
// Framework + intent queries
for ( const framework of context . frameworks ) {
if ( context . intent === "test" ) {
queries . push ( ` ${ framework } testing` );
queries . push ( ` ${ framework } test patterns` );
} else if ( context . intent === "debug" ) {
queries . push ( ` ${ framework } debugging` );
} else if ( context . intent === "implement" ) {
queries . push ( ` ${ framework } best practices` );
}
}
// Tool-based queries
if ( context . tools . includes ( "Bash" ) && context . tools . includes ( "Grep" )) {
queries . push ( "code search patterns" );
}
return queries . slice ( 0 , 3 ); // Limit to top 3 queries
}
3. Skill Recommendation
The system searches Skills.sh and ranks results by confidence:
export interface SkillRecommendation {
skill : ExternalSkill ;
reason : string ;
confidence : number ; // 0-1
trigger : "pattern" | "context" | "tool-sequence" | "framework" ;
}
Confidence is calculated using:
Install count : Popular skills get higher confidence
Relevance score : How well the skill matches the query
Formula : min(1.0, (installs/1000) * 0.5 + (relevance/100) * 0.5)
Usage Examples
Example 1: Basic Search
examples/proactive-discovery.ts
import { createExternalSkillLoader } from "../src/index" ;
const loader = createExternalSkillLoader ({
githubToken: process . env . GITHUB_TOKEN , // Optional
});
await loader . start ();
// Search for React testing skills
const response = await loader . search ( "react testing" , {
limit: 5 ,
includeContent: false ,
});
console . log ( `Found ${ response . count } skills: \n ` );
for ( const skill of response . skills ) {
console . log ( `📦 ${ skill . title } ` );
console . log ( ` Installs: ${ skill . installCount } ` );
console . log ( ` URL: ${ skill . skillsShUrl } ` );
}
await loader . stop ();
Example 2: Context-Aware Discovery
examples/proactive-discovery.ts
import {
createExternalSkillLoader ,
createProactiveDiscovery ,
} from "../src/index" ;
// Simulate a detected pattern
const pattern : DetectedPattern = {
id: "pattern-abc123" ,
toolSequence: [ "Read" , "Grep" , "Edit" , "Bash" ],
confidence: 0.85 ,
sessionContext: {
primary_intent: "test" ,
problem_domains: [ "react" , "typescript" ],
},
codeContext: {
primary_languages: [ "typescript" ],
},
};
const loader = createExternalSkillLoader ();
const discovery = createProactiveDiscovery ( loader );
await loader . start ();
const recommendations = await discovery . discoverForPattern ( pattern );
console . log ( `Found ${ recommendations . length } recommendations: \n ` );
for ( const rec of recommendations ) {
console . log ( `🎯 ${ rec . skill . title } ` );
console . log ( ` Confidence: ${ Math . round ( rec . confidence * 100 ) } %` );
console . log ( ` Reason: ${ rec . reason } ` );
console . log ( ` Trigger: ${ rec . trigger } ` );
}
await loader . stop ();
Found 5 recommendations:
🎯 React Testing Best Practices
Confidence: 87%
Reason: Detected react usage with test intent
Trigger: framework
Installs: 1,234
URL: https://skills.sh/vercel/react-testing
🎯 Jest + React Testing Library Guide
Confidence: 82%
Reason: Detected react usage with test intent
Trigger: framework
Installs: 892
URL: https://skills.sh/testing/jest-rtl
Recommendation Triggers
Framework Triggered when a framework is detected (React, Next.js, Vue, etc.)
Tool Sequence Triggered when a specific tool pattern is detected (e.g., Bash + Grep)
Context Triggered based on language, file types, or imports
Pattern Triggered when repetitive workflows are detected
API Reference
ProactiveSkillDiscovery
Analyze a detected pattern and recommend relevant external skills. Parameters:
pattern: DetectedPattern - The detected workflow pattern
Returns: Promise<SkillRecommendation[]>
Clear the recommendation cache.
Configuration
Proactive Discovery can be configured when creating the loader:
const loader = createExternalSkillLoader ({
githubToken: process . env . GITHUB_TOKEN , // Optional: increases rate limits
cacheTtl: 86400 , // Cache TTL in seconds (default: 24 hours)
});
GitHub Token : Providing a GitHub token increases API rate limits from 60 to 5,000 requests per hour.
See Also
External Skills Learn about loading external skills from Skills.sh
Skill Graduation Promote external skills to local skills