Skip to content

aiskillstore/marketplace / skills/89jobrien/ai-code-cleanup

ai-code-cleanup

Verified

Remove AI-generated code slop from branches. Use after AI-assisted coding sessions to clean up defensive bloat, unnecessary comments, type casts, and style inconsistencies. Focuses on identifying and removing AI artifacts that degrade code quality.

FileKindSize
SKILL.mdskill md7.0 KB
references/refactoring-plan.template.mdmarkdown2.5 KB
skill-report.jsonconfig35.8 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-05T11:07:13.701Z",
    "slug": "89jobrien-ai-code-cleanup",
    "source_url": "https://github.com/89jobrien/steve/tree/main/steve/skills/ai-code-cleanup",
    "source_ref": "main",
    "model": "codex",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "fa85e411da60ef082f135f9fb2accce02b250d8d544a6e7721533992eb245b6a",
    "tree_hash": "b9c77f179d79e18d843d4ac979d4547ec7f4136c27a6a46be4bfcb5e7c662bf8",
    "provenance": {
      "model_effective": "codex",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "ai-code-cleanup",
    "description": "Remove AI-generated artifacts from code branches after AI-assisted coding sessions. The skill focuses on redundant comments, defensive bloat, unnecessary type casts, style drift, and safe verification.",
    "summary": "Cleans AI-generated code artifacts while preserving behavior and project style.",
    "icon": "📦",
    "version": "1.0.2",
    "author": "Joseph OBrien",
    "license": "MIT",
    "tags": [
      "code-cleanup",
      "refactoring",
      "ai-generated-code",
      "code-review",
      "typescript"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "external_commands",
      "filesystem"
    ],
    "category": "coding"
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "The static findings are false positives caused by Markdown fences, inline code examples, a read-only Git diff example, and regex syntax. I found no prompt injection, data exfiltration intent, network activity, credential access, or malicious command execution in the reviewed skill files.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 41,
            "line_end": 43
          },
          {
            "file": "SKILL.md",
            "line_start": 43,
            "line_end": 45
          },
          {
            "file": "SKILL.md",
            "line_start": 45,
            "line_end": 47
          },
          {
            "file": "SKILL.md",
            "line_start": 47,
            "line_end": 51
          },
          {
            "file": "SKILL.md",
            "line_start": 51,
            "line_end": 53
          },
          {
            "file": "SKILL.md",
            "line_start": 53,
            "line_end": 68
          },
          {
            "file": "SKILL.md",
            "line_start": 68,
            "line_end": 75
          },
          {
            "file": "SKILL.md",
            "line_start": 75,
            "line_end": 88
          },
          {
            "file": "SKILL.md",
            "line_start": 88,
            "line_end": 106
          },
          {
            "file": "SKILL.md",
            "line_start": 106,
            "line_end": 112
          },
          {
            "file": "SKILL.md",
            "line_start": 112,
            "line_end": 113
          },
          {
            "file": "SKILL.md",
            "line_start": 113,
            "line_end": 114
          },
          {
            "file": "SKILL.md",
            "line_start": 114,
            "line_end": 114
          },
          {
            "file": "SKILL.md",
            "line_start": 119,
            "line_end": 127
          },
          {
            "file": "SKILL.md",
            "line_start": 127,
            "line_end": 140
          },
          {
            "file": "SKILL.md",
            "line_start": 140,
            "line_end": 150
          },
          {
            "file": "SKILL.md",
            "line_start": 150,
            "line_end": 165
          },
          {
            "file": "SKILL.md",
            "line_start": 165,
            "line_end": 167
          },
          {
            "file": "SKILL.md",
            "line_start": 167,
            "line_end": 189
          },
          {
            "file": "SKILL.md",
            "line_start": 189,
            "line_end": 193
          },
          {
            "file": "SKILL.md",
            "line_start": 193,
            "line_end": 202
          },
          {
            "file": "SKILL.md",
            "line_start": 202,
            "line_end": 221
          },
          {
            "file": "SKILL.md",
            "line_start": 221,
            "line_end": 229
          },
          {
            "file": "SKILL.md",
            "line_start": 229,
            "line_end": 233
          },
          {
            "file": "SKILL.md",
            "line_start": 233,
            "line_end": 236
          },
          {
            "file": "SKILL.md",
            "line_start": 236,
            "line_end": 245
          },
          {
            "file": "SKILL.md",
            "line_start": 245,
            "line_end": 268
          },
          {
            "file": "SKILL.md",
            "line_start": 268,
            "line_end": 276
          },
          {
            "file": "SKILL.md",
            "line_start": 276,
            "line_end": 280
          },
          {
            "file": "SKILL.md",
            "line_start": 166,
            "line_end": 166
          },
          {
            "file": "SKILL.md",
            "line_start": 165,
            "line_end": 167
          }
        ]
      },
      {
        "factor": "filesystem",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 213,
            "line_end": 213
          },
          {
            "file": "SKILL.md",
            "line_start": 219,
            "line_end": 219
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 41,
        "line_end": 43,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 43,
        "line_end": 45,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 45,
        "line_end": 47,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:47:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 47,
        "line_end": 51,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 51,
        "line_end": 53,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 53,
        "line_end": 68,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:68:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 68,
        "line_end": 75,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:75:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 75,
        "line_end": 88,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:88:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 88,
        "line_end": 106,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:106:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 106,
        "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": 113,
        "snippet": "- Casts to `any` to bypass type issues"
      },
      {
        "id": "external_commands:SKILL.md:113:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 113,
        "line_end": 114,
        "snippet": "- Unnecessary type assertions (`as X`)"
      },
      {
        "id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 114,
        "line_end": 114,
        "snippet": "- `@ts-ignore` or `@ts-expect-error` without legitimate reason"
      },
      {
        "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": 127,
        "snippet": "```typescript"
      },
      {
        "id": "external_commands:SKILL.md:127:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 127,
        "line_end": 140,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 140,
        "line_end": 150,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 150,
        "line_end": 165,
        "snippet": "```"
      },
      {
        "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": 167,
        "snippet": "```bash"
      },
      {
        "id": "external_commands:SKILL.md:167:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 167,
        "line_end": 189,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:189:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 189,
        "line_end": 193,
        "snippet": "**Input**: Remove unnecessary comments from `src/auth.js`"
      },
      {
        "id": "external_commands:SKILL.md:193:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 193,
        "line_end": 202,
        "snippet": "```markdown"
      },
      {
        "id": "external_commands:SKILL.md:202:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 202,
        "line_end": 221,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:221:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 221,
        "line_end": 229,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:229:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 229,
        "line_end": 233,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:233:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 233,
        "line_end": 236,
        "snippet": "**Input**: Remove defensive bloat from `src/api/users.js`"
      },
      {
        "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": 245,
        "snippet": "```markdown"
      },
      {
        "id": "external_commands:SKILL.md:245:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 245,
        "line_end": 268,
        "snippet": "```javascript"
      },
      {
        "id": "external_commands:SKILL.md:268:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 268,
        "line_end": 276,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:276:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 276,
        "line_end": 280,
        "snippet": "```"
      },
      {
        "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": "git diff $(git merge-base HEAD main)..HEAD --name-only"
      },
      {
        "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": 167,
        "snippet": "```bash"
      },
      {
        "id": "filesystem:SKILL.md:213:hidden-file-access",
        "category": "filesystem",
        "severity": "medium",
        "pattern": "Hidden file access",
        "file": "SKILL.md",
        "line_start": 213,
        "line_end": 213,
        "snippet": "return /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);"
      },
      {
        "id": "filesystem:SKILL.md:219:hidden-file-access",
        "category": "filesystem",
        "severity": "medium",
        "pattern": "Hidden file access",
        "file": "SKILL.md",
        "line_start": 219,
        "line_end": 219,
        "snippet": "return /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);"
      },
      {
        "id": "blocker:SKILL.md:250:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 250,
        "line_end": 250,
        "snippet": "throw new Error('Invalid userId');"
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:SKILL.md:41:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:43:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:47:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:68:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:75:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:88:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:106:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:112:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is prose describing TypeScript cleanup patterns such as any casts and ignore comments. The backticks are Markdown formatting and do not represent shell execution."
      },
      {
        "id": "external_commands:SKILL.md:113:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is prose describing TypeScript cleanup patterns such as any casts and ignore comments. The backticks are Markdown formatting and do not represent shell execution."
      },
      {
        "id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is prose describing TypeScript cleanup patterns such as any casts and ignore comments. The backticks are Markdown formatting and do not represent shell execution."
      },
      {
        "id": "external_commands:SKILL.md:119:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:127:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:165:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:167:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:189:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is example input text naming a source file for cleanup. It is not executable code and does not instruct unsafe command execution."
      },
      {
        "id": "external_commands:SKILL.md:193:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:202:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:221:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:229:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:233:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is example input text naming a source file for cleanup. It is not executable code and does not instruct unsafe command execution."
      },
      {
        "id": "external_commands:SKILL.md:236:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:245:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:268:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:276:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Markdown code fence in the skill documentation, not executable Ruby or shell code. The surrounding content provides cleanup examples and does not invoke a command interpreter."
      },
      {
        "id": "external_commands:SKILL.md:166:shell-command-substitution",
        "verdict": "false_positive",
        "confidence": 0.91,
        "reason": "This is a read-only git diff example with hardcoded refs inside documentation. It has no user-controlled input, network access, or secret handling, so I do not see a command injection risk."
      },
      {
        "id": "external_commands:SKILL.md:165:template-literal-with-command-substitution",
        "verdict": "false_positive",
        "confidence": 0.94,
        "reason": "The flagged location is a Markdown bash fence that introduces a documented git diff command. It is not a template literal executed by the skill and does not create dynamic command execution."
      },
      {
        "id": "filesystem:SKILL.md:213:hidden-file-access",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The snippet is an email validation regular expression with an escaped dot. It does not access dotfiles, hidden paths, or the filesystem."
      },
      {
        "id": "filesystem:SKILL.md:219:hidden-file-access",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The snippet is an email validation regular expression with an escaped dot. It does not access dotfiles, hidden paths, or the filesystem."
      },
      {
        "id": "blocker:SKILL.md:250:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The snippet is an example validation error message in a before-and-after cleanup sample. It does not perform host enumeration, system reconnaissance, or environment inspection."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 2,
    "total_lines": 488,
    "audit_model": "codex",
    "audited_at": "2026-07-05T11:07:13.701Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Clean Up AI-Generated Code",
    "value_statement": "AI coding sessions can leave redundant comments, defensive checks, type casts, and inconsistent style. This skill guides focused cleanup that preserves behavior and verifies changes.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "AI code cleanup",
      "code review preparation",
      "refactoring checklist",
      "remove defensive code",
      "cleanup AI-generated code",
      "TypeScript cleanup",
      "branch cleanup"
    ],
    "actual_capabilities": [
      "Identifies redundant comments that restate obvious code.",
      "Flags unnecessary defensive checks on trusted paths.",
      "Finds avoidable type casts and TypeScript ignore comments.",
      "Checks naming, formatting, imports, and declarations against local style.",
      "Guides surgical edits that reduce code while preserving behavior.",
      "Encourages compile, test, and regression checks after cleanup."
    ],
    "limitations": [
      "It cannot prove behavior preservation without project tests or runtime checks.",
      "It depends on clear project conventions to judge style accurately.",
      "It may need human review before removing defensive code on untrusted inputs.",
      "It does not replace security review or performance profiling."
    ],
    "use_cases": [
      {
        "title": "Prepare an AI-Assisted Branch",
        "description": "Review changed files for redundant comments, type workarounds, and defensive bloat before opening a pull request.",
        "target_user": "Software developer"
      },
      {
        "title": "Reduce Review Noise",
        "description": "Clean style drift and obvious generated artifacts so reviewers can focus on behavior and architecture.",
        "target_user": "Engineering team lead"
      },
      {
        "title": "Standardize Generated Contributions",
        "description": "Apply project cleanup rules to code produced by different assistants before merging into the main branch.",
        "target_user": "Maintainer"
      }
    ],
    "prompt_templates": [
      {
        "title": "Clean a Branch",
        "scenario": "Beginner cleanup after an AI coding session",
        "prompt": "Review this branch for AI-generated code artifacts. Remove redundant comments, unnecessary defensive checks, type workarounds, and style inconsistencies. Preserve behavior and tell me what changed."
      },
      {
        "title": "Clean Specific Files",
        "scenario": "Focused cleanup for a known area",
        "prompt": "Clean the files I changed in src/. Match the existing project style, keep useful comments, and remove only code that does not affect behavior. Run available checks when finished."
      },
      {
        "title": "Review Before Pull Request",
        "scenario": "Intermediate review preparation",
        "prompt": "Compare this branch with main and identify AI-generated artifacts in the changed files. Make small cleanup edits, list removed patterns, and confirm the tests or checks you ran."
      },
      {
        "title": "Plan Risky Cleanup",
        "scenario": "Advanced cleanup with behavior risk",
        "prompt": "Create a cleanup plan for generated code in this module before editing. Separate safe removals from changes that need tests or reviewer approval. Then apply only the safe edits first."
      }
    ],
    "output_examples": [
      {
        "input": "Remove unnecessary comments from an authentication utility.",
        "output": [
          "Reports that redundant comments were removed while useful context was kept.",
          "Shows that line count decreased and behavior stayed the same.",
          "Notes which tests or checks passed after the cleanup."
        ]
      },
      {
        "input": "Clean defensive bloat from a user API helper.",
        "output": [
          "Identifies redundant validation already handled by callers.",
          "Keeps legitimate error handling for database failures and untrusted inputs.",
          "Summarizes the reduced code path and remaining risks for review."
        ]
      },
      {
        "input": "Prepare an AI-generated pull request for review.",
        "output": [
          "Groups cleanup by comments, type workarounds, style drift, and defensive checks.",
          "Lists files changed and explains why each edit is safe.",
          "Flags any cleanup that needs reviewer judgment instead of applying it."
        ]
      }
    ],
    "best_practices": [
      "Run the skill on a small diff and review each edit before merging.",
      "Keep defensive checks for untrusted input, external data, and security boundaries.",
      "Verify cleanup with the project formatter, type checker, and test suite when available."
    ],
    "anti_patterns": [
      "Do not remove comments that explain business rules, security decisions, or non-obvious behavior.",
      "Do not simplify code only because it looks verbose without checking callers and tests.",
      "Do not apply cleanup across unrelated files in one large change."
    ],
    "faq": [
      {
        "question": "Does this skill change code automatically?",
        "answer": "It guides cleanup edits when used by an agent. You should review the diff before merging."
      },
      {
        "question": "Can it remove real error handling by mistake?",
        "answer": "Yes, if context is unclear. Keep error handling for untrusted input, external services, and security boundaries."
      },
      {
        "question": "Does it work with TypeScript projects?",
        "answer": "Yes. It specifically looks for unnecessary casts, ignore comments, and type workarounds."
      },
      {
        "question": "Should I run tests after cleanup?",
        "answer": "Yes. The skill expects compile, type, lint, or test checks whenever the project supports them."
      },
      {
        "question": "Can Claude, Codex, and Claude Code use it?",
        "answer": "Yes. The report marks support for Claude, Codex, and Claude Code."
      },
      {
        "question": "Is this a replacement for code review?",
        "answer": "No. It prepares a cleaner diff, but reviewers still need to check behavior and architecture."
      }
    ]
  },
  "file_structure": [
    {
      "name": "references",
      "type": "dir",
      "path": "references",
      "children": [
        {
          "name": "refactoring-plan.template.md",
          "type": "file",
          "path": "references/refactoring-plan.template.md",
          "lines": 173
        }
      ]
    },
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 315
    }
  ]
}
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall