Skip to content

aiskillstore/marketplace / skills/89jobrien/dead-code-removal

dead-code-removal

Verified

Detects and safely removes unused code (imports, functions, classes) across multiple languages. Use after refactoring, when removing features, or before production deployment. Includes safety checks and validation.

FileKindSize
SKILL.mdskill md7.4 KB
scripts/find-unused-imports.pyexecutablescript3.0 KB
skill-report.jsonconfig49.8 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-05T11:42:38.998Z",
    "slug": "89jobrien-dead-code-removal",
    "source_url": "https://github.com/89jobrien/steve/tree/main/steve/skills/dead-code-removal",
    "source_ref": "main",
    "model": "codex",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "26a453dd1afd8fab08ea90d3acdeff1648cdd8ffafa660af02327582c065dd77",
    "tree_hash": "2292d3410eeee49444e36b05962641428fb385b92df91040a8b69858f0f76413",
    "provenance": {
      "model_effective": "codex",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "dead-code-removal",
    "description": "Detects unused imports, functions, and classes across common project types, then guides conservative removal with backups and validation.",
    "summary": "Find dead code and guide safe cleanup with backups, syntax checks, and tests.",
    "icon": "📦",
    "version": "1.0.2",
    "author": "Joseph OBrien",
    "license": "MIT",
    "tags": [
      "dead-code",
      "refactoring",
      "static-analysis",
      "python",
      "code-cleanup"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "scripts",
      "external_commands",
      "filesystem"
    ],
    "category": "coding"
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "All static findings were reviewed in context. They are false positives from Markdown code fences, inline backticks, sample validation commands, and safety checklist text. The helper script reads local Python files, parses AST, and prints unused import results. No evidence of prompt injection, network activity, exfiltration, or hidden execution was found.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "scripts",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 135,
            "line_end": 135
          },
          {
            "file": "SKILL.md",
            "line_start": 136,
            "line_end": 136
          }
        ]
      },
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 38,
            "line_end": 38
          },
          {
            "file": "SKILL.md",
            "line_start": 40,
            "line_end": 40
          },
          {
            "file": "SKILL.md",
            "line_start": 42,
            "line_end": 44
          },
          {
            "file": "SKILL.md",
            "line_start": 44,
            "line_end": 50
          },
          {
            "file": "SKILL.md",
            "line_start": 50,
            "line_end": 52
          },
          {
            "file": "SKILL.md",
            "line_start": 52,
            "line_end": 54
          },
          {
            "file": "SKILL.md",
            "line_start": 54,
            "line_end": 56
          },
          {
            "file": "SKILL.md",
            "line_start": 56,
            "line_end": 60
          },
          {
            "file": "SKILL.md",
            "line_start": 60,
            "line_end": 62
          },
          {
            "file": "SKILL.md",
            "line_start": 62,
            "line_end": 70
          },
          {
            "file": "SKILL.md",
            "line_start": 70,
            "line_end": 70
          },
          {
            "file": "SKILL.md",
            "line_start": 71,
            "line_end": 71
          },
          {
            "file": "SKILL.md",
            "line_start": 72,
            "line_end": 72
          },
          {
            "file": "SKILL.md",
            "line_start": 73,
            "line_end": 74
          },
          {
            "file": "SKILL.md",
            "line_start": 74,
            "line_end": 78
          },
          {
            "file": "SKILL.md",
            "line_start": 78,
            "line_end": 78
          },
          {
            "file": "SKILL.md",
            "line_start": 79,
            "line_end": 79
          },
          {
            "file": "SKILL.md",
            "line_start": 80,
            "line_end": 80
          },
          {
            "file": "SKILL.md",
            "line_start": 81,
            "line_end": 81
          },
          {
            "file": "SKILL.md",
            "line_start": 82,
            "line_end": 82
          },
          {
            "file": "SKILL.md",
            "line_start": 105,
            "line_end": 108
          },
          {
            "file": "SKILL.md",
            "line_start": 108,
            "line_end": 112
          },
          {
            "file": "SKILL.md",
            "line_start": 112,
            "line_end": 117
          },
          {
            "file": "SKILL.md",
            "line_start": 117,
            "line_end": 119
          },
          {
            "file": "SKILL.md",
            "line_start": 119,
            "line_end": 123
          },
          {
            "file": "SKILL.md",
            "line_start": 123,
            "line_end": 135
          },
          {
            "file": "SKILL.md",
            "line_start": 135,
            "line_end": 135
          },
          {
            "file": "SKILL.md",
            "line_start": 136,
            "line_end": 136
          },
          {
            "file": "SKILL.md",
            "line_start": 137,
            "line_end": 137
          },
          {
            "file": "SKILL.md",
            "line_start": 165,
            "line_end": 168
          },
          {
            "file": "SKILL.md",
            "line_start": 168,
            "line_end": 179
          },
          {
            "file": "SKILL.md",
            "line_start": 179,
            "line_end": 191
          },
          {
            "file": "SKILL.md",
            "line_start": 191,
            "line_end": 197
          },
          {
            "file": "SKILL.md",
            "line_start": 197,
            "line_end": 201
          },
          {
            "file": "SKILL.md",
            "line_start": 201,
            "line_end": 205
          },
          {
            "file": "SKILL.md",
            "line_start": 205,
            "line_end": 210
          },
          {
            "file": "SKILL.md",
            "line_start": 210,
            "line_end": 211
          },
          {
            "file": "SKILL.md",
            "line_start": 211,
            "line_end": 212
          },
          {
            "file": "SKILL.md",
            "line_start": 212,
            "line_end": 218
          },
          {
            "file": "SKILL.md",
            "line_start": 218,
            "line_end": 228
          },
          {
            "file": "SKILL.md",
            "line_start": 228,
            "line_end": 236
          },
          {
            "file": "SKILL.md",
            "line_start": 236,
            "line_end": 240
          },
          {
            "file": "SKILL.md",
            "line_start": 240,
            "line_end": 243
          },
          {
            "file": "SKILL.md",
            "line_start": 243,
            "line_end": 253
          },
          {
            "file": "SKILL.md",
            "line_start": 253,
            "line_end": 253
          },
          {
            "file": "SKILL.md",
            "line_start": 258,
            "line_end": 258
          },
          {
            "file": "SKILL.md",
            "line_start": 264,
            "line_end": 268
          },
          {
            "file": "SKILL.md",
            "line_start": 166,
            "line_end": 166
          },
          {
            "file": "SKILL.md",
            "line_start": 165,
            "line_end": 168
          }
        ]
      },
      {
        "factor": "filesystem",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 167,
            "line_end": 167
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "scripts:SKILL.md:135:dynamic-code-evaluation-with-eval",
        "category": "scripts",
        "severity": "high",
        "pattern": "Dynamic code evaluation with eval()",
        "file": "SKILL.md",
        "line_start": 135,
        "line_end": 135,
        "snippet": "- Python: `getattr()`, `eval()`, `globals()` usage detected"
      },
      {
        "id": "scripts:SKILL.md:136:dynamic-import-expression",
        "category": "scripts",
        "severity": "medium",
        "pattern": "Dynamic import() expression",
        "file": "SKILL.md",
        "line_start": 136,
        "line_end": 136,
        "snippet": "- JavaScript: `window[]`, `this[]`, dynamic `import()` usage"
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 38,
        "line_end": 38,
        "snippet": "This skill includes Python helper scripts in `scripts/`:"
      },
      {
        "id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 40,
        "line_end": 40,
        "snippet": "- **`find_unused_imports.py`**: Uses AST parsing to accurately detect unused imports in Python files"
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 42,
        "line_end": 44,
        "snippet": "```bash"
      },
      {
        "id": "external_commands:SKILL.md:44:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 44,
        "line_end": 50,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 50,
        "line_end": 52,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:52:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 52,
        "line_end": 54,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 54,
        "line_end": 56,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:56:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 56,
        "line_end": 60,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:60:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 60,
        "line_end": 62,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:62:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 62,
        "line_end": 70,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:70:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 70,
        "line_end": 70,
        "snippet": "- Python: Look for `pyproject.toml`, `setup.py`, `requirements.txt`"
      },
      {
        "id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 71,
        "line_end": 71,
        "snippet": "- JavaScript/TypeScript: Check `package.json`, `tsconfig.json`"
      },
      {
        "id": "external_commands:SKILL.md:72:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 72,
        "line_end": 72,
        "snippet": "- Java: Look for `pom.xml`, `build.gradle`"
      },
      {
        "id": "external_commands:SKILL.md:73:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 73,
        "line_end": 74,
        "snippet": "- Go: Check `go.mod`"
      },
      {
        "id": "external_commands:SKILL.md:74:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 74,
        "line_end": 78,
        "snippet": "- Rust: Check `Cargo.toml`"
      },
      {
        "id": "external_commands:SKILL.md:78:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 78,
        "line_end": 78,
        "snippet": "- Python: `main.py`, `__main__.py`, `app.py`, `run.py`"
      },
      {
        "id": "external_commands:SKILL.md:79:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 79,
        "line_end": 79,
        "snippet": "- JavaScript: `index.js`, `main.js`, `server.js`, `app.js`"
      },
      {
        "id": "external_commands:SKILL.md:80:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 80,
        "line_end": 80,
        "snippet": "- Java: `Main.java`, `*Application.java`, `*Controller.java`"
      },
      {
        "id": "external_commands:SKILL.md:81:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 81,
        "line_end": 81,
        "snippet": "- Config files: `*.config.*`, `settings.*`, `setup.*`"
      },
      {
        "id": "external_commands:SKILL.md:82:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 82,
        "line_end": 82,
        "snippet": "- Test files: `test_*.py`, `*.test.js`, `*.spec.js`"
      },
      {
        "id": "external_commands:SKILL.md:105:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 105,
        "line_end": 108,
        "snippet": "```bash"
      },
      {
        "id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 108,
        "line_end": 112,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:112:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 112,
        "line_end": 117,
        "snippet": "```python"
      },
      {
        "id": "external_commands:SKILL.md:117:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 117,
        "line_end": 119,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:119:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 119,
        "line_end": 123,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:123:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 123,
        "line_end": 135,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:135:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 135,
        "line_end": 135,
        "snippet": "- Python: `getattr()`, `eval()`, `globals()` usage detected"
      },
      {
        "id": "external_commands:SKILL.md:136:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 136,
        "line_end": 136,
        "snippet": "- JavaScript: `window[]`, `this[]`, dynamic `import()` usage"
      },
      {
        "id": "external_commands:SKILL.md:137:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 137,
        "line_end": 137,
        "snippet": "- Java: Reflection, annotations (`@Component`, `@Service`)"
      },
      {
        "id": "external_commands:SKILL.md:165:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 165,
        "line_end": 168,
        "snippet": "```bash"
      },
      {
        "id": "external_commands:SKILL.md:168:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 168,
        "line_end": 179,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:179:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 179,
        "line_end": 191,
        "snippet": "```bash"
      },
      {
        "id": "external_commands:SKILL.md:191:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 191,
        "line_end": 197,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:197:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 197,
        "line_end": 201,
        "snippet": "**Input**: Clean up unused imports in `src/utils/helpers.py`"
      },
      {
        "id": "external_commands:SKILL.md:201:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 201,
        "line_end": 205,
        "snippet": "```markdown"
      },
      {
        "id": "external_commands:SKILL.md:205:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 205,
        "line_end": 210,
        "snippet": "- **File**: `src/utils/helpers.py`"
      },
      {
        "id": "external_commands:SKILL.md:210:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 210,
        "line_end": 211,
        "snippet": "1. `import os` - Line 2 (not used anywhere)"
      },
      {
        "id": "external_commands:SKILL.md:211:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 211,
        "line_end": 212,
        "snippet": "2. `import json` - Line 3 (not used anywhere)"
      },
      {
        "id": "external_commands:SKILL.md:212:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 212,
        "line_end": 218,
        "snippet": "3. `from datetime import timedelta` - Line 5 (not used anywhere)"
      },
      {
        "id": "external_commands:SKILL.md:218:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 218,
        "line_end": 228,
        "snippet": "```python"
      },
      {
        "id": "external_commands:SKILL.md:228:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 228,
        "line_end": 236,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:236:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 236,
        "line_end": 240,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:240:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 240,
        "line_end": 243,
        "snippet": "**Input**: Find unused functions in `src/services/`"
      },
      {
        "id": "external_commands:SKILL.md:243:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 243,
        "line_end": 253,
        "snippet": "```markdown"
      },
      {
        "id": "external_commands:SKILL.md:253:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 253,
        "line_end": 253,
        "snippet": "**1. `formatOldDate()` in `src/services/utils.js`**"
      },
      {
        "id": "external_commands:SKILL.md:258:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 258,
        "line_end": 258,
        "snippet": "**2. `legacyAuth()` in `src/services/auth.js`**"
      },
      {
        "id": "external_commands:SKILL.md:264:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 264,
        "line_end": 268,
        "snippet": "- **Removed**: 1 function (`formatOldDate`)"
      },
      {
        "id": "external_commands:SKILL.md:166:shell-command-substitution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Shell command substitution",
        "file": "SKILL.md",
        "line_start": 166,
        "line_end": 166,
        "snippet": "backup_dir=\"./unused_code_backup_$(date +%Y%m%d_%H%M%S)\""
      },
      {
        "id": "external_commands:SKILL.md:165:template-literal-with-command-substitution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Template literal with command substitution",
        "file": "SKILL.md",
        "line_start": 165,
        "line_end": 168,
        "snippet": "```bash"
      },
      {
        "id": "filesystem:SKILL.md:167:standard-device-file-access",
        "category": "filesystem",
        "severity": "low",
        "pattern": "Standard device file access",
        "file": "SKILL.md",
        "line_start": 167,
        "line_end": 167,
        "snippet": "cp -r . \"$backup_dir\" 2>/dev/null || mkdir -p \"$backup_dir\" && rsync -a . \"$backup_dir\""
      },
      {
        "id": "blocker:SKILL.md:233:network-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "Network reconnaissance",
        "file": "SKILL.md",
        "line_start": 233,
        "line_end": 234,
        "snippet": "- ✅ Tests pass"
      }
    ],
    "finding_verdicts": [
      {
        "id": "scripts:SKILL.md:135:dynamic-code-evaluation-with-eval",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This line tells the agent to preserve code when eval, getattr, or globals are detected. It does not execute or recommend dynamic evaluation."
      },
      {
        "id": "scripts:SKILL.md:136:dynamic-import-expression",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This line lists dynamic import as a reason to avoid deleting code. It is not an executable import expression or hidden loader."
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "This is a Markdown example showing how to run the included helper script on local files. It is not Ruby backtick execution or an injection sink."
      },
      {
        "id": "external_commands:SKILL.md:44:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:50:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:52:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:56:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:60:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:62:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:70:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:72:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:73:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:74:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:78:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:79:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:80:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:81:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:82:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:105:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "This is a Markdown example showing how to run the included helper script on local files. It is not Ruby backtick execution or an injection sink."
      },
      {
        "id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:112:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:117:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:119:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:123:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:135:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:136:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:137:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The backticks are Markdown formatting for filenames, prompts, or fenced examples in SKILL.md. They are not Ruby shell execution or executable skill code."
      },
      {
        "id": "external_commands:SKILL.md:165:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.87,
        "reason": "The line belongs to a Markdown backup command example using local cp, mkdir, and rsync. It is visible operational guidance, not concealed shell execution."
      },
      {
        "id": "external_commands:SKILL.md:168:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.87,
        "reason": "The line belongs to a Markdown backup command example using local cp, mkdir, and rsync. It is visible operational guidance, not concealed shell execution."
      },
      {
        "id": "external_commands:SKILL.md:179:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.9,
        "reason": "The line is part of documented validation commands such as syntax checks and project tests. The skill does not embed code that runs them automatically."
      },
      {
        "id": "external_commands:SKILL.md:191:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.9,
        "reason": "The line is part of documented validation commands such as syntax checks and project tests. The skill does not embed code that runs them automatically."
      },
      {
        "id": "external_commands:SKILL.md:197:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:201:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:205:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:210:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:211:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:212:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:218:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:228:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:236:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:240:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:243:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:253:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:258:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:264:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.93,
        "reason": "The match occurs inside sample Markdown output that illustrates a dead-code report. It is not executable shell, Ruby backticks, or a command injection vector."
      },
      {
        "id": "external_commands:SKILL.md:166:shell-command-substitution",
        "verdict": "false_positive",
        "confidence": 0.88,
        "reason": "The command substitution appears only in a documented backup example. It uses a fixed date command to create a local folder name and is not hidden execution."
      },
      {
        "id": "external_commands:SKILL.md:165:template-literal-with-command-substitution",
        "verdict": "false_positive",
        "confidence": 0.88,
        "reason": "The match is inside a Markdown bash example for naming a local backup directory. The date substitution is fixed formatting, not user-controlled command execution."
      },
      {
        "id": "filesystem:SKILL.md:167:standard-device-file-access",
        "verdict": "false_positive",
        "confidence": 0.91,
        "reason": "The detected device file is stderr redirection to /dev/null in a Markdown backup example. It is not arbitrary device access or data exfiltration."
      },
      {
        "id": "blocker:SKILL.md:233:network-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.95,
        "reason": "The cited line is example report text saying tests pass. There is no network command, scanning target, host enumeration, or reconnaissance workflow."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 2,
    "total_lines": 435,
    "audit_model": "codex",
    "audited_at": "2026-07-05T11:42:38.998Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Remove Dead Code Safely",
    "value_statement": "Unused imports, functions, and classes increase maintenance cost and deployment size. This skill guides Claude, Codex, and Claude Code through conservative analysis, backups, removal, and validation.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "dead code removal",
      "unused imports",
      "code cleanup",
      "static analysis",
      "refactoring",
      "AST parsing",
      "safe deletion"
    ],
    "actual_capabilities": [
      "Identifies project languages by checking common config and manifest files.",
      "Maps entry points, imports, require calls, function calls, and inheritance patterns.",
      "Includes a Python AST helper script for unused import detection.",
      "Preserves framework hooks, routes, models, tests, migrations, and exported APIs.",
      "Recommends backups, incremental changes, syntax checks, tests, and build validation."
    ],
    "limitations": [
      "Cannot prove dynamic runtime references are unused without project-specific tests.",
      "JavaScript, Java, Go, and Rust guidance is documented but has no included helper script.",
      "Some documentation examples reference a helper filename that differs from the included script name.",
      "May preserve code that appears unused when framework or reflection patterns are present."
    ],
    "use_cases": [
      {
        "title": "Clean Python Services",
        "description": "Find unused imports and private helpers before a service release, then validate syntax and tests.",
        "target_user": "Backend developers"
      },
      {
        "title": "Reduce Frontend Bundle Size",
        "description": "Review stale components, utilities, and imports after feature removal while preserving framework entry points.",
        "target_user": "Frontend engineers"
      },
      {
        "title": "Prepare Legacy Refactors",
        "description": "Build a cautious cleanup plan that separates safe removals from public APIs and dynamic usage.",
        "target_user": "Tech leads"
      }
    ],
    "prompt_templates": [
      {
        "title": "Find Unused Imports",
        "scenario": "Beginner cleanup",
        "prompt": "Analyze this repository for unused Python imports. Report each candidate with file, line, confidence, and validation steps before changing files."
      },
      {
        "title": "Remove Safe Candidates",
        "scenario": "Conservative edits",
        "prompt": "Remove only unused imports and private functions that have no references. Create a backup, run syntax checks, and summarize every change."
      },
      {
        "title": "Audit a Refactor",
        "scenario": "Post-refactor review",
        "prompt": "Review the recent refactor for dead code across src and tests. Preserve framework hooks, public APIs, migrations, and dynamic usage patterns."
      },
      {
        "title": "Plan Cross-Language Cleanup",
        "scenario": "Advanced repository cleanup",
        "prompt": "Build a dependency map for this mixed-language project, rank dead-code candidates by risk, remove low-risk items incrementally, and run available tests after each batch."
      }
    ],
    "output_examples": [
      {
        "input": "Clean up unused imports in a Python utility file.",
        "output": "The skill reports unused imports, removes only safe entries, preserves dynamic references, and confirms syntax checks and tests."
      },
      {
        "input": "Find unused functions in a services directory.",
        "output": "The skill lists candidate functions, explains reference evidence, removes private unused helpers, and preserves route or framework usage."
      },
      {
        "input": "Review a feature-removal branch before release.",
        "output": "The skill groups cleanup candidates by risk, recommends a removal order, and records validation results for each change batch."
      }
    ],
    "best_practices": [
      "Start with imports and private helpers before considering exported APIs.",
      "Run syntax checks and tests after each small removal batch.",
      "Treat reflection, decorators, route registration, and template references as preservation signals."
    ],
    "anti_patterns": [
      "Deleting public or exported symbols based only on name search.",
      "Removing code before backups and validation are complete.",
      "Ignoring tests, migrations, generated files, or framework conventions."
    ],
    "faq": [
      {
        "question": "Does this skill remove code automatically?",
        "answer": "It guides conservative removal and validation. Review candidates before allowing edits in important repositories."
      },
      {
        "question": "Which languages are covered?",
        "answer": "The documentation covers Python, JavaScript, TypeScript, Java, Go, and Rust detection patterns."
      },
      {
        "question": "Does it include a helper script?",
        "answer": "Yes. It includes a Python AST helper for finding unused imports in Python files."
      },
      {
        "question": "Can it detect dynamic runtime usage?",
        "answer": "It flags dynamic patterns as reasons to preserve code. Tests and manual review are still needed."
      },
      {
        "question": "Is it suitable for production cleanup?",
        "answer": "Yes, when used with backups, incremental edits, syntax checks, tests, and code review."
      },
      {
        "question": "What should be preserved?",
        "answer": "Preserve entry points, framework hooks, migrations, public APIs, tests, and code referenced through dynamic patterns."
      }
    ]
  },
  "file_structure": [
    {
      "name": "scripts",
      "type": "dir",
      "path": "scripts",
      "children": [
        {
          "name": "find-unused-imports.py",
          "type": "file",
          "path": "scripts/find-unused-imports.py",
          "lines": 109
        }
      ]
    },
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 326
    }
  ]
}
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall