kosys0224-spec

Trapscan — AI skill for Claude Code

AI community

Scan a repository for things that execute the moment you open it — editor auto-tasks, devcontainer host commands, git config traps, install hooks, AI-agent hooks & prompt injection.

How to install Trapscan

This entry records only its repository, not the path inside it, so there is no exact command to give. Open kosys0224-spec/trapscan and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Trapscan does

Scan a repository for things that execute the moment you open it — editor auto-tasks, devcontainer host commands, git config traps, install hooks, AI-agent hooks & prompt injection. Zero deps, no API key.

Alternatives in AI

  • Multi Execute — 执行 - 多模型协作执行 (Multi-Model Collaborative Execution) 1.9k ★
  • Pilotfish — Multi-model orchestration layer for Claude Code — the frontier model plans, cheaper models execute, verificati 688 ★
  • Fusion Plan — OMC interview (interactive) → 3-round Opus 4.8 + GPT-5.5 fusion deepening → concise .omc/plans/ output → revie 468 ★

README

trapscan

**Scan a repository for things that execute the moment you open it.**

[![CI](https://github.com/kosys0224-spec/trapscan/actions/workflows/ci.yml/badge.svg)](https://github.com/kosys0224-spec/trapscan/actions/workflows/ci.yml) [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/) [![Zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](pyproject.toml) [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE) [![Rules](https://img.shields.io/badge/rules-38-orange.svg)](docs/rules.md)

`git clone` is safe. What happens *next* often is not: opening the folder in VS Code can run a task, `direnv` can source a script, `npm install` runs `postinstall`, a dev container runs `initializeCommand` on your host, a `.git/config` inside a zip can run a program on `git status`, and a `CLAUDE.md` or `.cursorrules` can tell your AI coding agent to quietly pipe a download into `sh`.

trapscan checks for all of that **before** you open, install, or point an agent at an untrusted repository. One command, no API keys, no network, no dependencies.

![trapscan output on a deliberately trapped repository](docs/demo.png)

Why

Every "cool repo from a stranger" moment is the same workflow: clone → open in editor → `npm install` / `pip install -e .` → maybe start Claude Code or Cursor in it. Each step has a documented auto-execution path, and in 2025-2026 fake job-interview repos, poisoned "starter templates" and prompt-injected `AGENTS.md` files have all used them.

Existing tools cover slices of this - secret scanners, dependency auditors, LLM-based backdoor finders that need an API key - but nothing cheap sits at the *pre-open* step and asks the simple question: **if I open this, what runs?**

trapscan is that check. It is a smoke test, not an antivirus: it finds the lazy 90 % of traps and makes you read the rest.

Features

  • 38 rules in 5 categories - see [docs/rules.md](docs/ru