@skillkit/core
Advanced tools
+1
-1
| { | ||
| "name": "@skillkit/core", | ||
| "version": "1.3.1", | ||
| "version": "1.4.0", | ||
| "description": "Core functionality for SkillKit - skill discovery, parsing, and translation", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+188
-16
| # @skillkit/core | ||
| Core functionality for SkillKit - skill discovery, parsing, translation, and context management. | ||
| [](https://www.npmjs.com/package/@skillkit/core) | ||
| [](https://opensource.org/licenses/Apache-2.0) | ||
| **Core engine for SkillKit** - skill discovery, cross-agent translation, recommendations, session memory, testing, and workflow orchestration. | ||
| ## Installation | ||
@@ -11,32 +14,201 @@ | ||
| ## Features | ||
| ## Key Features | ||
| - **Skill Discovery**: Find and parse SKILL.md files | ||
| - **Skill Translation**: Convert between agent formats (Claude Code, Cursor, Windsurf, etc.) | ||
| - **Project Context Detection**: Analyze project stack and dependencies | ||
| - **Recommendation Engine**: Smart skill suggestions based on project profile | ||
| - **Skill Discovery**: Find and parse SKILL.md files from any source | ||
| - **Cross-Agent Translation**: Convert skills between 17 agent formats (Claude Code, Cursor, Windsurf, etc.) | ||
| - **Project Context Detection**: Analyze project stack, dependencies, and configurations | ||
| - **Smart Recommendations**: AI-powered skill suggestions based on project profile | ||
| - **Session Memory**: Capture and persist learnings across AI coding sessions | ||
| - **Skill Testing**: Test framework with assertions for skill validation | ||
| - **Workflow Orchestration**: Compose skills into multi-step workflows | ||
| - **Marketplace Aggregation**: Browse and search curated skill repositories | ||
| ## Usage | ||
| ### Skill Discovery | ||
| ```typescript | ||
| import { | ||
| loadConfig, | ||
| getSearchDirs, | ||
| translateSkill, | ||
| ProjectDetector, | ||
| RecommendationEngine | ||
| } from '@skillkit/core'; | ||
| import { findAllSkills, discoverSkills, parseSkill } from '@skillkit/core'; | ||
| // Load skillkit config | ||
| const config = loadConfig(); | ||
| // Find all installed skills | ||
| const skills = findAllSkills(['.claude/skills', '.cursor/skills']); | ||
| // Discover skills from a repository | ||
| const repoSkills = await discoverSkills('anthropics/skills'); | ||
| // Parse a single skill file | ||
| const skill = parseSkill('./my-skill/SKILL.md'); | ||
| ``` | ||
| ### Cross-Agent Translation | ||
| ```typescript | ||
| import { translateSkill, translateSkillFile, TranslatorRegistry } from '@skillkit/core'; | ||
| // Translate skill content to Cursor format | ||
| const result = translateSkill(skillContent, 'cursor'); | ||
| console.log(result.content); // MDC format for Cursor | ||
| // Translate a skill file | ||
| const translated = await translateSkillFile('./skill.md', 'windsurf'); | ||
| // Get available translators | ||
| const registry = new TranslatorRegistry(); | ||
| const formats = registry.getSupportedFormats(); | ||
| ``` | ||
| ### Project Context & Recommendations | ||
| ```typescript | ||
| import { ProjectDetector, RecommendationEngine, ContextManager } from '@skillkit/core'; | ||
| // Detect project context | ||
| const detector = new ProjectDetector(); | ||
| const profile = await detector.analyze('./my-project'); | ||
| // profile.stack includes: languages, frameworks, libraries, testing tools, etc. | ||
| // Get skill recommendations | ||
| const engine = new RecommendationEngine(); | ||
| const recommendations = await engine.recommend(profile); | ||
| const recommendations = engine.recommend(profile, availableSkills); | ||
| // Returns skills sorted by match score | ||
| // Manage project context | ||
| const ctx = new ContextManager('./my-project'); | ||
| await ctx.init(); | ||
| const context = ctx.getContext(); | ||
| ``` | ||
| ### Session Memory | ||
| ```typescript | ||
| import { | ||
| createMemoryCompressor, | ||
| createMemoryInjector, | ||
| LearningStore, | ||
| ObservationStore, | ||
| } from '@skillkit/core'; | ||
| // Compress observations into learnings | ||
| const compressor = createMemoryCompressor('./my-project'); | ||
| const learnings = compressor.compress(); | ||
| // Inject relevant memories into prompts | ||
| const injector = createMemoryInjector('./my-project'); | ||
| const memories = injector.search('authentication patterns'); | ||
| // Manage learnings directly | ||
| const store = new LearningStore('./my-project'); | ||
| const learning = store.add({ | ||
| title: 'React hooks best practices', | ||
| content: 'Always cleanup effects...', | ||
| tags: ['react', 'hooks'], | ||
| }); | ||
| ``` | ||
| ### Skill Testing | ||
| ```typescript | ||
| import { SkillTestRunner, parseTestCases } from '@skillkit/core'; | ||
| // Run skill tests | ||
| const runner = new SkillTestRunner('./my-project'); | ||
| const results = await runner.runAll(); | ||
| // Run specific tests | ||
| const result = await runner.run('./my-skill', { | ||
| tags: ['unit'], | ||
| verbose: true, | ||
| }); | ||
| // Parse test cases from skill | ||
| const testCases = parseTestCases(skillContent); | ||
| ``` | ||
| ### Workflow Orchestration | ||
| ```typescript | ||
| import { WorkflowOrchestrator, parseWorkflow, WorkflowStore } from '@skillkit/core'; | ||
| // Parse and run a workflow | ||
| const workflow = parseWorkflow('./workflow.yaml'); | ||
| const orchestrator = new WorkflowOrchestrator(workflow); | ||
| await orchestrator.execute(); | ||
| // Manage workflows | ||
| const store = new WorkflowStore('./my-project'); | ||
| const workflows = store.list(); | ||
| ``` | ||
| ### Marketplace | ||
| ```typescript | ||
| import { createMarketplaceAggregator, MarketplaceSource } from '@skillkit/core'; | ||
| // Browse skill marketplace | ||
| const marketplace = createMarketplaceAggregator(); | ||
| const results = await marketplace.search({ query: 'react' }); | ||
| // Filter by tags | ||
| const filtered = await marketplace.search({ | ||
| query: 'authentication', | ||
| tags: ['security', 'auth'], | ||
| limit: 10, | ||
| }); | ||
| ``` | ||
| ## Supported Agents | ||
| The translator supports all 17 SkillKit-compatible agents: | ||
| | Agent | Format | | ||
| |-------|--------| | ||
| | Claude Code | SKILL.md | | ||
| | Cursor | MDC (.mdc) | | ||
| | Codex | SKILL.md | | ||
| | Gemini CLI | SKILL.md | | ||
| | Windsurf | Markdown | | ||
| | GitHub Copilot | Markdown | | ||
| | OpenCode, Antigravity, Amp, Goose, Kilo, Kiro, Roo, Trae | SKILL.md | | ||
| | Universal | SKILL.md | | ||
| ## API Reference | ||
| ### Skill Types | ||
| ```typescript | ||
| interface CanonicalSkill { | ||
| name: string; | ||
| description?: string; | ||
| version?: string; | ||
| author?: string; | ||
| tags?: string[]; | ||
| globs?: string[]; | ||
| alwaysApply?: boolean; | ||
| content: string; | ||
| metadata?: Record<string, unknown>; | ||
| } | ||
| interface TranslationResult { | ||
| content: string; | ||
| format: string; | ||
| warnings?: string[]; | ||
| } | ||
| ``` | ||
| ### Context Types | ||
| ```typescript | ||
| interface ProjectProfile { | ||
| name: string; | ||
| type: 'web-app' | 'api' | 'cli' | 'library' | 'unknown'; | ||
| stack: { | ||
| languages: Detection[]; | ||
| frameworks: Detection[]; | ||
| libraries: Detection[]; | ||
| testing: Detection[]; | ||
| databases: Detection[]; | ||
| }; | ||
| } | ||
| ``` | ||
| ## Documentation | ||
@@ -43,0 +215,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1005895
135.39%13614
132.08%220
358.33%68
353.33%18
500%