@skillit/core
Shared types, SKILL.md renderer, and token budgeting for skillit plugins
When to Use
- You have one or more ExtractedSkill objects and need SKILL.md + references/ output
- Building a custom extraction pipeline that bypasses the TypeDoc plugin
- You need fine-grained control over rendering a single skill
- You have RenderedSkill objects from renderSkills() and need to persist them to the filesystem
- Building a custom pipeline that separates rendering from writing (e.g., for preview or dry-run)
- You need structured README sections for audit context or skill enrichment
- The audit engine calls this to check for Features and Troubleshooting sections
- You want programmatic quality feedback on JSDoc coverage before publishing skills
- Building a CI gate that blocks PRs with undocumented exports
- You have hand-written prose docs (tutorials, guides, architecture) in a docs/ directory
- You want these docs included alongside API skills for richer agent context
- You have ParsedMarkdownDoc objects from scanDocs() and need to attach them to an ExtractedSkill
- You want to include well-known root-level markdown files (ARCHITECTURE.md, MIGRATION.md, CONTRIBUTING.md) as documents
- Supplementing API skills with project-level documentation context
- You have an
examples/ directory alongside source code
- You want to link example files to the exported symbols they demonstrate
- You have scanned examples with
scanExamples and want to attach them to
- the relevant exported symbols inside an
ExtractedSkill
Avoid when:
- Rapid local iteration where audit noise slows you down — use the skillsAudit: false option instead
- Your docs/ directory contains only auto-generated API docs — they duplicate the TypeDoc output
- Your root directory has many auto-generated or release-tracking markdown files — use explicit include lists instead
- Your examples are embedded as
- API surface: 18 functions, 25 types
NEVER
- NEVER set maxTokens below 500 — reference files become truncated mid-signature, producing broken code blocks that confuse LLMs
- NEVER pass skills with empty
name — the output directory becomes a bare / path
- NEVER set maxTokens below 500 — reference files become truncated mid-signature, producing broken code blocks
Configuration
3 configuration interfaces — see references/config.md for details.
- SkillRenderOptions — Options controlling skill rendering
- LlmsTxtOptions
- DocsExtractionOptions — Configuration options that control how a docs directory is scanned and which
markdown files are included in the extraction.
Quick Reference
Rendering: renderSkills, renderSkill
I/O: writeSkills
Token Management: estimateTokens, truncateToTokenBudget
llms-txt: renderLlmsTxt, LlmsTxtResult
Parsing: parseReadme, parseMarkdownDoc, scanDocs, docsToExtractedDocuments, scanRootDocs, scanExamples, linkExamplesToSkill
Audit: auditSkill, formatAuditText, formatAuditJson
config-renderer: renderConfigSurfaceSection, renderConfigReference
types: ExtractedSkill, ExtractedFunction, ExtractedClass, ExtractedType, ExtractedEnum, ExtractedParameter, ExtractedProperty, ExtractedVariable, ExtractedDocument, RenderedFile, RenderedSkill
audit-types: AuditSeverity, AuditIssue, AuditPass, AuditContext, ParsedReadme, AuditResult
config-types: ConfigSourceType, ExtractedConfigSurface, ExtractedConfigOption, ExtractedConfigArgument
markdown-types: ParsedSection, ParsedMarkdownDoc
examples-scanner: ParsedExample
Links
1---2name: skillit-core3description: Shared types, SKILL.md renderer, and token budgeting for skillit plugins4license: MIT5---67# @skillit/core89Shared types, SKILL.md renderer, and token budgeting for skillit plugins1011## When to Use1213- You have one or more ExtractedSkill objects and need SKILL.md + references/ output14- Building a custom extraction pipeline that bypasses the TypeDoc plugin15- You need fine-grained control over rendering a single skill16- You have RenderedSkill objects from renderSkills() and need to persist them to the filesystem17- Building a custom pipeline that separates rendering from writing (e.g., for preview or dry-run)18- You need structured README sections for audit context or skill enrichment19- The audit engine calls this to check for Features and Troubleshooting sections20- You want programmatic quality feedback on JSDoc coverage before publishing skills21- Building a CI gate that blocks PRs with undocumented exports22- You have hand-written prose docs (tutorials, guides, architecture) in a docs/ directory23- You want these docs included alongside API skills for richer agent context24- You have ParsedMarkdownDoc objects from scanDocs() and need to attach them to an ExtractedSkill25- You want to include well-known root-level markdown files (ARCHITECTURE.md, MIGRATION.md, CONTRIBUTING.md) as documents26- Supplementing API skills with project-level documentation context27- You have an `examples/` directory alongside source code28- You want to link example files to the exported symbols they demonstrate29- You have scanned examples with `scanExamples` and want to attach them to30- the relevant exported symbols inside an `ExtractedSkill`3132**Avoid when:**3334- Rapid local iteration where audit noise slows you down — use the skillsAudit: false option instead35- Your docs/ directory contains only auto-generated API docs — they duplicate the TypeDoc output36- Your root directory has many auto-generated or release-tracking markdown files — use explicit include lists instead37- Your examples are embedded as38- API surface: 18 functions, 25 types3940## NEVER4142- NEVER set maxTokens below 500 — reference files become truncated mid-signature, producing broken code blocks that confuse LLMs43- NEVER pass skills with empty `name` — the output directory becomes a bare `/` path44- NEVER set maxTokens below 500 — reference files become truncated mid-signature, producing broken code blocks4546## Configuration47483 configuration interfaces — see references/config.md for details.4950- **SkillRenderOptions** — Options controlling skill rendering51- **LlmsTxtOptions**52- **DocsExtractionOptions** — Configuration options that control how a docs directory is scanned and which53 markdown files are included in the extraction.5455## Quick Reference5657**Rendering:** `renderSkills`, `renderSkill`58**I/O:** `writeSkills`59**Token Management:** `estimateTokens`, `truncateToTokenBudget`60**llms-txt:** `renderLlmsTxt`, `LlmsTxtResult`61**Parsing:** `parseReadme`, `parseMarkdownDoc`, `scanDocs`, `docsToExtractedDocuments`, `scanRootDocs`, `scanExamples`, `linkExamplesToSkill`62**Audit:** `auditSkill`, `formatAuditText`, `formatAuditJson`63**config-renderer:** `renderConfigSurfaceSection`, `renderConfigReference`64**types:** `ExtractedSkill`, `ExtractedFunction`, `ExtractedClass`, `ExtractedType`, `ExtractedEnum`, `ExtractedParameter`, `ExtractedProperty`, `ExtractedVariable`, `ExtractedDocument`, `RenderedFile`, `RenderedSkill`65**audit-types:** `AuditSeverity`, `AuditIssue`, `AuditPass`, `AuditContext`, `ParsedReadme`, `AuditResult`66**config-types:** `ConfigSourceType`, `ExtractedConfigSurface`, `ExtractedConfigOption`, `ExtractedConfigArgument`67**markdown-types:** `ParsedSection`, `ParsedMarkdownDoc`68**examples-scanner:** `ParsedExample`6970## Links7172- [Repository](https://github.com/pradeepmouli/skillit)73- Author: Pradeep Mouli