# Scan-Skill Mode

### Skill Security Scan (`scan-skill`)

`scan-skill` adds a security gate for skills used by agentic coding tools. It can scan a remote skill before installation and scan a local skill folder already installed on your machine.

**Motivation** Skills execute with user-level permissions. That means a malicious skill can attempt credential theft, persistence, remote payload execution, or agent manipulation. This feature is designed to reduce that supply-chain risk by providing a structured, repeatable security scan before trust is granted.

**How it works**

1. Input handling:

* Remote input: scans supported remote sources (currently GitHub and ClawHub/ClawdHub hosts).
* Local input: accepts a local directory path, recursively packages it in-memory, and requires a `SKILL.md` file.

2. Safe ingestion:

* Enforces size and structure limits.
* Skips symlinks and non-text/binary content for analysis stages.
* Preserves `SKILL.md` as the primary manifest.

3. Multi-layer detection:

* Static layer: known malicious patterns and indicators.
* Behavioral layer: suspicious code behavior/data-flow patterns.
* Semantic layer (LLM): context-aware reasoning, false-positive review at finding level, and final narrative summary.

4. Result output:

* Returns verdict (`BENIGN`, `WARNING`, `SUSPICIOUS`, `MALICIOUS`), findings, evidence, severity, and optional analysis summary.
* Uses hash-based caching to reuse prior scan results for identical skill content.

**CLI usage**

```bash
# Remote GitHub skill
npx mobbdev@latest scan-skill --url https://github.com/user/my-skill

# Remote ClawHub skill
npx mobbdev@latest scan-skill --url https://clawhub.ai/user/skill-slug

# Local installed skill folder (must contain SKILL.md)
npx mobbdev@latest scan-skill --url /path/to/skills/my-skill
```

```bash
# Non-interactive CI mode
npx mobbdev@latest scan-skill --url /path/to/skills/my-skill --ci
```

Note: local scanning expects a **directory**, not a direct `SKILL.md` file path.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mobb.ai/mobb-user-docs/getting-started/mobb-cli/scan-skill-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
