mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-20 12:23:29 +00:00
* docs: add comprehensive documentation section to website - Create Documentation.tsx component with DeepWiki-sourced content - Add sections: Overview, Installation, Architecture, Agents, Commands - Add sections: Configuration, API Reference, Skill Format, Tech Stack - Include interactive sidebar navigation - Add Docs link to navbar - Reference DeepWiki as documentation source Source: https://deepwiki.com/rohitg00/skillkit * feat(docs): add Fumadocs documentation site and update website - Add Fumadocs-based documentation site at /docs - Complete MDX documentation for all features - TUI section with keyboard navigation - Installation, quickstart, commands reference - API reference and configuration guides - Update SkillKit website (agentskills.com) - Add 15 new agents (32 total): CodeBuddy, Continue, Crush, Factory, MCPJam, Mux, Neovate, OpenHands, Pi, Qoder, Qwen, Vercel, Zencoder, CommandCode - Update agent count from 17 to 32 across all components - Update command count from 30+ to 40+ - Remove inline Documentation section (now in Fumadocs) - Link Docs to /docs route - Add 15 new agent adapters to @skillkit/agents - All use UniversalAdapter as base - Added to detection order and adapter registry - Configure Vercel rewrites for /docs proxy to Fumadocs * fix: resolve TypeScript build errors in fumadocs - Remove createRelativeLink from docs page (not compatible with current fumadocs) - Remove redundant isLoading prop in SkillGenerator (status already narrowed) - Fix lucide-react icon type casting in Card component - Fix MDXComponents return type in mdx-components * fix: resolve /docs 404 and show docs link on mobile - Handle undefined slug by defaulting to empty array for index page - Remove hidden class from Docs link so it shows on mobile * fix: address CodeRabbit review suggestions - Move Gemini API key to server-side route (security) - Add default type='button' to Button component - Use dynamic agent count instead of hardcoded 32 - Add 'use client' directive to Documentation - Fix stale closure in SkillSubmitForm with useCallback - Add URL validation for external references - Add noopener to external links for security - Fix Clawdbot path in agents.mdx - Update cicd.mdx with correct CLI commands - Capitalize proper nouns (Markdown, provider names) - Add text language to README code block - Update date example in quickstart.mdx * fix: add noopener to external links and improve nav accessibility - Add noopener to rel attributes on external links for tabnabbing protection - Add aria-label to nav element for screen readers - Add type="button" and aria-current to nav buttons * fix: add vercel.json for fumadocs deployment * fix: disable turbo detection in Vercel deployment * fix: clean up ASCII logo for better rendering * fix: improve code block contrast in SkillGenerator * fix: sync ASCII logo and code block contrast fixes to old Vite components * fix: improve mobile responsiveness for tabs and header buttons * fix: address CodeRabbit security and code quality suggestions - Add rate limiting to API route (10 requests/min per IP) - Add proper type validation for topic parameter - Move API key check after input validation - Add 'use client' directive to SkillGenerator - Add YAML escape helper to prevent frontmatter injection - Change vercel.json to use pnpm instead of npm
118 lines
2.6 KiB
Plaintext
118 lines
2.6 KiB
Plaintext
---
|
|
title: API Reference
|
|
description: Core package API for programmatic skill management
|
|
---
|
|
|
|
# API Reference
|
|
|
|
The `@skillkit/core` package provides the foundational business logic with zero internal dependencies.
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npm install @skillkit/core
|
|
```
|
|
|
|
## Module Exports
|
|
|
|
| Entry Point | Purpose |
|
|
|-------------|---------|
|
|
| `@skillkit/core` | Main exports |
|
|
| `@skillkit/core/types` | Type definitions |
|
|
| `@skillkit/core/discovery` | Skill discovery |
|
|
| `@skillkit/core/parser` | SKILL.md parsing |
|
|
| `@skillkit/core/translator` | Format translation |
|
|
| `@skillkit/core/context` | Project context |
|
|
| `@skillkit/core/recommend` | Recommendation engine |
|
|
|
|
## Skill Discovery
|
|
|
|
```typescript
|
|
import { findAllSkills, findSkill } from '@skillkit/core/discovery'
|
|
|
|
// Find all skills in directory
|
|
const skills = await findAllSkills('./my-project')
|
|
|
|
// Find specific skill
|
|
const skill = await findSkill('react-patterns')
|
|
```
|
|
|
|
## Quality Evaluation
|
|
|
|
```typescript
|
|
import { evaluateSkillContent, getQualityGrade } from '@skillkit/core'
|
|
|
|
const score = evaluateSkillContent(skillContent)
|
|
// { total: 85, structure: 22, clarity: 25, specificity: 28, advanced: 10 }
|
|
|
|
const grade = getQualityGrade(score.total)
|
|
// 'B'
|
|
```
|
|
|
|
**Dimensions (weights out of 100):**
|
|
- Structure (25): Frontmatter, sections
|
|
- Clarity (30): Descriptions, examples
|
|
- Specificity (30): Actionable steps
|
|
- Advanced (15): Tests, versioning
|
|
|
|
## Translation
|
|
|
|
```typescript
|
|
import { translateSkill } from '@skillkit/core/translator'
|
|
|
|
const result = await translateSkill(skillContent, 'cursor')
|
|
// { content: '...', filename: 'skill.mdc' }
|
|
```
|
|
|
|
## Memory System
|
|
|
|
```typescript
|
|
import { MemoryCompressor, LearningStore } from '@skillkit/core'
|
|
|
|
// Compress observations
|
|
const compressor = new MemoryCompressor()
|
|
const learning = await compressor.compress(observations)
|
|
|
|
// Store and search
|
|
const store = new LearningStore()
|
|
await store.add(learning)
|
|
const results = await store.search('authentication')
|
|
```
|
|
|
|
## Recommendation Engine
|
|
|
|
```typescript
|
|
import { RecommendationEngine, analyzeProject } from '@skillkit/core/recommend'
|
|
|
|
const engine = new RecommendationEngine()
|
|
const profile = await analyzeProject('./my-project')
|
|
const recommendations = engine.recommend(profile)
|
|
```
|
|
|
|
## Types
|
|
|
|
```typescript
|
|
interface Skill {
|
|
name: string
|
|
description: string
|
|
path: string
|
|
content: string
|
|
metadata: SkillMetadata
|
|
enabled: boolean
|
|
}
|
|
|
|
interface QualityScore {
|
|
total: number // 0-100
|
|
structure: number // 0-25
|
|
clarity: number // 0-30
|
|
specificity: number // 0-30
|
|
advanced: number // 0-15
|
|
}
|
|
|
|
interface Recommendation {
|
|
skill: Skill
|
|
score: number
|
|
reasons: string[]
|
|
}
|
|
```
|