# Build Artifacts

> Generate SKILL.md and TOC.md for a documentation package. Use standalone to regenerate artifacts without re-downloading.

- **Type:** Skill
- **Install:** `agentstack add skill-olorehq-olore-build-artifacts`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [olorehq](https://agentstack.voostack.com/s/olorehq)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [olorehq](https://github.com/olorehq)
- **Source:** https://github.com/olorehq/olore/tree/main/.claude/skills/build-artifacts
- **Website:** https://olore.dev

## Install

```sh
agentstack add skill-olorehq-olore-build-artifacts
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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 exists
```

## Input

`$ARGUMENTS` format: `{config_name}@{version}` (e.g., `prisma@latest`, `nextjs@16.1.3`)

Optional flags:
- `--force` - Regenerate even if artifacts already exist

## Prerequisites

The `contents/` directory and `olore-lock.json` must already exist at `vault/packages/{config_name}/{version}/`. Run `/download-docs` first if they don't.

```bash
test -d vault/packages/{config_name}/{version}/contents && echo "OK" || echo "NOT_FOUND"
```

If `contents/` not found:
```
error: {config_name}@{version} contents/ not found - run /download-docs first
```

## Execution Steps

### Step 1: Parse Arguments and Load Metadata

Parse `$ARGUMENTS`:
- Extract `config_name` and `version` from `{config_name}@{version}`
- Check for `--force` flag

Read metadata:
```bash
cat vault/packages/{config_name}/{version}/olore-lock.json
cat vault/configs/{config_name}.json
```

### Step 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 `--force` flag:
```
skip: {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 |  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.md
```

Create `vault/packages/{config_name}/{version}/TOC.md` following the template structure.

### Step 5: Generate SKILL.md

**IMPORTANT:** The `name` field MUST be `olore-{config_name}-{version}` to match the installed folder name.

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.md
```

Create `vault/packages/{config_name}/{version}/SKILL.md` following the template structure.

### Step 6: Return Summary

Return ONLY a brief summary:

```
done: {config_name}@{version} artifacts built (SKILL.md + TOC.md), tier {tier}
```

## Outputs

- `vault/packages/{config_name}/{version}/SKILL.md` - Skill definition
- `vault/packages/{config_name}/{version}/TOC.md` - Table of contents

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [olorehq](https://github.com/olorehq)
- **Source:** [olorehq/olore](https://github.com/olorehq/olore)
- **License:** MIT
- **Homepage:** https://olore.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-olorehq-olore-build-artifacts
- Seller: https://agentstack.voostack.com/s/olorehq
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
