Marketplace

cache-health

Performs comprehensive diagnostics on the codex cache system, detects issues, and can fix them automatically with repair operations. Delegates to fractary CLI for health checks and diagnostics.

model: claude-haiku-4-5

$ Instalar

git clone https://github.com/fractary/claude-plugins /tmp/claude-plugins && cp -r /tmp/claude-plugins/plugins/codex/skills/cache-health ~/.claude/skills/claude-plugins

// tip: Run this command in your terminal to install the skill


name: cache-health model: claude-haiku-4-5 description: | Performs comprehensive diagnostics on the codex cache system, detects issues, and can fix them automatically with repair operations. Delegates to fractary CLI for health checks and diagnostics. tools: Bash, Skill version: 4.0.0

Your responsibility is to perform comprehensive diagnostics on the cache system by delegating to the cli-helper skill which invokes the fractary codex health CLI command.

Architecture (v4.0):

cache-health skill
  โ†“ (delegates to)
cli-helper skill
  โ†“ (invokes)
fractary codex health
  โ†“ (uses)
@fractary/codex SDK (CacheManager, ConfigManager, SystemChecker)

This provides comprehensive health diagnostics including cache integrity, configuration validity, performance assessment, storage analysis, and system dependencies via the TypeScript SDK.

<CRITICAL_RULES>

  1. ALWAYS delegate to cli-helper - Never execute operations directly
  2. NEVER invoke bash scripts - The CLI handles all operations
  3. ALWAYS preserve CLI error messages - Pass through verbatim
  4. NEVER bypass the CLI - Don't implement custom health check logic
  5. READ-ONLY by default - Only modify with --fix flag
  6. LOG all fixes - Document repair operations clearly </CRITICAL_RULES>

Step 1: Build CLI Arguments

Construct arguments array from inputs:

args = ["health"]

// Add category filter if specified
if (check_category && check_category !== "all") {
  args.push("--category", check_category)
}

// Add verbose flag
if (verbose) {
  args.push("--verbose")
}

// Add fix flag
if (fix) {
  args.push("--fix")
}

Step 2: Delegate to CLI Helper

USE SKILL: cli-helper Operation: invoke-cli Parameters:

{
  "command": "health",
  "args": [...category_filter, ...verbose_flag, ...fix_flag],
  "parse_output": true
}

The cli-helper will:

  1. Validate CLI installation
  2. Execute: fractary codex health [--category <c>] [--verbose] [--fix] --json
  3. Parse JSON output
  4. Return results

Step 3: Process CLI Response

The CLI returns JSON like:

{
  "status": "success",
  "operation": "health-check",
  "cache": {
    "status": "pass",
    "checks": [
      {"name": "directory_exists", "status": "pass"},
      {"name": "index_valid", "status": "pass"},
      {"name": "files_indexed", "status": "pass"},
      {"name": "permissions_ok", "status": "pass"}
    ],
    "issues": []
  },
  "config": {
    "status": "pass",
    "checks": [
      {"name": "file_exists", "status": "pass"},
      {"name": "valid_json", "status": "pass"},
      {"name": "required_fields", "status": "pass"},
      {"name": "ttl_valid", "status": "pass"}
    ],
    "issues": []
  },
  "performance": {
    "status": "warning",
    "checks": [
      {"name": "hit_rate", "status": "warning", "value": 68.5, "threshold": 70}
    ],
    "issues": [
      {
        "severity": "medium",
        "check": "hit_rate",
        "message": "Cache hit rate below recommended threshold",
        "details": "Current: 68.5%, Expected: > 70%",
        "remediation": "Consider increasing TTL or prefetching common documents"
      }
    ]
  },
  "storage": {
    "status": "pass",
    "checks": [
      {"name": "disk_space", "status": "pass"},
      {"name": "cache_size", "status": "pass"}
    ],
    "issues": []
  },
  "system": {
    "status": "pass",
    "checks": [
      {"name": "git_installed", "status": "pass"},
      {"name": "jq_installed", "status": "pass"},
      {"name": "network_available", "status": "pass"}
    ],
    "issues": []
  },
  "overall": {
    "status": "warning",
    "checks_passed": 22,
    "checks_total": 24,
    "warnings": 2,
    "errors": 0,
    "exit_code": 1
  },
  "recommendations": [
    "Increase TTL to improve cache hit rate",
    "Consider prefetching frequently accessed documents"
  ],
  "fixes_applied": []
}

IF status == "success":

  • Extract health check results from CLI response
  • Proceed to formatting
  • IF persist == true: Create audit report
  • CONTINUE

IF status == "failure":

  • Extract error message from CLI
  • Return error to caller
  • DONE (with error)

Step 4: Format Output

IF format == "json":

  • Return raw CLI output
  • DONE โœ…

IF format == "formatted" (default):

  • Create human-readable display (see OUTPUTS section)
  • Apply category filtering
  • Include recommendations
  • Show fixes applied (if any)
  • CONTINUE

Step 5: Persist Audit Report (if requested)

IF persist == true:

  • Invoke docs-manage-audit skill
  • Create persistent audit report in logs/health/
  • Include historical tracking
  • CONTINUE

Step 6: Return Results

Display formatted output to user.

COMPLETION: Operation complete when health check shown.

<COMPLETION_CRITERIA> Operation is complete when:

โœ… For successful health check:

  • CLI invoked successfully
  • All requested checks performed
  • Issues detected and reported
  • Recommendations provided
  • Fixes applied (if requested)
  • Results displayed to user
  • Audit persisted (if requested)

โœ… For failed health check:

  • Error captured from CLI
  • Error message clear and actionable
  • Results returned to caller

โœ… In all cases:

  • No direct script execution
  • CLI handles all operations
  • Structured response provided </COMPLETION_CRITERIA>

Formatted Output (Default)

๐Ÿฅ Codex Health Check
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

CACHE HEALTH                                              โœ“ Pass
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Directory exists and readable
  โœ“ Index file valid
  โœ“ All files indexed correctly
  โœ“ File permissions correct

CONFIG HEALTH                                             โœ“ Pass
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Configuration file exists
  โœ“ Valid JSON format
  โœ“ Required fields present
  โœ“ TTL values valid

PERFORMANCE HEALTH                                        โš  Warning
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โš  Cache hit rate: 68.5% (threshold: 70%)
    Remediation: Increase TTL or prefetch common documents

STORAGE HEALTH                                            โœ“ Pass
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Disk space sufficient (15.2 GB free)
  โœ“ Cache size within limits (45.2 MB)

SYSTEM HEALTH                                             โœ“ Pass
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Git installed and accessible
  โœ“ jq installed and working
  โœ“ Network connectivity available

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

OVERALL STATUS: โš ๏ธ  Warning

Summary:
  Checks passed:  22/24 (91.7%)
  Warnings:       2
  Errors:         0

Recommendations:
  โ€ข Increase TTL to improve cache hit rate
  โ€ข Consider prefetching frequently accessed documents

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

With Fixes Applied (--fix)

๐Ÿฅ Codex Health Check (with auto-fix)
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

[... health check results ...]

FIXES APPLIED
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Removed 3 orphaned cache files
  โœ“ Rebuilt 2 missing index entries
  โœ“ Fixed permissions on cache directory
  โœ“ Cleared 14 expired documents

Re-running health check to verify fixes...

[... updated health check results ...]

All issues resolved!

Filtered Output (category: "cache")

๐Ÿฅ Cache Health Check
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

CACHE HEALTH                                              โœ“ Pass
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ Directory exists and readable
  โœ“ Index file valid
  โœ“ All files indexed correctly
  โœ“ File permissions correct

OVERALL STATUS: โœ… Healthy

JSON Output (format: "json")

Returns raw CLI JSON response (see Step 3 for structure).

Critical Failure

๐Ÿฅ Codex Health Check
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

STORAGE HEALTH                                            โŒ Critical
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โŒ Disk space critically low: 87 MB free (< 100 MB)
    Remediation: Free up disk space immediately or expand storage

OVERALL STATUS: ๐Ÿ”ด Critical

IMMEDIATE ACTION REQUIRED:
  1. Free up disk space (delete unused files)
  2. Or expand storage capacity
  3. Consider enabling compression
  4. Clear expired cache entries

Run with --fix to attempt automatic cleanup

Failure Response: CLI Error

{
  "status": "failure",
  "operation": "health-check",
  "error": "Health check failed",
  "cli_error": {
    "message": "Cannot read cache index",
    "suggested_fixes": [
      "Check file permissions",
      "Rebuild cache index: fractary codex cache clear --all"
    ]
  }
}

Failure Response: CLI Not Available

{
  "status": "failure",
  "operation": "health-check",
  "error": "CLI not available",
  "suggested_fixes": [
    "Install globally: npm install -g @fractary/cli",
    "Or ensure npx is available"
  ]
}

<ERROR_HANDLING>

Cache Not Found

When CLI reports cache doesn't exist:

  1. Show "Cache not initialized yet" message
  2. NOT an error condition
  3. Suggest fetching documents to populate

Permission Denied

When CLI reports permission issues:

  1. Show permission error details
  2. Suggest chmod/chown commands
  3. Offer to fix with --fix flag

Disk Full

When CLI reports disk space critical:

  1. Show severity: CRITICAL
  2. Recommend immediate action
  3. Suggest freeing space or expansion
  4. Offer to clear expired with --fix

Corrupted Index

When CLI reports corrupted index:

  1. Show corruption details
  2. Suggest rebuild: fractary codex cache clear --all
  3. Offer to repair with --fix flag
  4. Explain cache is regeneratable

Missing Dependencies

When CLI reports missing tools:

  1. List which dependencies are missing
  2. Provide installation instructions
  3. Explain impact on functionality

CLI Not Available

When cli-helper reports CLI unavailable:

  1. Pass through installation instructions
  2. Don't attempt workarounds
  3. Return clear error to caller

CLI Command Failed

When CLI returns error:

  1. Preserve exact error message from CLI
  2. Include suggested fixes if CLI provides them
  3. Add context about what was being checked
  4. Return structured error

</ERROR_HANDLING>

<DOCS_MANAGE_AUDIT_INTEGRATION>

Persistent Audit Reports (--persist flag)

When the --persist flag is provided, invoke docs-manage-audit to create a persistent audit report:

USE SKILL: docs-manage-audit
Operation: create
Parameters: {
  "audit_type": "system",
  "check_type": "cache-health",
  "audit_data": {
    "audit": {
      "type": "system",
      "check_type": "cache-health",
      "timestamp": "{ISO8601}",
      "auditor": {
        "plugin": "fractary-codex",
        "skill": "cache-health"
      }
    },
    "summary": {
      "overall_status": "{health_status}",
      "status_counts": {
        "passing": {checks_passed},
        "warnings": {warnings},
        "failures": {errors}
      }
    },
    "findings": {
      "categories": [...],
      "by_severity": {...}
    },
    "metrics": {
      "cache_hit_rate": {percentage},
      "avg_fetch_time_ms": {time},
      "cache_size_mb": {size}
    },
    "recommendations": [...]
  },
  "output_path": "logs/health/"
}

This generates:

  • README.md: Human-readable health dashboard
  • audit.json: Machine-readable health data

Both in logs/health/{timestamp}-cache-health.[md|json]

Benefits:

  • Historical health trend analysis
  • Track fixes over time
  • Identify recurring issues
  • Audit trail for debugging </DOCS_MANAGE_AUDIT_INTEGRATION>

Success (Healthy):

๐ŸŽฏ STARTING: cache-health
Category: {category}
Fix mode: {enabled|disabled}
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

[Health check results]

โœ… COMPLETED: cache-health
Status: Healthy
Checks passed: {count}/{total}
Source: CLI (via cli-helper)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Success (Warnings):

๐ŸŽฏ STARTING: cache-health
Category: {category}
Fix mode: {enabled|disabled}
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

[Health check results with warnings]

โš ๏ธ  COMPLETED: cache-health (warnings)
Status: Warning
Checks passed: {count}/{total}
Warnings: {count}
Recommendations provided
Source: CLI (via cli-helper)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Success (Errors):

๐ŸŽฏ STARTING: cache-health
Category: {category}
Fix mode: {enabled|disabled}
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

[Health check results with errors]

โŒ COMPLETED: cache-health (errors)
Status: Error
Checks passed: {count}/{total}
Errors: {count}
Fixes available with --fix flag
Source: CLI (via cli-helper)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Failure:

๐ŸŽฏ STARTING: cache-health
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

โŒ FAILED: cache-health
Error: {error_message}
Suggested fixes:
- {fix 1}
- {fix 2}
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Migration from v3.0

v3.0 (bash scripts):

cache-health
  โ””โ”€ scripts/run-health-check.sh
      โ”œโ”€ checks cache integrity
      โ”œโ”€ validates configuration
      โ”œโ”€ analyzes performance
      โ”œโ”€ assesses storage
      โ”œโ”€ verifies system deps
      โ””โ”€ applies fixes if requested

v4.0 (CLI delegation):

cache-health
  โ””โ”€ delegates to cli-helper
      โ””โ”€ invokes: fractary codex health

Benefits:

  • ~95% code reduction in this skill
  • TypeScript type safety from SDK
  • More comprehensive checks
  • Better fix automation
  • Built-in recommendations
  • Automatic severity assessment

CLI Command Used

This skill delegates to:

fractary codex health [--category <category>] [--verbose] [--fix] --json

SDK Features Leveraged

Via the CLI, this skill benefits from:

  • CacheManager.healthCheck() - Cache integrity
  • ConfigManager.validate() - Configuration checks
  • PerformanceMonitor.assess() - Performance metrics
  • StorageAnalyzer.check() - Storage analysis
  • SystemChecker.verify() - Dependency checks
  • Built-in fix automation
  • Automatic recommendations

Health Check Categories

Cache Integrity:

  • Directory exists and readable
  • Index file valid
  • All files indexed correctly
  • File permissions correct
  • No corrupted entries

Configuration Validity:

  • Config file exists
  • Valid YAML/JSON format
  • Required fields present
  • TTL values reasonable
  • Handler references valid

Performance Assessment:

  • Cache hit rate acceptable (> 70%)
  • Average fetch time reasonable (< 3s)
  • Failed fetch rate low (< 5%)
  • Expired documents manageable (< 20%)

Storage Analysis:

  • Disk space sufficient (> 1GB free)
  • Cache size within limits
  • Growth rate normal
  • Compression working (if enabled)

System Dependencies:

  • Git installed and accessible
  • jq installed and working
  • Network connectivity available
  • Write permissions correct

Auto-Fix Capabilities

The CLI can automatically fix:

  • Remove orphaned cache files
  • Rebuild missing index entries
  • Fix file permissions
  • Clear expired documents
  • Repair corrupted entries
  • All fixes are logged

Testing

To test this skill:

# Ensure CLI installed
npm install -g @fractary/cli

# Run health check
USE SKILL: cache-health
Parameters: {
  "check_category": "all",
  "format": "formatted"
}

# Run with auto-fix
USE SKILL: cache-health
Parameters: {
  "fix": true,
  "verbose": true
}

# Run specific category
USE SKILL: cache-health
Parameters: {
  "check_category": "performance",
  "format": "json"
}

Troubleshooting

If health check fails:

  1. Check CLI installation: fractary --version
  2. Test CLI directly: fractary codex health
  3. Check basic access: Can you read .fractary/codex/?
  4. Verify dependencies: git, jq installed?
  5. Check disk space: df -h