{
  "schemaVersion": "1.0",
  "item": {
    "slug": "perplexity-safe",
    "name": "Perplexity AI Search - security-hardened version (bash-based)",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/haru3613/perplexity-safe",
    "canonicalUrl": "https://clawhub.ai/haru3613/perplexity-safe",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/perplexity-safe",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=perplexity-safe",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "package.json",
      "SKILL.md",
      "scripts/perplexity_search.sh",
      ".claude/settings.local.json"
    ],
    "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": "perplexity-safe",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T00:25:35.074Z",
      "expiresAt": "2026-05-14T00:25:35.074Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=perplexity-safe",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=perplexity-safe",
        "contentDisposition": "attachment; filename=\"perplexity-safe-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "perplexity-safe"
      },
      "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/perplexity-safe"
    },
    "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/perplexity-safe",
    "agentPageUrl": "https://openagent3.xyz/skills/perplexity-safe/agent",
    "manifestUrl": "https://openagent3.xyz/skills/perplexity-safe/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/perplexity-safe/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": "Overview",
        "body": "This skill provides access to the Perplexity API for web-grounded AI search. It combines large language models with real-time web search, providing accurate, up-to-date answers with source citations.\n\nThis is a security-hardened version that fixes command injection vulnerabilities found in the original perplexity-bash skill."
      },
      {
        "title": "When to Use Perplexity vs. Built-in Search",
        "body": "Use Perplexity when:\n\nYou need current information (news, prices, events, recent developments)\nThe user asks for source citations or references\nThe user specifically mentions Perplexity or wants research-style answers\n\nUse built-in web search when:\n\nSimple factual queries\nQuick information lookup\nBasic URL or content retrieval"
      },
      {
        "title": "Model Selection Guide",
        "body": "ModelUse CaseCostsonarDefault search, most queriesLowsonar-proAdvanced search, deeper understandingMediumsonar-reasoningComplex multi-step reasoningMediumsonar-reasoning-proAdvanced reasoning with deep contentHigh"
      },
      {
        "title": "Basic Search",
        "body": "# Simple query (uses sonar by default)\nscripts/perplexity_search.sh \"What is the capital of Germany?\"\n\n# With a different model\nscripts/perplexity_search.sh -m sonar-pro \"Latest AI developments\"\n\n# Markdown format with citations\nscripts/perplexity_search.sh -f markdown \"Tesla stock analysis\""
      },
      {
        "title": "Advanced Usage",
        "body": "# High context for comprehensive results\nscripts/perplexity_search.sh -m sonar-reasoning -c high -f markdown \\\n  \"Compare AI models performance benchmarks\"\n\n# With custom system prompt\nscripts/perplexity_search.sh -s \"You are a technology analyst.\" \\\n  \"Analyze current tech trends\""
      },
      {
        "title": "Options",
        "body": "FlagDescriptionDefault-m, --modelModel to usesonar-t, --max-tokensMaximum tokens (1-4096)4096--temperatureSampling temperature (0.0-1.0)0.0-c, --contextSearch context: low/medium/highmedium-s, --systemSystem prompt(none)-f, --formatOutput: text/markdown/jsontext--list-modelsList available models"
      },
      {
        "title": "Search Context Size",
        "body": "low - Faster, fewer sources. Good for simple queries.\nmedium (default) - Balanced for most use cases.\nhigh - Most comprehensive. Best for research."
      },
      {
        "title": "API Key Configuration",
        "body": "Option 1: Config file (recommended)\nCreate config.json in the skill directory:\n\n{\n  \"apiKey\": \"pplx-your-key-here\"\n}\n\nOption 2: Environment variable\n\nexport PERPLEXITY_API_KEY=\"your-key-here\"\n\nPriority: Config file > environment variable."
      },
      {
        "title": "Dependencies",
        "body": "bash (4.0+)\ncurl\npython3 (for JSON construction only - no user input is eval'd)"
      },
      {
        "title": "Security Notes",
        "body": "This version addresses the following vulnerabilities found in the original:\n\nNo command injection - User input is passed to Python via environment variables, never interpolated into code strings\nInput validation - All parameters are validated (numeric ranges, allowed model names, allowed context values)\nAPI key protection - The Authorization header is passed to curl via a temporary config file (curl -K, mode 600) and the request body via stdin (--data @-), so neither the API key nor the body appear in process listings (ps aux)\nQuery length limit - Queries are capped at 8000 characters to prevent denial-of-wallet attacks\nStrict model allowlist - Only known valid models are accepted"
      },
      {
        "title": "Cost Awareness",
        "body": "Perplexity API is not free. Be mindful of usage:\n\nSimple queries: ~$0.005-$0.015 per query\nDeep research: ~$0.015-$0.03+ per query\nDefault to sonar for most queries to keep costs low."
      },
      {
        "title": "Troubleshooting",
        "body": "Error: No API key found - Set up API key as described above\nError: curl not found - Install curl for your system\nError: Invalid model - Use --list-models to see available models"
      }
    ],
    "body": "Perplexity AI Search (Safe Edition)\nOverview\n\nThis skill provides access to the Perplexity API for web-grounded AI search. It combines large language models with real-time web search, providing accurate, up-to-date answers with source citations.\n\nThis is a security-hardened version that fixes command injection vulnerabilities found in the original perplexity-bash skill.\n\nWhen to Use Perplexity vs. Built-in Search\n\nUse Perplexity when:\n\nYou need current information (news, prices, events, recent developments)\nThe user asks for source citations or references\nThe user specifically mentions Perplexity or wants research-style answers\n\nUse built-in web search when:\n\nSimple factual queries\nQuick information lookup\nBasic URL or content retrieval\nModel Selection Guide\nModel\tUse Case\tCost\nsonar\tDefault search, most queries\tLow\nsonar-pro\tAdvanced search, deeper understanding\tMedium\nsonar-reasoning\tComplex multi-step reasoning\tMedium\nsonar-reasoning-pro\tAdvanced reasoning with deep content\tHigh\nQuick Start\nBasic Search\n# Simple query (uses sonar by default)\nscripts/perplexity_search.sh \"What is the capital of Germany?\"\n\n# With a different model\nscripts/perplexity_search.sh -m sonar-pro \"Latest AI developments\"\n\n# Markdown format with citations\nscripts/perplexity_search.sh -f markdown \"Tesla stock analysis\"\n\nAdvanced Usage\n# High context for comprehensive results\nscripts/perplexity_search.sh -m sonar-reasoning -c high -f markdown \\\n  \"Compare AI models performance benchmarks\"\n\n# With custom system prompt\nscripts/perplexity_search.sh -s \"You are a technology analyst.\" \\\n  \"Analyze current tech trends\"\n\nOptions\nFlag\tDescription\tDefault\n-m, --model\tModel to use\tsonar\n-t, --max-tokens\tMaximum tokens (1-4096)\t4096\n--temperature\tSampling temperature (0.0-1.0)\t0.0\n-c, --context\tSearch context: low/medium/high\tmedium\n-s, --system\tSystem prompt\t(none)\n-f, --format\tOutput: text/markdown/json\ttext\n--list-models\tList available models\t\nSearch Context Size\nlow - Faster, fewer sources. Good for simple queries.\nmedium (default) - Balanced for most use cases.\nhigh - Most comprehensive. Best for research.\nSetup Requirements\nAPI Key Configuration\n\nOption 1: Config file (recommended) Create config.json in the skill directory:\n\n{\n  \"apiKey\": \"pplx-your-key-here\"\n}\n\n\nOption 2: Environment variable\n\nexport PERPLEXITY_API_KEY=\"your-key-here\"\n\n\nPriority: Config file > environment variable.\n\nDependencies\nbash (4.0+)\ncurl\npython3 (for JSON construction only - no user input is eval'd)\nSecurity Notes\n\nThis version addresses the following vulnerabilities found in the original:\n\nNo command injection - User input is passed to Python via environment variables, never interpolated into code strings\nInput validation - All parameters are validated (numeric ranges, allowed model names, allowed context values)\nAPI key protection - The Authorization header is passed to curl via a temporary config file (curl -K, mode 600) and the request body via stdin (--data @-), so neither the API key nor the body appear in process listings (ps aux)\nQuery length limit - Queries are capped at 8000 characters to prevent denial-of-wallet attacks\nStrict model allowlist - Only known valid models are accepted\nCost Awareness\n\nPerplexity API is not free. Be mindful of usage:\n\nSimple queries: ~$0.005-$0.015 per query\nDeep research: ~$0.015-$0.03+ per query\nDefault to sonar for most queries to keep costs low.\nTroubleshooting\nError: No API key found - Set up API key as described above\nError: curl not found - Install curl for your system\nError: Invalid model - Use --list-models to see available models"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/haru3613/perplexity-safe",
    "publisherUrl": "https://clawhub.ai/haru3613/perplexity-safe",
    "owner": "haru3613",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/perplexity-safe",
    "downloadUrl": "https://openagent3.xyz/downloads/perplexity-safe",
    "agentUrl": "https://openagent3.xyz/skills/perplexity-safe/agent",
    "manifestUrl": "https://openagent3.xyz/skills/perplexity-safe/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/perplexity-safe/agent.md"
  }
}