Manages a local document metadata index (URLs, summaries, tags) for files used by Asta skills and tools. Automatically indexes documents written to .asta/ by other skills.
Ships in asta-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill provides complete document management functionality for tracking research papers, documentation, and resources using the asta documents CLI.
What it does: Track document metadata (URLs, summaries, tags) in a local index. Think of it as a smart bookmark manager with powerful search capabilities.
Default Index Location: .asta/documents/index.yaml (relative to current working directory). The --index-path flag is optional when using the default location; it's only needed for custom index locations or remote indexes.
IMPORTANT: When other Asta skills (like literature research) write documents to .asta/ (in the current working directory), you should automatically index them in the document store. This ensures all Asta-generated documents are tracked and searchable.
Workflow:
.asta/ (e.g., literature reports, paper collections)file:// URL pointing to the local path (use absolute paths for file:// URLs)Example:
# After a literature report is written to .asta/literature/report/2024-01-15-ml.md
# Convert relative path to absolute for file:// URL
REPORT_PATH="$(pwd)/.asta/literature/report/2024-01-15-ml.md"
asta documents add "file://${REPORT_PATH}" \
--name="Literature Report: Machine Learning" \
--summary="Comprehensive report on machine learning papers from 2023-2024" \
--tags="asta-generated,literature-report,ml" \
--mime-type="text/markdown"
Add --json flag to any command for machine-readable output.
Uses .asta/documents/index.yaml by default (add --index-path <file> for custom locations).
# List documents
asta documents list
asta documents list --tags="ai,research"
# Search documents (by field)
asta documents search --summary="query"
asta documents search --name="title words"
asta documents search --tags="ai,nlp"
asta documents search --extra=".year > 2020"
# Multi-field search (intersection - matches ALL)
asta documents search --summary="transformers" --tags="ai"
# Multi-field search (union - matches ANY)
asta documents search --summary="transformers" --name="BERT" --union
# Add document (use absolute path for file:// URLs)
asta documents add <url> \
--name="Title" \
--summary="Description" \
--tags="tag1,tag2" \
--extra='{"author": "Smith et al", "year": 2024, "venue": "NeurIPS"}'
# Get document metadata
asta documents get <uuid>
# Update document
asta documents update <uuid> \
--name="New Title" \
--tags="new,tags"
# Fetch document content
asta documents fetch <uuid> -o /tmp/document.pdf
# Manage tags
asta documents add-tags <uuid> --tags="new,tags"
asta documents remove-tags <uuid> --tags="old,tags"
# Cache management
asta documents cache list
asta documents cache stats
asta documents cache clean --days 7
# Summary information (document counts)
asta documents show
Always use the command line interface for all operations to ensure proper index management and caching. Avoid direct read/write operations on the index file.
Asta documents can reference remote indexes using the asta:// URL scheme. This allows sharing document collections hosted on the web.
URL Format:
asta://{url-encoded-index-url}/{uuid}
Where:
{url-encoded-index-url} is the URL-encoded URL to the remote index.yaml file{uuid} is the 10-character document identifierExample:
# Actual index URL: https://example.com/research/index.yaml
# Asta URL: asta://https%3A%2F%2Fexample.com%2Fresearch%2Findex.yaml/6MNxGbWGRC
Workflow:
When you encounter an asta:// URL, follow these steps:
--index-path parameterExample:
# Given an asta:// URL
ASTA_URL="asta://https%3A%2F%2Fexample.com%2Fresearch%2Findex.yaml/6MNxGbWGRC"
# 1. Parse the URL components (extract encoded index URL and UUID)
ENCODED_INDEX_URL=$(echo "$ASTA_URL" | sed 's|^asta://||' | sed 's|/[^/]*$||')
UUID=$(echo "$ASTA_URL" | sed 's|.*/||')
# 2. URL-decode the index URL
INDEX_URL=$(python3 -c "import urllib.parse; print(urllib.parse.unquote('$ENCODED_INDEX_URL'))")
# 3. Download the remote index
curl -s -o /tmp/remote-index.yaml "$INDEX_URL"
# 4. Get document metadata using --index-path
asta documents get "$UUID" --index-path /tmp/remote-index.yaml
# 5. Fetch document content
asta documents fetch "$UUID" --index-path /tmp/remote-index.yaml -o /tmp/document.pdf
Common Operations with Remote Indexes:
# After downloading and decoding the index URL (see examples above)
# Assume TEMP_INDEX points to the downloaded index file
# Search remote index
asta documents search --summary="query" --index-path "$TEMP_INDEX"
# List all documents in remote index
asta documents list --index-path "$TEMP_INDEX"
# Get metadata for specific document
asta documents get "$UUID" --index-path "$TEMP_INDEX"
# Search and fetch from remote index
asta documents search --summary="transformers" --index-path "$TEMP_INDEX" --show-scores
asta documents fetch "$UUID" --index-path "$TEMP_INDEX" -o result.pdf
Important Notes:
--index-path parameter works with all read commands (list, search, get, fetch)Complete Example Workflow:
# User provides: asta://https%3A%2F%2Fai.example.org%2Fpapers%2Findex.yaml/AbC123XyZ9
# Step 1: Extract components
ASTA_URL="asta://https%3A%2F%2Fai.example.org%2Fpapers%2Findex.yaml/AbC123XyZ9"
ENCODED_INDEX_URL=$(echo "$ASTA_URL" | sed 's|^asta://||' | sed 's|/[^/]*$||')
UUID=$(echo "$ASTA_URL" | sed 's|.*/||')
# Step 2: URL-decode the index URL
INDEX_URL=$(python3 -c "import urllib.parse; print(urllib.parse.unquote('$ENCODED_INDEX_URL'))")
# Result: https://ai.example.org/papers/index.yaml
# Step 3: Download index to temp location
TEMP_INDEX="/tmp/asta-index-$(date +%s).yaml"
curl -s -o "$TEMP_INDEX" "$INDEX_URL"
# Step 4: Verify download succeeded
if [ ! -f "$TEMP_INDEX" ]; then
echo "Failed to download index from $INDEX_URL"
exit 1
fi
# Step 5: Access the document
asta documents get "$UUID" --index-path "$TEMP_INDEX"
asta documents fetch "$UUID" --index-path "$TEMP_INDEX" -o /tmp/paper.pdf
# Step 6: Read the content
# Read(/tmp/paper.pdf)
The index stores metadata only. The content of a document is retrievable via its URL. The fetch command retrieves the content and caches it locally for future use.
Fetch to file (with automatic caching):
asta documents fetch <uuid> -o /tmp/document.pdf
The system supports multiple protocols for document URLs:
Local and Web:
http:// and https:// - Web URLs (uses curl)file:// - Local file system (uses curl)Cloud Storage:
s3:// - Amazon S3 (requires AWS CLI)gs:// - Google Cloud Storage (requires gsutil)Cloud Storage Setup:
For S3:
# Install AWS CLI
brew install awscli # macOS
pip install awscli # or via pip
# Configure credentials
aws configure
# Or use: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_PROFILE
For GCS:
# Install Google Cloud SDK
brew install --cask google-cloud-sdk # macOS
# Authenticate
gcloud auth login
# Or use: GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
Examples:
# Add document from S3
asta documents add s3://my-bucket/papers/research.pdf \
--name="Research Paper" \
--summary="ML research findings" \
--tags="ml,research"
# Add document from GCS
asta documents add gs://my-bucket/docs/spec.pdf \
--name="Technical Spec" \
--summary="System specifications" \
--tags="docs"
# Fetch works the same for all protocols
asta documents fetch <uuid> -o local-copy.pdf
List cached items:
asta documents cache list
Show cache statistics:
asta documents cache stats
Clean old cache entries:
# Remove items older than N days
asta documents cache clean --days 14
Clear entire cache:
asta documents cache clear
asta documents cache clear -y # Skip confirmation
Show specific item details:
asta documents cache info <hash>
# After literature find writes to .asta/
# List all files in .asta/
ls -la .asta/
# For each new document, add to index (convert to absolute path for file:// URL)
REPORT_PATH="$(pwd)/.asta/literature/report/literature-report.md"
asta documents add "file://${REPORT_PATH}" \
--name="Literature Report: Transformers" \
--summary="Research findings on transformer architectures" \
--tags="asta-generated,literature-report,transformers" \
--mime-type="text/markdown"
# Now the document is searchable
asta documents search --tags="asta-generated"
# Add research paper
asta documents add https://arxiv.org/pdf/1706.03762.pdf \
--name="Attention Is All You Need" \
--summary="Seminal paper introducing Transformer architecture" \
--tags="ai,research,nlp,transformers" \
--mime-type="application/pdf" \
--extra='{"author": "Vaswani et al", "year": 2017, "venue": "NeurIPS"}'
# Search papers by tag
asta documents search --tags="transformers"
# Search for relevant documents
asta documents search --summary="transformer architecture" --show-scores
# Get metadata for top result (using UUID from search results)
asta documents get 6MNxGbWGRC
# Fetch content
asta documents fetch 6MNxGbWGRC -o /tmp/paper.pdf -q
# Read with PDF support
# Read(/tmp/paper.pdf)
# Search and extract UUIDs
RESULTS=$(asta documents search --summary="query" --json)
# Get first UUID (example with Python)
UUID=$(echo "$RESULTS" | python3 -c "import sys,json; results=json.load(sys.stdin); print(results[0]['result']['uuid'] if results else '')")
# Fetch that document
asta documents fetch "$UUID" -o result.pdf
# List documents with old tag
DOCS=$(asta documents list --tags="old-tag" --json)
# For each, remove old tag and add new
for uuid in $(echo "$DOCS" | python3 -c "import sys,json; print('\\n'.join([d['uuid'] for d in json.load(sys.stdin)]))"); do
asta documents remove-tags "$uuid" --tags="old-tag"
asta documents add-tags "$uuid" --tags="new-tag"
done
# Get current metadata (using UUID)
asta documents get 6MNxGbWGRC
# Update multiple fields
asta documents update 6MNxGbWGRC \
--name="Updated Title" \
--summary="Updated summary with more details" \
--tags="updated,revised,2025"
# Check cache usage
asta documents cache stats
# List what's cached
asta documents cache list
# Remove old entries if cache is large
asta documents cache clean --days 7
# Verify cache reduction
asta documents cache stats
Asta uses different search strategies optimized for each document field. You can search single fields or combine multiple fields with intersection/union modes.
--summary (Summary search):
asta documents search --summary="papers about transformers"--name (Name search):
asta documents search --name="Attention"--tags (Tag search):
asta documents search --tags="ai,nlp"--extra (Extra metadata search):
>, >=, <, <=, ==, containsasta documents search --extra=".year > 2020"asta documents search --extra=".author contains Smith"asta documents search --extra=".venue == NeurIPS"Combine multiple field queries to create powerful filtered searches:
Intersection mode (default):
asta documents search --summary="transformers" --tags="ai"Union mode (--union flag):
asta documents search --summary="transformers" --name="BERT" --unionHierarchical Scoring:
Results are sorted using a priority hierarchy where tags/extra act as filters:
Summary score (highest priority) - if --summary present
Name score (medium priority) - if --name present
Created timestamp (lowest priority) - if only --tags or --extra
Examples:
# Summary + tags: Sorted by summary relevance (tags filter)
asta documents search --summary="machine learning" --tags="ai"
# Name + tags: Sorted by name word-match (tags filter)
asta documents search --name="Python" --tags="programming"
# Tags only: Sorted by creation timestamp
asta documents search --tags="research"
# Three fields: Summary ranks, name and extra filter
asta documents search --summary="transformers" --name="Attention" --extra=".year > 2015"
Human-readable (default):
JSON (--json flag):
Verbose (-v flag for list):
.asta/ by other skills (uses .asta/documents/index.yaml by default)-q suppresses progress messages$(pwd)/ to ensure correct resolution"asta-documents: command not found"
uv tool list | grep astaexport PATH="$HOME/.local/bin:$PATH"uv tool install git+https://github.com/allenai/asta-resource-repo.git"Document not found"
asta documents list --json | grep <partial-uuid>.asta/documents/index.yaml"Fetch failed"
curl -I <url>--force"Search returns no results"
asta documents search --name="keyword"asta documents search --tags="tag"asta documents list--union"Cache is large"
asta documents cache statsasta documents cache clean --days 7asta documents cache clear -yUpdate the asta-documents CLI:
uv tool install --reinstall git+https://github.com/allenai/asta-resource-repo.git
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/asta-tools:asta-documentsfrom asta-tools
npx claudepluginhub allenai/asta-plugins --plugin asta-tools17 skills in this plugin
/analyze-dataThis skill should be used when the user asks to "analyze this dataset", "run datavoyager", "run data voyager", "explore this data", "what's in this CSV", "statistical analysis of", "find patterns in", or wants an AI-driven, code-executing analysis of a tabular dataset that answers a specific research question./artifactsUse this skill to export and open A2A agent task outputs — "export the task results", "convert the task output to HTML", or work with the structured artifacts produced by an A2A agent task run./asta-cliInstall or update the `asta` CLI to the version pinned by this plugin. Invoke whenever `asta` is not on PATH (e.g. `command not found` for `asta`) or when a subcommand/flag appears missing — that signals a stale install needing an update./autodiscoveryCreate, configure, and monitor AutoDiscovery runs — either via the hosted service (`asta autodiscovery`) or via the local CLI (`auto-discovery`). Use when the user asks about their runs, experiments, discoveries, wants to check status, or wants to start a new discovery run./check-claimsJudge whether factual claims in an evidence-backed research write-up are substantiated — which claims assert something checkable with no evidence attached, and whether an attached quote supports the claim as worded. Works over whatever scope the request names — a pull request diff, your own uncommitted change, one file, or a whole project audited end to end. Triggers on "check my claims", "is this claim supported", "evidence review", "audit the evidence", or review of research prose using `.ev` evidence./experimentRun scientific (software) experiments. Use when the user asks to "run an experiment", "run an investigation", or "research with Asta." Also use this skill to analyze experimental data generate a research report from it. The user may refer to this system by its internal project name, "Panda."Other plugins' skills for the same job