inspect-malicious-code

inspect-malicious-code is a skill for Claude Code, Codex from aiya000/dotfiles. It costs 42 tokens per session (977 once invoked), scanned A, original, MIT.

A static-analysis procedure for checking a project or dependency for potentially malicious code such as malware or spyware. Static analysis reads code without running it.

In plain words
What is it for?
Use it to inspect obfuscation, encoded data, unexpected network access, and other suspicious patterns, with or without including node_modules.
Why use it?
It helps identify suspicious behavior while avoiding the risk of executing harmful project code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect obfuscation, encoded data, unexpected network access, and other suspicious patterns, with or without including node_modules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiya000/dotfiles/inspect-malicious-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aiya000/dotfiles --skill inspect-malicious-code
Clone the repo
git clone --depth 1 https://github.com/aiya000/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for inspect-malicious-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiya000/dotfiles/inspect-malicious-code/github.svg)](https://agentmods.dev/skills/aiya000/dotfiles/inspect-malicious-code)
Your own site
<a href="https://agentmods.dev/skills/aiya000/dotfiles/inspect-malicious-code"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/inspect-malicious-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for inspect-malicious-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiya000/dotfiles/inspect-malicious-code"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/inspect-malicious-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 977 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 60
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 17
    Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
    Fix: Restrict tool access to only the tools required for the skill's stated purpose. Use an explicit allowlist rather than granting blanket access.
  • medium Excessive Agency · line 19
    Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
    Fix: Restrict tool access to only the tools required for the skill's stated purpose. Use an explicit allowlist rather than granting blanket access.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00977
Opus 5.5 $0.00017 $0.00391
Sonnet 5.5 $0.00008 $0.00195
Haiku 4.5 $0.00004 $0.00098

Measured 3mo ago against content hash 71da2a29746e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

inspect-malicious-code scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

> **⚠️ CRITICAL: NEVER execute any code during inspection.**

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `child_process` usage (especially `exec`, `spawn` with shell commands)
.claude_global/skills/inspect-malicious-code/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

inspect-malicious-code

Inspect a project for potentially malicious code (malware, spyware, etc.).

Arguments

  • Target directory path (optional). If not specified, use current working directory
  • --include-node-modules: Include node_modules directory in inspection (excluded by default)

Behavior

⚠️ CRITICAL: NEVER execute any code during inspection.

This skill performs static analysis only. Do not run, eval, or execute any scripts, commands, or code found in the target project. Malicious code may activate upon execution.

Step 1: Confirmation

  1. Display the target directory path clearly
  2. Ask the user: "Do you want to inspect this project for malicious code?"
  3. If yes → proceed to inspection
  4. If no → exit

Step 2: Inspection

Thoroughly examine the codebase for the following suspicious patterns:

2.1 Obfuscated Code
  • eval() usage with dynamic strings
  • Function() constructor with string arguments
  • Base64 encoded strings (especially long ones)
  • Hex-encoded strings
  • String concatenation tricks to hide keywords
  • Minified code in source files (not build artifacts)
2.2 External Communication
  • fetch() calls to unknown/suspicious URLs
  • XMLHttpRequest usage
  • http/https module imports with outbound requests
  • WebSocket connections
  • DNS lookups to suspicious domains
  • Data exfiltration patterns (sending local data externally)
2.3 Environment & Credentials Access
  • process.env access (especially for sensitive keys like API_KEY, SECRET, TOKEN, PASSWORD)
  • Reading .env files directly
  • Accessing system environment variables
  • Keychain/credential store access
  • SSH key access (~/.ssh/)
2.4 File System Access
  • Reading sensitive files (/etc/passwd, ~/.bashrc, ~/.zshrc, browser data directories)
  • Writing to system directories
  • Recursive directory scanning
  • File upload to external servers
  • Archive creation of user data
2.5 Process & System Manipulation
  • child_process usage (especially exec, spawn with shell commands)
  • Modifying PATH or other environment variables
  • Installing global packages silently
  • Modifying system configuration files
  • Persistence mechanisms (cron jobs, startup scripts)

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 150 lines · 42 tokens per session scan A 71da2a29746e

Subscribe to this mod's changes

inspect-malicious-code is a skill published in the GitHub repository aiya000/dotfiles (21 stars, last pushed 28d ago), licensed MIT. It adds 42 tokens to every session and 977 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 2 findings (unrestricted tool access, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

inspect-malicious-code compared with skills from other repositories

inspect-malicious-code next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
inspect-malicious-codeaiya000/dotfilesSkill2128d agoMITA42Claude Code, Codex
restart__pull_requestshunsock/dotfilesSkill102mo agononeA159Claude Code, Codex
rescue__pull_request_reviewshunsock/dotfilesSkill102mo agononeA104Claude Code, Codex
submit__pull_requestshunsock/dotfilesSkill102mo agononeA100Claude Code, Codex
write__pull_requestshunsock/dotfilesSkill102mo agononeA148Claude Code, Codex
monitor__ci_statusshunsock/dotfilesSkill102mo agononeA116Claude Code, Codex
monitor__pull_request_conflictshunsock/dotfilesSkill102mo agononeA123Claude Code, Codex