# plugin-fetch-specs > Manually refresh Claude Code specification cache from authoritative sources - Author: Edison - Repository: soilmass/claudeutils - Version: 20260127023329 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/soilmass/claudeutils - Web: https://mule.run/skillshub/@@soilmass/claudeutils~plugin-fetch-specs:20260127023329 --- --- name: plugin-fetch-specs description: Manually refresh Claude Code specification cache from authoritative sources argument-hint: "[--force] [--source plugins|skills|hooks|all]" user-invocable: true model: haiku --- # plugin-fetch-specs Manually refresh the specification cache from authoritative sources. Use when specs may have changed or cache is stale. ## When to Use Use this skill when: - Specs may have been updated upstream - Cache is older than expected - You want to force a fresh fetch - Troubleshooting spec-related issues ## Arguments | Argument | Required | Description | |----------|----------|-------------| | `--force` | No | Force refresh even if cache is valid | | `--spec` | No | Fetch specific spec only (plugins, skills, hooks, mcp, agents) | | `--status` | No | Show cache status without fetching | ## Example Usage ``` /plugin-fetch-specs ``` ``` /plugin-fetch-specs --force ``` ``` /plugin-fetch-specs --spec plugins ``` ``` /plugin-fetch-specs --status ``` ## Specification Sources | Spec | URL | Purpose | |------|-----|---------| | plugins | code.claude.com/docs/en/plugins | Plugin structure | | plugins-reference | code.claude.com/docs/en/plugins-reference | Manifest fields | | skills | agentskills.io/specification | Skill format | | hooks | code.claude.com/docs/en/hooks | Hook events | | mcp | code.claude.com/docs/en/mcp | MCP configuration | | agents | code.claude.com/docs/en/sub-agents | Agent format | | memory | code.claude.com/docs/en/memory | Memory/context | | settings | code.claude.com/docs/en/settings | Settings format | ## Workflow When invoked, follow these steps: ### Step 1: Parse Arguments - Check for `--force` flag - Check for `--spec ` filter - Check for `--status` flag ### Step 2: If --status, Show Cache Status ``` Spec Cache Status ================= Cache directory: state/specs/ Last full fetch: 2025-01-26 14:30:00 Cached specs: plugins: valid (2025-01) plugins-reference: valid (2025-01) skills: valid (1.0.0) hooks: valid (2025-01) mcp: valid (2025-01) agents: valid (2025-01) memory: expired (2024-12) settings: valid (2025-01) Cache TTL: 24 hours ``` Exit after showing status. ### Step 3: Fetch Specs Use the spec-cache library: ```bash source "${CLAUDE_PROJECT_DIR}/hooks/lib/spec-cache.sh" if [[ "$FORCE" == "true" ]]; then fetch_all_specs --force elif [[ -n "$SPECIFIC_SPEC" ]]; then fetch_spec "$SPECIFIC_SPEC" else fetch_all_specs fi ``` ### Step 4: Check for Changes Compare fetched specs with previous versions: ``` Spec Changes Detected: - plugins: Updated (new hook events added) - skills: No change - hooks: Updated (new matchers available) ``` ### Step 5: Report Results ``` Spec Fetch Complete =================== Fetched: 8 specs - plugins: 2025-01 (updated) - plugins-reference: 2025-01 - skills: 1.0.0 - hooks: 2025-01 (updated) - mcp: 2025-01 - agents: 2025-01 - memory: 2025-01 - settings: 2025-01 Changes detected: 2 specs updated Cache location: state/specs/ Cache valid for: 24 hours Use /plugin-fetch-specs --status to check cache anytime. ``` ## Integration Points - Uses `hooks/lib/spec-cache.sh` library - Updates `state/specs/manifest.json` - Caches specs to `state/specs/*.md` ## Error Handling - If network unavailable: Report which specs failed, continue with cached - If specific spec not found: Report error with valid spec names - If cache directory not writable: Report permission error