Skip to content

tamtom/android-docs-claude-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Docs Claude Plugin

Offline Android/Kotlin documentation search for Claude Code. Search AndroidX, Compose, Navigation, Lifecycle, and all Kotlin Android APIs without internet access.

Features

  • Fast SQLite Index Search - 189,506+ indexed API entries (classes, functions, properties, etc.)
  • Full-text Grep Search - Search actual documentation content, deprecation notices, examples
  • Self-updating - Scripts to sync new APIs from developer.android.com
  • Offline-first - All documentation stored locally (~1.2GB)

Installation

Option 1: Install via Claude Code (recommended)

In Claude Code, run:

/plugin marketplace add tamtom/android-docs-claude-plugin
/plugin install android-docs@android-docs

Then download the documentation:

cd ~/.claude/plugins/android-docs@android-docs
curl -L https://github.com/tamtom/android-docs-claude-plugin/releases/download/v1.0.0/docs.tar.gz | tar -xz

Option 2: Manual Installation

1. Clone the plugin

cd ~/StudioProjects
git clone https://github.com/tamtom/android-docs-claude-plugin.git
cd android-docs-claude-plugin

2. Download the documentation

The documentation is not included in the repo due to size. Choose one option:

Option A: Download pre-built docs (recommended, ~155MB)

curl -L https://github.com/tamtom/android-docs-claude-plugin/releases/download/v1.0.0/docs.tar.gz | tar -xz

Option B: Build from scratch (1-2 hours)

python3 scripts/setup.py

This will discover ~9,500 pages from developer.android.com, download and process each (96-98% size reduction), and build the search index.

Setup script options:

python3 scripts/setup.py --limit 100    # Test with fewer pages
python3 scripts/setup.py --skip-download # Use existing docs
python3 scripts/setup.py --skip-index    # Skip index rebuild

3. Load the plugin in Claude Code

claude --plugin-dir ~/StudioProjects/android-docs-claude-plugin

Or add to your Claude Code settings for permanent use.

Usage

Once installed, Claude will automatically use the documentation when you ask about Android APIs.

Examples

"What parameters does LazyColumn take?"
"Show me the TextField composable documentation"
"Is LocalAutofillTree deprecated?"
"What's the difference between remember and rememberSaveable?"

Manual Search Commands

You can also search directly. Replace $PLUGIN_DIR with your installation path:

  • Marketplace install: ~/.claude/plugins/android-docs@android-docs
  • Manual install: ~/StudioProjects/android-docs-claude-plugin

SQLite (fast API lookup):

sqlite3 $PLUGIN_DIR/docs/android_api_index.db \
  "SELECT name, type FROM api_index WHERE name LIKE '%Button%' AND type='Function' LIMIT 10;"

Grep (content search):

grep -r "deprecated" $PLUGIN_DIR/docs/Documents/ --include="*.html" | head -20

Keeping Documentation Updated

When new Android APIs are released, navigate to your plugin directory and run the update scripts:

# Set your plugin directory
# Marketplace: cd ~/.claude/plugins/android-docs@android-docs
# Manual: cd ~/StudioProjects/android-docs-claude-plugin

cd $PLUGIN_DIR/docs

# --- Add new pages ---
python3 ../scripts/bulk_updater.py discover      # 1. Fetch online page list
python3 ../scripts/bulk_updater.py diff          # 2. Show missing pages
python3 ../scripts/bulk_updater.py sync          # 3. Download new pages

# --- Update existing pages ---
python3 ../scripts/bulk_updater.py check-updates # Check for modified pages (uses HTTP headers)
python3 ../scripts/bulk_updater.py refresh       # Re-download outdated pages

# --- Rebuild index ---
python3 ../scripts/update_index.py rebuild       # After adding/updating pages

Update Scripts

Script Purpose
bulk_updater.py discover Fetch list of all pages from developer.android.com
bulk_updater.py diff Show pages missing locally
bulk_updater.py sync Download missing pages with HTML processing
bulk_updater.py check-updates Check which local pages have newer versions online
bulk_updater.py refresh Re-download pages flagged as outdated
bulk_updater.py refresh-all Re-download all pages (for major updates)
download_and_process.py fetch <url> Download a single page
update_index.py rebuild Rebuild SQLite index from HTML files
update_index.py search <term> Search the index
update_index.py stats Show index statistics

How It Works

Documentation Processing

Raw pages from developer.android.com are ~7MB each (full site navigation, scripts, etc.). Our processor strips the bloat:

Stage Size
Raw download 7 MB
After processing ~200 KB
Reduction 96-98%

Search Index

The SQLite index contains:

  • 189,506+ entries covering all AndroidX, Compose, and Kotlin Android APIs
  • Entry types: Class, Function, Property, Constructor, Interface, Enum, etc.
  • Direct paths to documentation files

Directory Structure

android-docs-claude-plugin/
├── .claude-plugin/
│   ├── plugin.json           # Plugin manifest (direct loading)
│   └── marketplace.json      # Marketplace distribution
├── skills/
│   └── android-docs-search/
│       └── SKILL.md          # Search skill for Claude
├── scripts/
│   ├── setup.py              # One-command setup script
│   ├── bulk_updater.py       # Bulk sync from developer.android.com
│   ├── download_and_process.py # Single page download
│   └── update_index.py       # SQLite index management
├── docs/                     # Documentation (not in git)
│   ├── android_api_index.db  # SQLite search index
│   └── Documents/            # HTML documentation
└── README.md

Requirements

  • Python 3.8+
  • SQLite3
  • curl (for downloading)
  • ~1.5GB disk space

License

MIT

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

For documentation updates, run the sync scripts and verify the changes work correctly.

About

Offline Android/Kotlin documentation search plugin for Claude Code

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages