build-artifacts
Original:🇺🇸 English
Translated
Generate SKILL.md and TOC.md for a documentation package. Use standalone to regenerate artifacts without re-downloading.
3installs
Sourceolorehq/olore
Added on
NPX Install
npx skill4agent add olorehq/olore build-artifactsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Build Artifacts
Generate SKILL.md and TOC.md for an existing documentation package.
Usage
/build-artifacts prisma@latest # Generate artifacts
/build-artifacts prisma@latest --force # Regenerate even if existsInput
$ARGUMENTS{config_name}@{version}prisma@latestnextjs@16.1.3Optional flags:
- - Regenerate even if artifacts already exist
--force
Prerequisites
The directory and must already exist at . Run first if they don't.
contents/olore-lock.jsonvault/packages/{config_name}/{version}//download-docsbash
test -d vault/packages/{config_name}/{version}/contents && echo "OK" || echo "NOT_FOUND"If not found:
contents/error: {config_name}@{version} contents/ not found - run /download-docs firstExecution Steps
Step 1: Parse Arguments and Load Metadata
Parse :
$ARGUMENTS- Extract and
config_namefromversion{config_name}@{version} - Check for flag
--force
Read metadata:
bash
cat vault/packages/{config_name}/{version}/olore-lock.json
cat vault/configs/{config_name}.jsonStep 2: Check if Already Built
bash
test -f vault/packages/{config_name}/{version}/SKILL.md && test -f vault/packages/{config_name}/{version}/TOC.md && echo "EXISTS" || echo "NOT_FOUND"If both exist and no flag:
--forceskip: {config_name}@{version} artifacts already built (use --force to rebuild)Return early.
Step 3: Determine Tier
bash
file_count=$(find vault/packages/{config_name}/{version}/contents -type f \( -name "*.md" -o -name "*.mdx" \) | wc -l)
total_size=$(du -sk vault/packages/{config_name}/{version}/contents | cut -f1)| Tier | Criteria |
|---|---|
| 1 | < 30 files AND < 500KB |
| 2 | 30-100 files OR 500KB-2MB |
| 3 | > 100 files OR > 2MB |
Step 4: Generate TOC.md
Read the appropriate template based on tier:
bash
# Tier 1
cat vault/packages/docs-packager/1.0.0/templates/toc-tier1.md
# Tier 2
cat vault/packages/docs-packager/1.0.0/templates/toc-tier2.md
# Tier 3
cat vault/packages/docs-packager/1.0.0/templates/toc-tier3.mdCreate following the template structure.
vault/packages/{config_name}/{version}/TOC.mdStep 5: Generate SKILL.md
IMPORTANT: The field MUST be to match the installed folder name.
nameolore-{config_name}-{version}Read the appropriate template based on tier:
bash
# Tier 1
cat vault/packages/docs-packager/1.0.0/templates/skill-tier1.md
# Tier 2
cat vault/packages/docs-packager/1.0.0/templates/skill-tier2.md
# Tier 3
cat vault/packages/docs-packager/1.0.0/templates/skill-tier3.mdCreate following the template structure.
vault/packages/{config_name}/{version}/SKILL.mdStep 6: Return Summary
Return ONLY a brief summary:
done: {config_name}@{version} artifacts built (SKILL.md + TOC.md), tier {tier}Outputs
- - Skill definition
vault/packages/{config_name}/{version}/SKILL.md - - Table of contents
vault/packages/{config_name}/{version}/TOC.md