repo-guardian

Scan Claude Code repositories for malicious hooks, poisoned MCP configurations, and credential-harvesting patterns.

3|2|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/hanabi-jpn/clawhub-skills --skill repo-guardian-hanabi-jpn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo-guardian
Source: https://github.com/hanabi-jpn/clawhub-skills/tree/main/security-devops-pack/repo-guardian
Command: npx skills add https://github.com/hanabi-jpn/clawhub-skills --skill repo-guardian-hanabi-jpn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures the security of Claude Code repositories by scanning for malicious hooks, poisoned MCP configurations, and credential-harvesting patterns before any code processing occurs.

Core Features & Use Cases

  • Pre-Clone Security Scanner: Detects malicious hooks, poisoned MCP configurations, and credential-harvesting patterns before Claude Code processes any files.
  • Layered Scanning Approach: Inspects git hooks, validates configurations, detects prompt injection, verifies MCP server registrations, scans for credential redirection, checks dependencies, verifies submodules, and analyzes hidden files.
  • Use Case: Before processing a repository with Claude Code, use this Skill to ensure it is free from known attack vectors and does not contain malicious code.

Quick Start

Run the guard scan command to perform a full security scan on a repository.

Frequently Asked Questions about repo-guardian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a git repository for malicious hooks before cloning?

To scan a git repository for malicious hooks before cloning, run the `guard scan` command to inspect git hooks, .claude settings, and .mcp.json files. This pre-clone security scanner detects malicious payloads and credential-harvesting patterns before any code processing occurs.

What is a poisoned MCP configuration and how does repository scanning detect it?

A poisoned MCP configuration is a malicious .mcp.json file setup designed to hijack MCP server registrations. Repository scanning detects it by verifying MCP server registrations during the pre-clone scan, preventing credential redirection and malicious code execution.

Can I check for credential-harvesting patterns in .env files and package dependencies?

Yes, you can check for credential-harvesting patterns in .env files and package dependencies using a layered scanning approach. The scanner validates .env files, analyzes package dependencies, and scans for credential redirection to ensure repository integrity.

What's the best way to prevent prompt injection in Claude Code repositories?

The best way to prevent prompt injection in Claude Code repositories is to perform a comprehensive pre-clone security scan. This detects prompt injection, malicious git hooks, and hidden files, ensuring malicious payloads do not execute during code processing.

Does repository scanning verify submodules and hidden files for security vulnerabilities?

Yes, repository scanning verifies submodules and analyzes hidden files for security vulnerabilities. The layered scanning approach checks submodules, inspects hidden files, and detects malicious code to ensure the repository is free from known attack vectors.

Related Skills