download-docs
Skill114 starsChanged 8 months agoMITView on GitHub
Download and filter documentation from source configs. Use standalone to re-download without rebuilding artifacts.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- build-artifactsSkill
- build-docsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Check for --force flag
- Very specific: line 49
If exists and no --force flag:
- Distinctive: line 78
If download failed, return error:
- Distinctive: line 131
Delete files that should be removed:
- Distinctive: line 143
Update the lock file with final file count:
- Very specific: line 150
Update files field in olore-lock.json if filtering occurred.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Download Docs
Download documentation files from a source config and filter non-useful files.
Usage
/download-docs prisma@latest # Download specific version
/download-docs prisma@latest --force # Re-download even if existsInput
$ARGUMENTS format: {config_name}@{version} (e.g., prisma@latest, nextjs@16.1.3)
Optional flags:
--force- Re-download even if already built
Execution Steps
Step 1: Parse Arguments and Load Config
Parse $ARGUMENTS:
- Extract
config_nameandversionfrom{config_name}@{version} - Check for
--forceflag
Load config file:
cat vault/configs/{config_name}.jsonExtract:
name- Package name_source.type- Source type (githuborurl)_source.repo- GitHub repo (if github type)versions.{version}.ref- Git ref for the version
Step 2: Check if Already Built
test -f vault/packages/{config_name}/{version}/olore-lock.json && echo "EXISTS" || echo "NOT_FOUND"If exists and no --force flag:
skip: {config_name}@{version} already built (use --force to rebuild)Return early.
Step 3: Download Documentation
For GitHub sources:
bash -c 'source .claude/skills/build-docs/scripts/github.sh && download_from_github "vault/configs/{config_name}.json" "vault/packages" "{version}"'For URL sources:
bash -c 'source .claude/skills/build-docs/scripts/url.sh && download_from_urls "vault/configs/{config_name}.json" "vault/packages" "{version}"'With --force: pass "true" (or "--force") as the 4th argument, otherwise an already-built version is skipped:
bash -c 'source .claude/skills/build-docs/scripts/github.sh && download_from_github "vault/configs/{config_name}.json" "vault/packages" "{version}" true'(Same for download_from_urls.)
Verify download succeeded:
test -f vault/packages/{config_name}/{version}/olore-lock.json && echo "OK" || echo "FAILED"If download failed, return error:
error: {config_name}@{version} download failedStep 4: Count Files and Determine Tier
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 5: Filter Files (GitHub sources with >50 files only)
Skip this step if:
- Source type is
url - File count is <= 50
For GitHub sources with >50 files:
For each file, read only the first 20-30 lines to make filtering decisions:
- Frontmatter/metadata (YAML block)
- Title and first heading
- Opening paragraph describing the content
This is sufficient to identify file type (changelog, RFC, API doc, tutorial, etc.). Do NOT read entire files for filtering - it wastes tokens on large repos.
- Evaluate each file against criteria:
KEEP - Files that help developers USE the library:
- API reference documentation
- Usage guides and tutorials
- Configuration and setup docs
- Code examples and patterns
- Integration guides
- Troubleshooting guides
DELETE - Files NOT useful for using the library:
- Internal development docs
- Contribution guidelines
- Release notes and changelogs
- Meeting notes, RFCs, proposals
- Marketing and landing pages
- Duplicate or stub files
- Auto-generated index files with no content
- Delete files that should be removed:
rm "vault/packages/{config_name}/{version}/contents/{path_to_delete}"- Remove empty directories:
find vault/packages/{config_name}/{version}/contents -type d -empty -deleteStep 6: Update olore-lock.json
Update the lock file with final file count:
# Get final count
final_count=$(find vault/packages/{config_name}/{version}/contents -type f \( -name "*.md" -o -name "*.mdx" \) | wc -l)Update files field in olore-lock.json if filtering occurred.
Step 7: Return Summary
Return ONLY a brief summary:
done: {config_name}@{version} downloaded, {final_count} files{filtered_info}, tier {tier}Examples:
done: prisma@latest downloaded, 312 files (126 filtered), tier 3done: zod@latest downloaded, 17 files, tier 1
Outputs
vault/packages/{config_name}/{version}/contents/- Downloaded documentation filesvault/packages/{config_name}/{version}/olore-lock.json- Build metadata
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

