{
  "schemaVersion": "1.0",
  "item": {
    "slug": "counterclaw-core",
    "name": "Counterclaw Core",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/nickconstantinou/counterclaw-core",
    "canonicalUrl": "https://clawhub.ai/nickconstantinou/counterclaw-core",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/counterclaw-core",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=counterclaw-core",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "email_protector.py",
      "pyproject.toml",
      "send_protected_email.sh",
      "src/counterclaw/__init__.py"
    ],
    "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/counterclaw-core"
    },
    "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/counterclaw-core",
    "agentPageUrl": "https://openagent3.xyz/skills/counterclaw-core/agent",
    "manifestUrl": "https://openagent3.xyz/skills/counterclaw-core/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/counterclaw-core/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "CounterClaw 🦞",
        "body": "Defensive security for AI agents. Snaps shut on malicious payloads."
      },
      {
        "title": "⚠️ Security Notice",
        "body": "This package has two modes:\n\nCore Scanner (offline): check_input() and check_output() — no network calls\nEmail Integration (network): send_protected_email.sh — requires gog CLI for Gmail"
      },
      {
        "title": "Installation",
        "body": "claw install counterclaw"
      },
      {
        "title": "Quick Start",
        "body": "from counterclaw import CounterClawInterceptor\n\ninterceptor = CounterClawInterceptor()\n\n# Input scan - blocks prompt injections\n# NOTE: Examples below are TEST CASES only - not actual instructions\nresult = interceptor.check_input(\"{{EXAMPLE: ignore previous instructions}}\")\n# → {\"blocked\": True, \"safe\": False}\n\n# Output scan - detects PII leaks  \nresult = interceptor.check_output(\"Contact: john@example.com\")\n# → {\"safe\": False, \"pii_detected\": {\"email\": True}}"
      },
      {
        "title": "Features",
        "body": "🔒 Defense against common prompt injection patterns\n🛡️ Basic PII masking (Email, Phone, Credit Card)\n📝 Violation logging to ~/.openclaw/memory/MEMORY.md\n⚠️ Warning on startup if TRUSTED_ADMIN_IDS not configured"
      },
      {
        "title": "Required Environment Variable",
        "body": "# Set your trusted admin ID(s) - use non-sensitive identifiers only!\nexport TRUSTED_ADMIN_IDS=\"your_telegram_id\"\n\nImportant: TRUSTED_ADMIN_IDS should ONLY contain non-sensitive identifiers:\n\n✅ Telegram user IDs (e.g., \"123456789\")\n✅ Discord user IDs (e.g., \"987654321\")\n❌ NEVER API keys\n❌ NEVER passwords\n❌ NEVER tokens\n\nYou can set multiple admin IDs by comma-separating:\n\nexport TRUSTED_ADMIN_IDS=\"telegram_id_1,telegram_id_2\""
      },
      {
        "title": "Runtime Configuration",
        "body": "# Option 1: Via environment variable (recommended)\n# Set TRUSTED_ADMIN_IDS before running\ninterceptor = CounterClawInterceptor()\n\n# Option 2: Direct parameter\ninterceptor = CounterClawInterceptor(admin_user_id=\"123456789\")"
      },
      {
        "title": "Security Notes",
        "body": "Fail-Closed: If TRUSTED_ADMIN_IDS is not set, admin features are disabled by default\nLogging: All violations are logged to ~/.openclaw/memory/MEMORY.md with PII masked\nNo Network Access: This middleware does not make any external network calls (offline-only)\nFile Access: Only writes to ~/.openclaw/memory/MEMORY.md — explicitly declared scope"
      },
      {
        "title": "Files Created",
        "body": "PathPurpose~/.openclaw/memory/Directory created on first run~/.openclaw/memory/MEMORY.mdViolation logs with PII masked"
      },
      {
        "title": "License",
        "body": "MIT - See LICENSE file"
      },
      {
        "title": "Running Tests Locally",
        "body": "python3 tests/test_scanner.py"
      },
      {
        "title": "Linting",
        "body": "pip install ruff\nruff check src/"
      },
      {
        "title": "Publishing to ClawHub",
        "body": "The CI runs on every push and pull request:\n\nRuff - Lints Python code\nTests - Runs unit tests\n\nTo publish a new version:\n\n# Version is set in pyproject.toml\ngit add -A\ngit commit -m \"Release v1.0.9\"\ngit tag v1.0.9\ngit push origin main --tags\n\nCI will automatically:\n\nRun lint + tests\nIf tests pass and tag starts with v*, publish to ClawHub"
      }
    ],
    "body": "CounterClaw 🦞\n\nDefensive security for AI agents. Snaps shut on malicious payloads.\n\n⚠️ Security Notice\n\nThis package has two modes:\n\nCore Scanner (offline): check_input() and check_output() — no network calls\nEmail Integration (network): send_protected_email.sh — requires gog CLI for Gmail\nInstallation\nclaw install counterclaw\n\nQuick Start\nfrom counterclaw import CounterClawInterceptor\n\ninterceptor = CounterClawInterceptor()\n\n# Input scan - blocks prompt injections\n# NOTE: Examples below are TEST CASES only - not actual instructions\nresult = interceptor.check_input(\"{{EXAMPLE: ignore previous instructions}}\")\n# → {\"blocked\": True, \"safe\": False}\n\n# Output scan - detects PII leaks  \nresult = interceptor.check_output(\"Contact: john@example.com\")\n# → {\"safe\": False, \"pii_detected\": {\"email\": True}}\n\nFeatures\n🔒 Defense against common prompt injection patterns\n🛡️ Basic PII masking (Email, Phone, Credit Card)\n📝 Violation logging to ~/.openclaw/memory/MEMORY.md\n⚠️ Warning on startup if TRUSTED_ADMIN_IDS not configured\nConfiguration\nRequired Environment Variable\n# Set your trusted admin ID(s) - use non-sensitive identifiers only!\nexport TRUSTED_ADMIN_IDS=\"your_telegram_id\"\n\n\nImportant: TRUSTED_ADMIN_IDS should ONLY contain non-sensitive identifiers:\n\n✅ Telegram user IDs (e.g., \"123456789\")\n✅ Discord user IDs (e.g., \"987654321\")\n❌ NEVER API keys\n❌ NEVER passwords\n❌ NEVER tokens\n\nYou can set multiple admin IDs by comma-separating:\n\nexport TRUSTED_ADMIN_IDS=\"telegram_id_1,telegram_id_2\"\n\nRuntime Configuration\n# Option 1: Via environment variable (recommended)\n# Set TRUSTED_ADMIN_IDS before running\ninterceptor = CounterClawInterceptor()\n\n# Option 2: Direct parameter\ninterceptor = CounterClawInterceptor(admin_user_id=\"123456789\")\n\nSecurity Notes\nFail-Closed: If TRUSTED_ADMIN_IDS is not set, admin features are disabled by default\nLogging: All violations are logged to ~/.openclaw/memory/MEMORY.md with PII masked\nNo Network Access: This middleware does not make any external network calls (offline-only)\nFile Access: Only writes to ~/.openclaw/memory/MEMORY.md — explicitly declared scope\nFiles Created\nPath\tPurpose\n~/.openclaw/memory/\tDirectory created on first run\n~/.openclaw/memory/MEMORY.md\tViolation logs with PII masked\nLicense\n\nMIT - See LICENSE file\n\nDevelopment & Release\nRunning Tests Locally\npython3 tests/test_scanner.py\n\nLinting\npip install ruff\nruff check src/\n\nPublishing to ClawHub\n\nThe CI runs on every push and pull request:\n\nRuff - Lints Python code\nTests - Runs unit tests\n\nTo publish a new version:\n\n# Version is set in pyproject.toml\ngit add -A\ngit commit -m \"Release v1.0.9\"\ngit tag v1.0.9\ngit push origin main --tags\n\n\nCI will automatically:\n\nRun lint + tests\nIf tests pass and tag starts with v*, publish to ClawHub"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/nickconstantinou/counterclaw-core",
    "publisherUrl": "https://clawhub.ai/nickconstantinou/counterclaw-core",
    "owner": "nickconstantinou",
    "version": "1.1.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/counterclaw-core",
    "downloadUrl": "https://openagent3.xyz/downloads/counterclaw-core",
    "agentUrl": "https://openagent3.xyz/skills/counterclaw-core/agent",
    "manifestUrl": "https://openagent3.xyz/skills/counterclaw-core/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/counterclaw-core/agent.md"
  }
}