Step-by-Step Tutorial

Master ContextDigger in 30 minutes with this complete walkthrough

🎯 What You'll Learn

  • ✅ Install ContextDigger (Lesson 0)
  • ✅ Initialize ContextDigger in a project
  • ✅ Navigate code areas efficiently
  • ✅ Bookmark important locations
  • ✅ Track your exploration history
  • ✅ Understand code dependencies
  • ✅ Save and restore context
  • ✅ Document your discoveries
  • ✅ Use analytics to understand your codebase
  • ✅ Collaborate with your team

⏱️ Time Required: ~30 minutes

This tutorial uses a sample e-commerce project as an example. You can follow along with any codebase.

0

Installation & Prerequisites

Goal: Install ContextDigger and verify it's working

📋 Step 0.1: Check Prerequisites

Before installing, make sure you have:

  • Claude Code (Required) - The interface for all ContextDigger commands
  • Python 3.11 or higher - The backend engine
    Check: python3 --version
  • Git (Optional but recommended) - For team collaboration
    Check: git --version

Step 0.2: Quick Install (Recommended)

Install ContextDigger with a single command:

$ curl -sSL https://contextdigger.com/install.sh | bash

✅ What this does:

  • • Checks Python version (requires 3.11+)
  • • Installs the ContextDigger Python package
  • • Installs all 40+ Claude Code skills
  • • Works for both fresh installs and upgrades

⏱️ This takes 30-60 seconds

You'll see progress messages as it installs the package and skills.

Step 0.3: Verify Installation

Make sure everything installed correctly:

Check the Python package:

$ contextdigger --version
ContextDigger v1.0.0

Check the Claude Code skills:

$ ls ~/.claude/commands/*dig*.md | wc -l
37

You should see 37 skill files installed.

🔧 Troubleshooting Common Issues

❌ "contextdigger: command not found"

The pip user bin directory isn't in your PATH.

# Add to ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
# Then reload:
source ~/.bashrc

❌ "Python 3.11+ required"

Upgrade Python to version 3.11 or higher.

Visit: python.org/downloads

📋 Alternative: Manual Installation (Click to expand)

Step 1: Install Python Package

$ pip3 install --user git+https://github.com/ialameh/contextdigger.git

Step 2: Install Claude Skills

$ curl -o - "https://raw.githubusercontent.com/ialameh/contextdigger/main/install-skills.sh" | bash

Step 3: Verify as shown above

✅ Lesson 0 Complete!

ContextDigger is installed and ready to use! Let's initialize your first project.

1

Project Initialization & First Dig

Goal: Initialize ContextDigger in your project and explore your first area

📁 Step 1.1: Open Claude Code in Your Project

Navigate to your project directory and open Claude Code:

$ cd ~/projects/my-ecommerce-app
$ claude

🚀 Step 1.2: Initialize ContextDigger

In the Claude Code chat, type:

$ /init-dig

✅ Instant Execution

The command runs instantly with no approval prompts! ContextDigger v1.0.0 uses a CLI-based architecture for seamless execution. Just type and go.

What happens:

  • • Scans your entire project
  • • Detects programming languages
  • • Discovers logical code areas (frontend, backend, tests, etc.)
  • • Creates `.cdg/` directory

👁️ Step 1.3: View Your Project Dashboard

$ /dig-dashboard

You'll see:

📊 Project Overview: my-ecommerce-app
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Discovered Areas:
• frontend (React components, 45 files)
• backend-api (Express routes, 23 files)
• database (Models & migrations, 15 files)
• authentication (Auth logic, 8 files)
• tests (Unit & integration, 67 files)

🎯 Step 1.4: Dig Into Your First Area

Let's explore the backend-api area:

$ /dig backend-api

What you learn:

  • ✓ All files in this area
  • ✓ Recent changes and who made them
  • ✓ Related areas (what depends on this)
  • ✓ Suggested next steps

✅ Lesson 1 Complete!

You now know how to initialize ContextDigger and navigate to code areas. Time to level up!

2

Navigation & Bookmarks

Goal: Master navigation and bookmark important locations

🔖 Bookmark Critical Files

You're in the authentication area and found the login handler. Let's bookmark it:

$ /dig authentication
# Found src/auth/loginHandler.js - this is important!
$ /mark-spot login-handler

💡 Pro Tip:

Use descriptive names like "login-handler", "payment-bug", "api-endpoint" so you remember what they're for.

📍 List All Your Bookmarks

$ /list-spots
Your Bookmarks:
• login-handler → authentication/loginHandler.js
• payment-flow → backend-api/payments/
• checkout-bug → frontend/components/Checkout.jsx

⚡ Jump to Bookmarks Instantly

Now you're working on something else, but need to go back to the login handler:

$ /goto-spot login-handler

Instantly transported to that location, with full context!

🔍 Search Across Everything

Can't remember where the shopping cart code is?

$ /dig-search "shopping cart"

Searches across:

  • • Code area names
  • • File names and paths
  • • Your notes and bookmarks
  • • Navigation history

◀️ ▶️ Browser-Like Navigation

Just like a web browser, you can go back and forward:

# You went: frontend → backend-api → database
$ /dig-back
# Now at: backend-api
$ /dig-back
# Now at: frontend
$ /dig-forward
# Back to: backend-api

✅ Lesson 2 Complete!

You can now navigate like a pro and never lose your place in the codebase!

3

Code Intelligence

Goal: Understand code relationships and impact

🔗 View Dependencies

Before changing the authentication system, see what depends on it:

$ /dig-deps authentication
Dependencies of authentication:
→ backend-api (imports auth middleware)
→ frontend (uses auth tokens)
→ database (user model)
→ tests (authentication tests)
⚠️ 4 areas depend on authentication

💥 Impact Analysis

Planning to refactor the database layer? See the blast radius:

$ /dig-impact database

⚠️ Impact Report:

  • Direct impact: 23 files import from database/
  • Indirect impact: 67 files will be affected
  • Tests to update: 34 test files
  • Risk level: HIGH - this is core infrastructure

🔥 Find Hotspots

Which files change most frequently? These might need refactoring:

$ /dig-hotspots
Most Changed Files (last 30 days):
🔥🔥🔥 api/products.js (47 commits)
🔥🔥 components/Cart.jsx (31 commits)
🔥🔥 database/migrations/ (28 commits)
🔥 auth/loginHandler.js (19 commits)

✅ Check Test Coverage

$ /dig-coverage backend-api

Coverage Report:

Overall: 78%
⚠️ api/payments.js: 45% (needs more tests!)
✓ api/products.js: 95%
✓ api/users.js: 89%

✅ Lesson 3 Complete!

You can now analyze dependencies, impact, and make informed decisions before changing code!

4

Context Snapshots

Goal: Save and restore your work context

📸 Save Your Current Context

You're deep into a feature. Boss says "drop everything, critical bug!" Save your context first:

# Currently working on: new checkout flow
$ /dig-snapshot checkout-feature
# Saved: current area, bookmarks, history, notes

🐛 Handle the Urgent Bug

$ /dig-search "payment timeout"
$ /dig backend-api
# Fix the bug...
$ /dig-note "Fixed payment timeout in stripe integration"

🔄 Restore Your Context

Bug fixed! Now get back to exactly where you were:

$ /dig-load checkout-feature

Restored:

  • ✓ Back in frontend/checkout area
  • ✓ All your bookmarks loaded
  • ✓ History restored
  • ✓ Notes available

📝 View Your History

$ /dig-history
Your Navigation History:
2:45pm → frontend/checkout (snapshot: checkout-feature)
2:30pm → backend-api/payments (fixed bug)
2:15pm → frontend/checkout
1:50pm → backend-api
1:30pm → authentication

✅ Lesson 4 Complete!

You can now handle interruptions without losing your place. Context switching is painless!

5

Team Collaboration

Goal: Share knowledge and collaborate with your team

📝 Document Your Discoveries

Found something important? Share it with your team:

$ /dig authentication
$ /dig-note "JWT tokens expire after 24h. Refresh token endpoint: /api/auth/refresh"

📚 Generate Team Wiki

$ /dig-wiki

Auto-generates a searchable wiki from all team notes. Perfect for onboarding!

👥 See What Teammates Are Doing

$ /dig-team
Team Activity:
👤 Sarah → frontend/components (working on new UI)
👤 Marcus → backend-api/payments (refactoring)
👤 You → authentication

🎯 Find Code Owners

Who knows the payment system best?

$ /dig-who payments

Experts for payments:

  • 1. Marcus (67% of commits)
  • 2. Elena (28% of commits)
  • 3. Jordan (5% of commits)

✅ Lesson 5 Complete!

You're now collaborating effectively and preserving team knowledge!

🎉

Tutorial Complete!

You've mastered the core ContextDigger workflows

Navigation

Move through codebases with precision

Intelligence

Understand dependencies & impact

Collaboration

Share knowledge with your team