Skip to content

feat: Add v5.0 Proactive Skill Discovery#19

Merged
MaTriXy merged 8 commits intomainfrom
feature/v5-proactive-discovery
Feb 5, 2026
Merged

feat: Add v5.0 Proactive Skill Discovery#19
MaTriXy merged 8 commits intomainfrom
feature/v5-proactive-discovery

Conversation

@MaTriXy
Copy link
Owner

@MaTriXy MaTriXy commented Feb 5, 2026

Overview

Integrates Skyll-inspired proactive skill loading, enabling Auto-Skill to search and recommend from 27,000+ community skills on Skills.sh. This transforms Auto-Skill from passive pattern detection to proactive skill discovery.

What's New

🚀 Core Features

  • External Skill Search — Search Skills.sh with natural language queries
  • Context-Aware Recommendations — Auto-suggest skills based on detected frameworks, languages, and intent
  • Hybrid Learning — Combines local pattern detection with external skill discovery
  • Smart Graduation — Recommends upgrading local patterns to proven community skills
  • Zero Dependencies — Uses native Node.js fetch API (18+)

📦 New Modules

  • src/core/external-skill-loader.ts (392 lines) — Skills.sh + GitHub API integration
  • src/core/proactive-discovery.ts (225 lines) — Context extraction and recommendations
  • src/core/skill-recommendation-engine.ts (149 lines) — Unified recommendation interface

🔌 MCP Tools

  • search_skills — Search community skills by query
  • discover_skills — Get context-aware recommendations

📚 Documentation

Architecture

ExternalSkillLoader (Skills.sh + GitHub API)
         ↓
ProactiveSkillDiscovery (Context extraction + recommendations)
         ↓
SkillRecommendationEngine (Local + External + Hybrid)
         ↓
MCP Server (search_skills, discover_skills tools)

Example Usage

import { createExternalSkillLoader } from '@matrixy/auto-skill';

const loader = createExternalSkillLoader({
  githubToken: process.env.GITHUB_TOKEN, // Optional
});

await loader.start();

// Search community skills
const response = await loader.search('react testing', { limit: 5 });
console.log(response.skills);

await loader.stop();

Breaking Changes

  • Node 18+ now required (native fetch API)
  • Version bumped to 5.0.0

Testing

npm install
npm run build
npm test

Run examples:

npx tsx examples/proactive-discovery.ts

Files Changed

New:

  • src/core/external-skill-loader.ts
  • src/core/proactive-discovery.ts
  • src/core/skill-recommendation-engine.ts
  • examples/proactive-discovery.ts
  • website/blog/2024-02-05-v5-proactive-discovery.md
  • website/blog/authors.yml
  • website/docs/features/proactive-discovery.md
  • CHANGELOG_V5.md

Modified:

  • src/index.ts — Added exports for new modules
  • src/mcp/server.ts — Added search_skills and discover_skills tools
  • package.json — Version 5.0.0
  • README.md — Updated with v5.0 features
  • website/docusaurus.config.ts — Enabled blog

Closes

Implements proactive skill discovery as discussed.

Integrates Skyll-inspired proactive skill loading with 27,000+ community skills from Skills.sh.

## Core Features
- External skill search and loading via Skills.sh API
- Context-aware skill recommendations based on detected patterns
- Hybrid learning system combining local + external sources
- Smart skill graduation from local → community patterns
- GitHub Tree API for fetching SKILL.md content
- Native fetch (Node 18+) with in-memory caching

## New Modules
- src/core/external-skill-loader.ts: Skill search service
- src/core/proactive-discovery.ts: Context-aware recommendations
- src/core/skill-recommendation-engine.ts: Unified recommendation interface

## MCP Integration
- search_skills: Search community skills by query
- discover_skills: Get recommendations for current context

## Documentation
- Docusaurus blog enabled with v5.0 release announcement
- Complete proactive discovery guide
- 5 runnable examples in examples/proactive-discovery.ts

## Breaking Changes
- Requires Node 18+ (native fetch API)
- Version bumped to 5.0.0
@greptile-apps
Copy link

greptile-apps bot commented Feb 5, 2026

Greptile Overview

Greptile Summary

This PR bumps Auto-Skill to v5.0.0 and adds a new proactive discovery pipeline: an ExternalSkillLoader that searches skills.sh and optionally fetches SKILL.md content from GitHub, a ProactiveSkillDiscovery layer that derives context from detected patterns and generates search queries, and a SkillRecommendationEngine that merges external recommendations with local pattern generation/graduation decisions. It also wires new MCP tool definitions (search_skills, discover_skills) and updates docs/blog/README to describe the new workflow.

Key issues to address before merge:

  • src/core/external-skill-loader.ts currently has a TypeScript parse/type error around the response.json() cast, which will break compilation.
  • src/mcp/server.ts advertises tools but tools/call never executes them (returns a queued stub) and initialize reports the old server version.
  • SkillRecommendationEngine.loadExternalSkill() ignores its source parameter and can return the wrong skill when IDs overlap across repos.

Confidence Score: 2/5

  • This PR is not safe to merge until compilation and MCP tool execution issues are fixed.
  • Score is reduced due to a definite TypeScript syntax/type error in external-skill-loader, MCP tools that are defined but not actually executed, and a functional bug where loadExternalSkill ignores its source parameter. Docs/content changes look fine otherwise.
  • src/core/external-skill-loader.ts, src/mcp/server.ts, src/core/skill-recommendation-engine.ts

Important Files Changed

Filename Overview
CHANGELOG_V5.md Adds a v5.0.0 changelog describing proactive discovery modules and behavior.
README.md Updates README for v5.0 proactive skill discovery, usage examples, and docs links.
examples/proactive-discovery.ts Adds runnable examples exercising external search, content fetch, and recommendation APIs.
package.json Bumps package version to 5.0.0 and sets Node engine to >=18.
src/core/external-skill-loader.ts Introduces external skill search + GitHub content fetching, but has a TypeScript parse/type error around JSON casting that prevents compilation.
src/core/proactive-discovery.ts Adds context extraction and query generation for proactive recommendations from detected patterns.
src/core/skill-recommendation-engine.ts Adds unified recommendation logic; loadExternalSkill ignores its source parameter and may return wrong skill content.
src/index.ts Exports new proactive discovery modules and types from the package entrypoint.
src/mcp/server.ts Adds MCP tools for discovery/search but tools/call is stubbed (does not execute), and initialize reports version 4.0.1.
website/blog/2024-02-05-v5-proactive-discovery.md Adds v5.0 blog post; claims no breaking changes even though Node>=18 requirement is a breaking change.
website/blog/authors.yml Adds blog author metadata for Docusaurus blog.
website/docs/features/proactive-discovery.md Adds documentation for proactive discovery architecture, APIs, and MCP usage.
website/docusaurus.config.ts Enables Docusaurus blog at site root and updates navbar/footer links accordingly.

Sequence Diagram

sequenceDiagram
  participant MCP as MCP Client
  participant Server as src/mcp/server.ts
  participant Loader as ExternalSkillLoader
  participant Skills as skills.sh API
  participant GH as GitHub API/raw

  MCP->>Server: tools/list
  Server-->>MCP: TOOLS (search_skills, discover_skills, ...)

  MCP->>Server: tools/call(name="search_skills", args)
  alt Current implementation
    Server-->>MCP: queued stub (does not call handleToolCall)
  else Intended behavior
    Server->>Loader: start()
    Server->>Loader: search(query, {limit, includeContent})
    Loader->>Skills: GET /api/search?q=...&limit=...
    Skills-->>Loader: results[]
    opt includeContent
      Loader->>GH: fetch repo default branch + tree
      GH-->>Loader: path to SKILL.md
      Loader->>GH: GET raw SKILL.md
      GH-->>Loader: content
    end
    Server->>Loader: stop()
    Server-->>MCP: search response
  end

  MCP->>Server: tools/call(name="discover_skills", args)
  Server->>Loader: start()
  Server->>Loader: search(generated queries)
  Loader->>Skills: GET /api/search (per query)
  Skills-->>Loader: results
  Server->>Loader: stop()
  Server-->>MCP: recommendations (skills + context)

Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 5, 2026

Additional Comments (2)

src/mcp/server.ts
Tool calls never execute
tools/call currently returns a synchronous "queued" stub and never invokes handleToolCall, so search_skills / discover_skills can’t actually work for any MCP client. If this server is meant to support tool execution, handleRequest needs to await and return the tool result for tools/call (or otherwise wire the dispatcher).

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/mcp/server.ts
Line: 220:233

Comment:
**Tool calls never execute**
`tools/call` currently returns a synchronous "queued" stub and never invokes `handleToolCall`, so `search_skills` / `discover_skills` can’t actually work for any MCP client. If this server is meant to support tool execution, `handleRequest` needs to await and return the tool result for `tools/call` (or otherwise wire the dispatcher).

How can I resolve this? If you propose a fix, please make it concise.

src/mcp/server.ts
Wrong server version reported
initialize responds with serverInfo.version: "4.0.1" even though the package version is 5.0.0. This makes clients believe they’re talking to an older server and can break compatibility / debugging.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/mcp/server.ts
Line: 207:215

Comment:
**Wrong server version reported**
`initialize` responds with `serverInfo.version: "4.0.1"` even though the package version is `5.0.0`. This makes clients believe they’re talking to an older server and can break compatibility / debugging.

How can I resolve this? If you propose a fix, please make it concise.

- Move CHANGELOG_V5.md → changelog/v5.0.md
- Create changelog/v4.0.md for previous release
- Update root CHANGELOG.md to link to versioned files
- Update blog post to reference correct changelog path

This keeps the root clean and allows for per-version changelog files.
- Wire MCP tool execution: tools/call now invokes handleToolCall
- Update server version to 5.0.0 (was incorrectly 4.0.1)
- Fix loadExternalSkill to filter by source parameter
- Make handleRequest async to support tool execution
- Add error handling for tool execution failures

Resolves all blocking issues identified by Greptile review.
Copy link
Owner Author

@MaTriXy MaTriXy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Review - All Issues Resolved ✅

Thanks for the thorough review! I've addressed all the findings:

1. ✅ TypeScript Compilation

The code compiles successfully (

@matrixy/auto-skill@5.0.0 build
tsc passes). The JSON casting syntax is valid TypeScript.

2. ✅ MCP Tool Execution Fixed

Changed handleRequest to async and wired tools/call to invoke handleToolCall:

  • Tools like search_skills and discover_skills now execute properly
  • Added error handling for tool execution failures
  • Removed the "queued" stub

3. ✅ Server Version Updated

Updated serverInfo.version from "4.0.1" → "5.0.0" in the initialize response.

4. ✅ loadExternalSkill Source Parameter Bug Fixed

Now filters search results by the source parameter to avoid ID collisions across repos:

const skill = response.skills.find((s) => s.source === source);

All changes committed in: 1470dee

Changes:
- Create skills/auto-skill/SKILL.md as main active skill
- Move documentation guide to skills/guide/
- Include skills/ directory in npm package files
- Active skill enables pattern detection and proactive discovery

When users run 'npx skills add MaTriXy/auto-skill', they now get:
1. auto-skill (main) - Activates full Auto-Skill functionality
2. skill-discovery - Helper for finding auto-generated skills
3. guide - Documentation and CLI installation instructions

This allows Auto-Skill to actively observe, detect patterns, and
proactively discover community skills when the skill is loaded.
- Add detailed MCP server setup instructions for Claude Code
- Document CLI and MCP as optional power-user features
- Add skills.sh publishing workflow for generated skills
- Document marketplace vision for crowdsourced workflows
- Explain when/how to suggest sharing valuable skills

This enables:
1. Users to set up MCP server for programmatic access
2. Users to share auto-generated skills on skills.sh
3. Marketplace flywheel: detect → share → discover → adopt
Changes:
- Deprecate 'auto-skill search' command (use 'npx skills find' instead)
- Update main auto-skill SKILL.md with Skills CLI integration
- Add division of responsibilities section explaining ecosystem roles
- Update README to reference Skills CLI for manual search/install
- Add SKILLS_CLI_REVIEW.md documenting architecture analysis

Architecture clarification:
- Auto-Skill = Skill Factory (generation + publishing)
- Skills CLI = Skill Distribution (search + install + manage)
- skills.sh = Skill Registry (catalog + metrics)

The 'auto-skill search' command now shows deprecation warning
and recommends 'npx skills find' for better user experience.

MCP tools (search_skills, discover_skills) remain for Auto-Skill's
internal proactive discovery - these are programmatic, not user-facing.
Breaking change: Removed 'auto-skill search' CLI command.

Rationale:
- Skills CLI provides superior search (interactive fzf, better UX)
- Eliminates code duplication and maintenance burden
- Clarifies Auto-Skill's role: skill factory, not distribution
- v5.0 not yet released, safe to make breaking changes

Migration:
- CLI users: Use 'npx skills find' instead
- Programmatic: Use MCP tools (search_skills, discover_skills)

Updated:
- Removed command from src/cli/factory.ts
- Updated skills/auto-skill/SKILL.md (removed strikethrough)
- Updated blog post with migration guide
BREAKING CHANGE: Removed `auto-skill search` command

Skills CLI provides superior search experience with interactive fzf-style UI.
Auto-Skill now focuses on skill generation, not distribution.

Migration:
- OLD: auto-skill search "react testing"
- NEW: npx skills find react testing

Changes:
- Removed src/core/skillssh-client.ts (replaced by external-skill-loader.ts)
- Removed src/core/providers/skillssh-provider.ts
- Removed searchCommand from src/cli/commands/discover.ts
- Deprecated external skill integration in unified-suggester.ts
- Updated all documentation to reference Skills CLI for search
- Updated changelog and blog post with breaking changes

Files updated:
- src/cli/commands/discover.ts - Removed searchCommand and SearchOptions
- src/core/unified-suggester.ts - Deprecated external search (returns empty)
- src/index.ts - Removed skillssh-client exports
- src/core/providers/index.ts - Removed skillssh-provider exports
- changelog/v5.0.md - Added breaking changes and cleanup sections
- website/docs/* - Updated all CLI references
- skills/guide/SKILL.md - Updated CLI command list
- commands/load-skill.md - Updated search references
- TEST_PLAN.md - Updated test commands

Related to #v5.0
@MaTriXy MaTriXy merged commit 97e3e78 into main Feb 5, 2026
10 checks passed
@MaTriXy MaTriXy deleted the feature/v5-proactive-discovery branch February 5, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant