Skill Sync Object Structure
Overview
The skillSync object lets admins mirror Skills from external sources. GitHub is the supported provider.
GitHub Skill Sync reads SKILL.md files and their bundled files from configured repository paths, stores them as Skills with source: "github", and keeps mirrored rows aligned with the upstream repository on later syncs.
Example
skillSync:
github:
enabled: true
intervalMinutes: 60
runOnStartup: true
sources:
- id: librechat-skills
owner: your-org
repo: your-skills-repo
ref: main
paths:
- skills
skillDiscoveryDepth: 2
token: '${GITHUB_SKILLS_TOKEN}'
# credentialKey: production-skills
# tenantId: your-tenant-idCredentials
Use either token or credentialKey for each source, not both. token must be an environment
variable reference such as ${GITHUB_SKILLS_TOKEN}. Use a GitHub fine-grained personal access
token scoped to the selected repository with read-only Contents and Metadata permissions.
Top-Level Fields
skillSync.github
| Key | Type | Description | Example |
|---|---|---|---|
| github.enabled | Boolean | Enables or disables GitHub Skill Sync. | enabled: true |
| github.intervalMinutes | Number | How often scheduled GitHub Skill Sync runs. Must be between 5 and 35791 minutes. | intervalMinutes: 60 |
| github.runOnStartup | Boolean | Runs GitHub Skill Sync when the server starts. | runOnStartup: true |
| github.sources | Array of Objects | GitHub repositories and paths to scan for Skills. Enabling GitHub Skill Sync with no sources is rejected, and each source id must be unique. |
Defaults:
enabled:falseintervalMinutes:60runOnStartup:falsesources:[]
Source Fields
Each github.sources entry configures one repository source.
| Key | Type | Description | Example |
|---|---|---|---|
| id | String | Stable unique source id. Must start with a letter or digit and contain only letters, digits, underscores, or hyphens. | id: librechat-skills |
| owner | String | GitHub organization or user name. | owner: your-org |
| repo | String | GitHub repository name. | repo: your-skills-repo |
| ref | String | Git ref, branch, tag, or commit to read. Defaults to `main`. | ref: main |
| paths | Array of Strings | Repository paths to scan. Use `.` to scan from the repository root. | paths: ["skills"] |
| skillDiscoveryDepth | Number | Directory depth below each configured path to scan for SKILL.md. Defaults to 2; minimum is 0 and maximum is 10. | skillDiscoveryDepth: 2 |
| token | String | Environment variable reference containing a GitHub token. Mutually exclusive with `credentialKey`. | token: '${GITHUB_SKILLS_TOKEN}' |
| credentialKey | String | Stored GitHub credential key managed through the admin Skill Sync credential endpoints. Mutually exclusive with `token`. | credentialKey: production-skills |
| tenantId | String | Optional tenant id that owns mirrored Skills when tenant isolation is enabled. | tenantId: tenant-a |
Source Identity
The id field is part of the mirror identity. Keep it stable. Repointing a source to a renamed repository or a new ref keeps mirrored Skills linked to the same source id, while changing the source id creates a new mirror.
When tenantId is set, sync reads and writes run inside that tenant's isolation context. Treat tenantId as immutable for a source id: changing, adding, or removing it later leaves previously mirrored Skills in the old tenant.
Sync Behavior
GitHub Skill Sync:
- Discovers
SKILL.mdfiles below each configured path. - Imports the
SKILL.mdbody, frontmatter, and bundled files. - Stores source metadata such as source id, owner, repo, ref, skill path, commit SHA, and blob SHA.
- Updates mirrored Skills when the upstream file changes.
- Deletes mirrored Skills and files that were removed from the configured source.
- Validates and publishes Skills independently, so one invalid or conflicting Skill does not hide valid Skills from the same source.
- Preserves a skipped Skill's last-known-good mirror and rolls back incomplete writes for that Skill.
- Marks a run
partialwhen it publishes at least one Skill but skips another, and records a bounded skipped count and details for administrator status reads. - Uses a sync lock so only one GitHub sync run proceeds at a time.
Unknown SKILL.md frontmatter keys are accepted when their values remain within the bounded, JSON-safe extension limits. Invalid recognized fields, unsafe extension values, duplicate names, and ownership conflicts skip only the affected Skill. Authentication, rate-limit, lock-loss, repository access, and rollback failures remain source-level failures.
Admin Endpoints
The admin API exposes GitHub Skill Sync status, manual runs, and stored credential management:
| Key | Type | Description | Example |
|---|---|---|---|
| GET /api/admin/skills/sync/status | Endpoint | Returns enabled state, schedule settings, source status, credential presence, recent sync counts, and bounded skipped-Skill details for partial runs. | |
| POST /api/admin/skills/sync/run | Endpoint | Starts a manual sync run when the caller has the required admin Skills capability. | |
| PUT /api/admin/skills/sync/credentials/:credentialKey | Endpoint | Stores or rotates a GitHub token for a credential key. | |
| DELETE /api/admin/skills/sync/credentials/:credentialKey | Endpoint | Deletes a stored GitHub token for a credential key. |
Status reads require admin access and Skills read permission. Manual runs and credential writes require platform-level Skills management permission.
Skill Deletion
The top-level skillDeletion object controls the background process that finishes deleting Skills and cleans up their stored files, along with abandoned Skill uploads. It is separate from skillSync and applies to all Skills. Unknown keys are rejected.
skillDeletion:
finalizationEnabled: true
sweepIntervalMs: 60000
claimLeaseMs: 120000
batchSize: 100
recheckIntervalMs: 3600000| Key | Type | Description | Example |
|---|---|---|---|
| finalizationEnabled | Boolean | Enables file cleanup and finalization of Skill deletions. Enable it only after every server that can write Skill files uses upload intents. While false, deletions stay pending. Default: false. | finalizationEnabled: true |
| sweepIntervalMs | Number | How often the background sweep runs, in milliseconds. Minimum 1000. Default: 60000. | sweepIntervalMs: 60000 |
| claimLeaseMs | Number | How long a worker holds its claim on a Skill deletion or abandoned upload, in milliseconds. Minimum 1000. Default: 120000. | claimLeaseMs: 120000 |
| batchSize | Number | Maximum number of sweep candidates and per-Skill file manifest entries handled per batch. Range: 1-1000. Default: 100. | batchSize: 100 |
| recheckIntervalMs | Number | Delay before a completed deletion is audited again for late writers, in milliseconds. Minimum 60000. Default: 3600000. | recheckIntervalMs: 3600000 |
Deployment Skills from Disk
Separate from skillSync, LibreChat loads Skills from a directory on the server at startup. Each skill is a folder with a SKILL.md and any bundled files. The directory is ./skill at the project root unless you set DEPLOYMENT_SKILLS_DIR in .env (see dotenv).
Deployment Skills are shown to every user who has the Skills capability, are read-only in the UI, and hide any user-created skill with the same name. They are read once at startup, so restart LibreChat after adding, removing, or editing files. Agent Plugins can also ship deployment Skills; a Skill in this directory wins over a plugin Skill with the same name.
How is this guide?