Detects project dependencies and suggests fetching relevant documentation automatically
Automatically detects project dependencies from package.json, requirements.txt, go.mod, and other manifest files. Triggers when you open a project or add new dependencies to suggest fetching relevant documentation.
/plugin marketplace add squirrelsoft-dev/doc-fetcher/plugin install doc-fetcher@squirrelsoft-dev-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
I automatically detect your project's dependencies and suggest fetching relevant documentation to provide accurate, version-specific AI assistance.
I analyze your project to understand what libraries you're using:
Detection files:
package.json - npm/yarn/pnpm dependenciespackage-lock.json - Locked versionsyarn.lock - Yarn locked versionspnpm-lock.yaml - pnpm locked versionsbun.lockb - Bun locked versionsParsed fields:
{
"dependencies": { ... }, // Production deps
"devDependencies": { ... }, // Dev deps (lower priority)
"peerDependencies": { ... } // Peer deps (important for plugins)
}
Prioritized libraries:
Detection files:
requirements.txt - pip dependenciespyproject.toml - Poetry/modern PythonPipfile - Pipenvsetup.py - Package setupenvironment.yml - CondaPrioritized libraries:
Detection files:
go.mod - Go modulesgo.sum - ChecksumsPrioritized libraries:
Detection files:
Cargo.toml - Rust dependenciesCargo.lock - Locked versionsPrioritized libraries:
Scanning project for dependencies...
✓ Found package.json
✓ Found package-lock.json (exact versions available)
✓ Detected package manager: npm
// Example package.json
{
"dependencies": {
"next": "^15.0.3",
"react": "^18.2.0",
"@supabase/supabase-js": "^2.39.0",
"tailwindcss": "^3.4.0"
},
"devDependencies": {
"typescript": "^5.3.0",
"@types/react": "^18.2.0"
}
}
Extracted:
Production dependencies: 4
Development dependencies: 2
Frameworks detected:
- Next.js (v15.0.3)
- React (v18.2.0)
Libraries detected:
- Supabase (v2.39.0)
- Tailwind CSS (v3.4.0)
Resolving exact versions...
next: ^15.0.3 → 15.0.3 (from package-lock.json)
react: ^18.2.0 → 18.2.0 (from package-lock.json)
@supabase/supabase-js: ^2.39.0 → 2.39.0 (from package-lock.json)
tailwindcss: ^3.4.0 → 3.4.1 (from package-lock.json)
Comparing with cached documentation...
✓ next@15.0.3
Cached: v15.0.3 ✓ (matches exactly)
Skill: nextjs-15-expert (active)
✗ react@18.2.0
Cached: Not cached
Suggestion: /fetch-docs react 18.2.0
⚠ @supabase/supabase-js@2.39.0
Cached: v2.38.0 (outdated by 1 minor version)
Suggestion: /update-docs supabase
✓ tailwindcss@3.4.1
Cached: v3.4.0 (close enough, minor version)
Skill: tailwind-expert (active)
Documentation Recommendations:
Priority 1 (Critical frameworks):
1. /fetch-docs react 18.2.0
Reason: Core framework, not cached
Priority 2 (Outdated versions):
2. /update-docs supabase
Reason: Cached version (2.38.0) is outdated
Priority 3 (Optional):
3. /fetch-docs typescript 5.3.0
Reason: Dev dependency, could improve type hints
Quick setup:
Run all: /fetch-docs react && /update-docs supabase
Or automatically:
/fetch-docs --project
I prioritize documentation fetching based on:
These are essential and should be fetched immediately:
Reasoning: These are the foundation of your application. Accurate docs are critical.
Important but not critical:
Reasoning: Used extensively, but usually have stable APIs.
Nice to have:
Reasoning: Smaller scope, less likely to have breaking changes.
Lowest priority:
Reasoning: Less likely to need frequent reference.
Some libraries have different documentation names:
const libraryMappings = {
// npm package → documentation name
"@supabase/supabase-js": "supabase",
"@supabase/auth-helpers-nextjs": "supabase-auth",
"next": "nextjs",
"tailwindcss": "tailwind",
"@tanstack/react-query": "react-query",
"@mui/material": "mui",
"@chakra-ui/react": "chakra-ui"
};
I automatically map these when suggesting fetches.
How I determine if cached docs are "good enough":
const versionMatch = (cached, required) => {
const [cMajor, cMinor, cPatch] = cached.split('.');
const [rMajor, rMinor, rPatch] = required.split('.');
// Major version MUST match
if (cMajor !== rMajor) return 'mismatch';
// Minor version ideally matches
if (cMinor === rMinor) return 'exact';
if (Math.abs(cMinor - rMinor) === 1) return 'close';
return 'outdated';
};
// Results:
// 'exact' → ✓ Perfect, use cached docs
// 'close' → ⚠ Close enough, but update recommended
// 'outdated' → ⚠ Should update
// 'mismatch' → ✗ Must fetch correct major version
I automatically activate in these scenarios:
When you open a project with Claude Code:
Welcome to your Next.js project!
Detected dependencies:
- Next.js 15.0.3 ✓ (docs cached)
- React 18.2.0 ✗ (not cached)
Would you like me to fetch React documentation?
→ /fetch-docs react 18.2.0
When you modify package.json:
Detected new dependency: @tanstack/react-query@5.17.0
This library is not cached yet. Fetch documentation?
→ /fetch-docs react-query 5.17.0
When you explicitly request project analysis:
/list-docs --project
Project Dependencies Analysis:
From package.json:
✓ next@15.0.3 (cached, current)
✗ react@18.2.0 (not cached)
⚠ @supabase/supabase-js@2.39.0 (cached 2.38.0, outdated)
Recommendations:
/fetch-docs react 18.2.0
/update-docs supabase
I work with other doc-fetcher skills:
User opens project
↓
dependency-detector activates
↓
Detects: next@15.0.3, react@18.2.0
↓
Checks cache:
- next ✓ cached
- react ✗ not cached
↓
Suggests: /fetch-docs react
↓
User runs command
↓
llms-txt-finder checks for llms.txt
↓
doc-indexer crawls and caches
↓
doc-skill-generator creates react-18-expert
↓
dependency-detector confirms:
✓ All project dependencies documented
Configure my behavior in doc-fetcher-config.json:
{
"dependency_detection": {
"auto_detect": true,
"auto_suggest": true,
"project_types": ["javascript", "typescript", "python", "go", "rust"],
"include_dev_dependencies": false,
"prioritize_frameworks": true,
"version_match_tolerance": "minor",
"suggest_on_project_open": true,
"suggest_on_dependency_add": true
}
}
Project dependency check:
✓ All dependencies have cached documentation
next@15.0.3 → nextjs-15-expert (active)
react@18.2.0 → react-18-expert (active)
@supabase/supabase-js@2.39.0 → supabase-expert (active)
You're all set! Claude has accurate docs for your entire stack.
Project dependency check:
Missing documentation for 2 dependencies:
✗ react@18.2.0
Impact: High (core framework)
Command: /fetch-docs react 18.2.0
✗ @tanstack/react-query@5.17.0
Impact: Medium (data fetching library)
Command: /fetch-docs react-query 5.17.0
Quick fix:
/fetch-docs react 18.2.0 && /fetch-docs react-query 5.17.0
Or batch:
/fetch-docs --project
Project dependency check:
✓ Cached and current: 3 dependencies
next@15.0.3, typescript@5.3.0, tailwindcss@3.4.1
⚠ Cached but outdated: 1 dependency
@supabase/supabase-js@2.39.0
(cached: 2.38.0, outdated by 1 minor version)
Command: /update-docs supabase
✗ Not cached: 1 dependency
react@18.2.0
Command: /fetch-docs react 18.2.0
Quick fix:
/update-docs supabase && /fetch-docs react 18.2.0
# Clone a repo
git clone https://github.com/example/app
cd app
# Open with Claude Code
# dependency-detector auto-runs
Detected: next@15.0.3, react@18.2.0, supabase@2.39.0
None cached. Fetch all?
/fetch-docs --project
# Claude now has accurate context for entire stack
# Upgrade Next.js
npm install next@latest
# dependency-detector notices change
Dependency version changed:
next: 15.0.3 → 15.1.0
Documentation needs update:
/update-docs nextjs
# Claude now knows about new features
# Add React Query
npm install @tanstack/react-query
# dependency-detector notices
New dependency detected: @tanstack/react-query@5.17.0
Fetch documentation?
/fetch-docs react-query 5.17.0
# Claude can now help with React Query
"Dependency detection not working"
auto_detect enabled in config"Wrong version detected"
"Too many suggestions"
"Library not recognized"
/list-docs --project - View project documentation status/fetch-docs --project - Fetch all missing project docs/update-docs --project - Update all project docsdoc-indexer skill - Performs the actual fetchingThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.