{
  "schemaVersion": "1.0",
  "item": {
    "slug": "contextclaw-usage",
    "name": "ContextClaw Plugin Usage",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/rmruss2022/contextclaw-usage",
    "canonicalUrl": "https://clawhub.ai/rmruss2022/contextclaw-usage",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/contextclaw-usage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=contextclaw-usage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "contextclaw-usage",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T03:25:20.693Z",
      "expiresAt": "2026-05-09T03:25:20.693Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=contextclaw-usage",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=contextclaw-usage",
        "contentDisposition": "attachment; filename=\"contextclaw-usage-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "contextclaw-usage"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/contextclaw-usage"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/contextclaw-usage",
    "agentPageUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "When to Use",
        "body": "Use this skill when the user asks about:\n\nSession management or cleanup\nContext usage or token consumption\nStorage space used by sessions\nPruning old sessions\nCleaning up orphaned session files\nSession analysis or statistics\nWhich sessions are taking up space\nHow many messages/tokens in sessions"
      },
      {
        "title": "Prerequisites",
        "body": "The ContextClaw plugin must be installed:\n\nnpm install -g @rmruss2022/contextclaw\nopenclaw plugins install @rmruss2022/contextclaw"
      },
      {
        "title": "Quick Start",
        "body": "Check if ContextClaw is installed and running:\n\nopenclaw contextclaw status"
      },
      {
        "title": "Analyze Sessions",
        "body": "Get comprehensive analysis of all sessions:\n\nopenclaw contextclaw analyze\n\nThis shows:\n\nTotal sessions, messages, tokens, storage size\nLargest sessions (top 10)\nOldest sessions (top 10)\nOrphaned sessions"
      },
      {
        "title": "Prune Old Sessions",
        "body": "Clean up sessions older than N days (default: 30):\n\n# Dry run (preview only, safe)\nopenclaw contextclaw prune --days 30\n\n# Live run (actually deletes)\nopenclaw contextclaw prune --days 30 --dryRun false\n\nSafety features:\n\nDry run by default (previews before deleting)\nAlways keeps main agent sessions\nAlways keeps cron sessions\nShows confirmation before deleting"
      },
      {
        "title": "Clean Orphaned Sessions",
        "body": "Remove session files not referenced in sessions.json:\n\n# Dry run\nopenclaw contextclaw clean-orphaned\n\n# Live run\nopenclaw contextclaw clean-orphaned --dryRun false"
      },
      {
        "title": "Dashboard",
        "body": "Open the visual session management dashboard:\n\nopenclaw contextclaw dashboard\n\nThis opens http://localhost:18797"
      },
      {
        "title": "Quick Stats",
        "body": "Show brief status and statistics:\n\nopenclaw contextclaw status"
      },
      {
        "title": "Configuration",
        "body": "Reconfigure port or OpenClaw home:\n\nopenclaw contextclaw setup"
      },
      {
        "title": "Dashboard Features",
        "body": "The dashboard at http://localhost:18797 provides:\n\nSession statistics - Total sessions, messages, tokens, storage\nMultiple views - All, Largest, Oldest, Orphaned, Charts\nBar charts - Visual size distribution\nType breakdown - Sessions by agent type (main, cron, sub-agent)\nQuick actions - Prune and clean from UI (preview only)"
      },
      {
        "title": "Example Usage",
        "body": "User asks: \"How much storage are my sessions using?\"\n\nResponse:\n\nopenclaw contextclaw analyze\n\nLook at the \"Total Size\" metric in the summary table.\n\nUser asks: \"Clean up old sessions\"\n\nResponse:\n\n# First preview what would be deleted\nopenclaw contextclaw prune --days 30\n\n# If approved, run live:\nopenclaw contextclaw prune --days 30 --dryRun false\n\nUser asks: \"Which sessions are taking up the most space?\"\n\nResponse:\n\nopenclaw contextclaw analyze\n\nCheck the \"Largest Sessions\" table, or open the dashboard:\n\nopenclaw contextclaw dashboard\n\nUser asks: \"Remove orphaned session files\"\n\nResponse:\n\n# Preview first\nopenclaw contextclaw clean-orphaned\n\n# If user approves, run live:\nopenclaw contextclaw clean-orphaned --dryRun false"
      },
      {
        "title": "Session Types",
        "body": "ContextClaw categorizes sessions as:\n\nmain - Main agent session (protected from pruning)\ncron - Cron job sessions (protected from pruning)\nsubagent - Spawned sub-agent sessions (can be pruned)\nunknown - Unrecognized session types"
      },
      {
        "title": "Orphaned Sessions",
        "body": "A session is orphaned if:\n\n.jsonl file exists in sessions directory\nSession ID is NOT in sessions.json\n\nCommon causes:\n\nCompleted sub-agent removed from index\nManual file operations\nCrashed sessions\nDevelopment/testing\n\nOrphaned sessions are safe to delete."
      },
      {
        "title": "Best Practices",
        "body": "Analyze regularly - Weekly or monthly: openclaw contextclaw analyze\nAlways dry-run first - Preview before deleting\nAdjust age threshold - 30 days is default, adjust as needed\nReview orphaned - Check before cleaning\nBackup if worried - Though main/cron are protected"
      },
      {
        "title": "Troubleshooting",
        "body": "If dashboard won't load:\n\nopenclaw contextclaw status  # Check if running\nopenclaw contextclaw start   # Start if stopped\n\nIf port is in use:\n\nopenclaw contextclaw setup\n# Choose a different port"
      },
      {
        "title": "Technical Details",
        "body": "Port: 18797 (default, configurable)\nAnalysis: Parses all .jsonl files in ~/.openclaw/agents/main/sessions/\nToken estimation: 1 token ≈ 4 characters (approximate)\nStorage: Read-only, no database"
      },
      {
        "title": "Analyze Command",
        "body": "📊 Session Analysis\n\n┌──────────────────┬────────┐\n│ Metric           │ Value  │\n├──────────────────┼────────┤\n│ Total Sessions   │ 45     │\n│ Total Messages   │ 3,842  │\n│ Total Tokens     │ 156,234│\n│ Total Size       │ 12.4 MB│\n│ Orphaned         │ 8      │\n└──────────────────┴────────┘"
      },
      {
        "title": "Prune Command",
        "body": "🧹 Session Pruning\n\n⚠️  DRY RUN MODE - No files will be deleted\n\nSessions older than 30 days:\n  ✓ Would delete: 12\n  - Would keep: 33\n  - Space freed: 4.2 MB\n\n? Run prune in LIVE mode (actually delete files)? (y/N)"
      },
      {
        "title": "Repository",
        "body": "GitHub: https://github.com/rmruss2022/ContextClaw\nnpm: @rmruss2022/contextclaw"
      }
    ],
    "body": "ContextClaw Plugin Usage\nWhen to Use\n\nUse this skill when the user asks about:\n\nSession management or cleanup\nContext usage or token consumption\nStorage space used by sessions\nPruning old sessions\nCleaning up orphaned session files\nSession analysis or statistics\nWhich sessions are taking up space\nHow many messages/tokens in sessions\nPrerequisites\n\nThe ContextClaw plugin must be installed:\n\nnpm install -g @rmruss2022/contextclaw\nopenclaw plugins install @rmruss2022/contextclaw\n\nQuick Start\n\nCheck if ContextClaw is installed and running:\n\nopenclaw contextclaw status\n\nCommands\nAnalyze Sessions\n\nGet comprehensive analysis of all sessions:\n\nopenclaw contextclaw analyze\n\n\nThis shows:\n\nTotal sessions, messages, tokens, storage size\nLargest sessions (top 10)\nOldest sessions (top 10)\nOrphaned sessions\nPrune Old Sessions\n\nClean up sessions older than N days (default: 30):\n\n# Dry run (preview only, safe)\nopenclaw contextclaw prune --days 30\n\n# Live run (actually deletes)\nopenclaw contextclaw prune --days 30 --dryRun false\n\n\nSafety features:\n\nDry run by default (previews before deleting)\nAlways keeps main agent sessions\nAlways keeps cron sessions\nShows confirmation before deleting\nClean Orphaned Sessions\n\nRemove session files not referenced in sessions.json:\n\n# Dry run\nopenclaw contextclaw clean-orphaned\n\n# Live run\nopenclaw contextclaw clean-orphaned --dryRun false\n\nDashboard\n\nOpen the visual session management dashboard:\n\nopenclaw contextclaw dashboard\n\n\nThis opens http://localhost:18797\n\nQuick Stats\n\nShow brief status and statistics:\n\nopenclaw contextclaw status\n\nConfiguration\n\nReconfigure port or OpenClaw home:\n\nopenclaw contextclaw setup\n\nDashboard Features\n\nThe dashboard at http://localhost:18797 provides:\n\nSession statistics - Total sessions, messages, tokens, storage\nMultiple views - All, Largest, Oldest, Orphaned, Charts\nBar charts - Visual size distribution\nType breakdown - Sessions by agent type (main, cron, sub-agent)\nQuick actions - Prune and clean from UI (preview only)\nExample Usage\n\nUser asks: \"How much storage are my sessions using?\"\n\nResponse:\n\nopenclaw contextclaw analyze\n\n\nLook at the \"Total Size\" metric in the summary table.\n\nUser asks: \"Clean up old sessions\"\n\nResponse:\n\n# First preview what would be deleted\nopenclaw contextclaw prune --days 30\n\n# If approved, run live:\nopenclaw contextclaw prune --days 30 --dryRun false\n\n\nUser asks: \"Which sessions are taking up the most space?\"\n\nResponse:\n\nopenclaw contextclaw analyze\n\n\nCheck the \"Largest Sessions\" table, or open the dashboard:\n\nopenclaw contextclaw dashboard\n\n\nUser asks: \"Remove orphaned session files\"\n\nResponse:\n\n# Preview first\nopenclaw contextclaw clean-orphaned\n\n# If user approves, run live:\nopenclaw contextclaw clean-orphaned --dryRun false\n\nSession Types\n\nContextClaw categorizes sessions as:\n\nmain - Main agent session (protected from pruning)\ncron - Cron job sessions (protected from pruning)\nsubagent - Spawned sub-agent sessions (can be pruned)\nunknown - Unrecognized session types\nOrphaned Sessions\n\nA session is orphaned if:\n\n.jsonl file exists in sessions directory\nSession ID is NOT in sessions.json\n\nCommon causes:\n\nCompleted sub-agent removed from index\nManual file operations\nCrashed sessions\nDevelopment/testing\n\nOrphaned sessions are safe to delete.\n\nBest Practices\nAnalyze regularly - Weekly or monthly: openclaw contextclaw analyze\nAlways dry-run first - Preview before deleting\nAdjust age threshold - 30 days is default, adjust as needed\nReview orphaned - Check before cleaning\nBackup if worried - Though main/cron are protected\nTroubleshooting\n\nIf dashboard won't load:\n\nopenclaw contextclaw status  # Check if running\nopenclaw contextclaw start   # Start if stopped\n\n\nIf port is in use:\n\nopenclaw contextclaw setup\n# Choose a different port\n\nTechnical Details\nPort: 18797 (default, configurable)\nAnalysis: Parses all .jsonl files in ~/.openclaw/agents/main/sessions/\nToken estimation: 1 token ≈ 4 characters (approximate)\nStorage: Read-only, no database\nExample Output\nAnalyze Command\n📊 Session Analysis\n\n┌──────────────────┬────────┐\n│ Metric           │ Value  │\n├──────────────────┼────────┤\n│ Total Sessions   │ 45     │\n│ Total Messages   │ 3,842  │\n│ Total Tokens     │ 156,234│\n│ Total Size       │ 12.4 MB│\n│ Orphaned         │ 8      │\n└──────────────────┴────────┘\n\nPrune Command\n🧹 Session Pruning\n\n⚠️  DRY RUN MODE - No files will be deleted\n\nSessions older than 30 days:\n  ✓ Would delete: 12\n  - Would keep: 33\n  - Space freed: 4.2 MB\n\n? Run prune in LIVE mode (actually delete files)? (y/N)\n\nRepository\n\nGitHub: https://github.com/rmruss2022/ContextClaw npm: @rmruss2022/contextclaw"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rmruss2022/contextclaw-usage",
    "publisherUrl": "https://clawhub.ai/rmruss2022/contextclaw-usage",
    "owner": "rmruss2022",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/contextclaw-usage",
    "downloadUrl": "https://openagent3.xyz/downloads/contextclaw-usage",
    "agentUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/contextclaw-usage/agent.md"
  }
}