# Send Secret Detection to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "secret-detection",
    "name": "Secret Detection",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Derick001/secret-detection",
    "canonicalUrl": "https://clawhub.ai/Derick001/secret-detection",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/secret-detection",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=secret-detection",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/main.py",
      "tests/test_secret_detection.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/secret-detection"
    },
    "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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/secret-detection",
    "downloadUrl": "https://openagent3.xyz/downloads/secret-detection",
    "agentUrl": "https://openagent3.xyz/skills/secret-detection/agent",
    "manifestUrl": "https://openagent3.xyz/skills/secret-detection/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/secret-detection/agent.md"
  }
}
```
## Documentation

### What This Does

This skill provides a git pre‑commit hook that scans staged files for common secret patterns (API keys, passwords, tokens) and blocks the commit if any are found. It helps prevent accidental leakage of secrets to public repositories.

Inputs: Git staged files (automatically scanned by the hook) or manual file paths.
Outputs: Detection report with line numbers; non‑zero exit code if secrets found.

### When To Use

Use this skill when:

You work with repositories that may contain sensitive credentials
You want to prevent accidental commits of secrets
You need a lightweight, local secret scanner for git workflows
You want to enforce security checks before pushing to remote

### Installation

# Install the hook in your git repository
./scripts/main.py install

### Manual Scan

# Scan specific files
./scripts/main.py scan --file path/to/file

# Scan all staged files (like the hook does)
./scripts/main.py scan --staged

### Hook Behavior

The hook runs automatically on git commit
If secrets are detected, the commit is blocked
The script prints the detected secrets with file names and line numbers
Exit code 0 = no secrets found; exit code 1 = secrets found

### Example 1: Installing the Hook

$ ./scripts/main.py install
✓ Pre-commit hook installed at .git/hooks/pre-commit
✓ Hook will scan for secrets on every commit

### Example 2: Secret Detection Blocking a Commit

$ git commit -m "Add config"
⚠️  Secret detected in config.yaml line 12: AWS_ACCESS_KEY_ID=AKIA...
⚠️  Secret detected in .env line 3: PASSWORD=secret123
✗ Commit blocked: 2 secrets found

### Example 3: Manual Scan

$ ./scripts/main.py scan --staged
Scanning 3 staged files...
✓ config.yaml: clean
✓ .env: clean  
✓ src/main.py: clean
✓ No secrets found

### Requirements

Git (for hook installation)
Python 3.6+ (for the scanner)
No external API keys or services needed

### Limitations

Only detects common secret patterns (AWS keys, GitHub tokens, passwords, etc.)
May produce false positives (e.g., long random strings that aren't actually secrets)
Does not scan binary files
Requires manual installation per repository
Does not replace comprehensive secret‑management solutions
Prints first 20 characters of detected secrets to console for identification purposes
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Derick001
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/secret-detection)
- [Send to Agent page](https://openagent3.xyz/skills/secret-detection/agent)
- [JSON manifest](https://openagent3.xyz/skills/secret-detection/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/secret-detection/agent.md)
- [Download page](https://openagent3.xyz/downloads/secret-detection)