# Detect Theater Code Before Release

Code can look complete while missing real behavior. This skill helps Claude, Codex, and Claude Code test implementations against actual execution evidence.

## Install

```bash
npx skillstore add dnyoussef/when-detecting-fake-code-use-theater-detection
```

## Metadata

- Status: approved
- Slug: dnyoussef-when-detecting-fake-code-use-theater-detection
- Skillstore revision: r1
- Version status: missing
- Tree hash: 76926901e4ebf1e29a628a4500400f1d106264b9f12bd14e6b959c7dcfb55ce3
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/testing-quality/when-detecting-fake-code-use-theater-detection
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands, filesystem
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/dnyoussef-when-detecting-fake-code-use-theater-detection
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-when-detecting-fake-code-use-theater-detection/manifest

## Capabilities

- Scans repositories for empty handlers, no-op functions, trivial returns, and always-passing tests.
- Builds staged analysis from pattern detection through execution validation.
- Creates reports that separate confirmed theater code from likely false positives.
- Uses confidence thresholds to prioritize critical, high, medium, and low findings.
- Provides guided remediation steps and optional simple automated fixes.

## Use Cases

- Review AI-Generated Pull Requests: Check whether new code performs real work before it reaches the main branch.
- Audit Critical Security Logic: Find fake validation, empty error handling, and tests that create false confidence.
- Add Release Quality Gates: Run theater detection before deployment and produce a report for release approval.

## Prompt Templates

### Beginner Scan

```
Use theater detection on this repository. Identify obvious no-op functions, empty catches, and always-passing tests.
```

### Focused Directory Review

```
Scan the src/auth directory for theater code. Explain each finding with evidence and confidence.
```

### Execution Validation Pass

```
Validate the flagged implementations by running behavior checks in a sandbox. Separate confirmed theater code from false positives.
```

### Release Gate Report

```
Run a full theater detection workflow. Produce prioritized findings, residual risks, and required fixes before release.
```

## Limitations

- Execution validation can run code from the audited repository and should use a sandbox.
- Automated fixes are limited to simple patterns and require human review.
- Heuristic scans may miss domain-specific fake behavior without project context.
- The workflow assumes Node.js tooling and shell utilities are available.

## Best Practices

- Run execution validation inside a disposable container or isolated workspace.
- Review generated findings before applying any automated fixes.
- Pair heuristic results with domain knowledge from the owning team.

## Anti Patterns

- Do not run dynamic validation against untrusted repositories on a developer workstation.
- Do not treat pattern matches as confirmed issues without execution or semantic review.
- Do not apply repository-wide fixes without checking the diff first.

## Security Audit

- Audited at: 2026-07-05T12:37:32.861\+00:00
- Summary: Most static hits are false positives from Markdown fences, JavaScript template literals, regular expressions, Object.keys calls, and local report-generation snippets. Confirmed risk remains because the workflow can dynamically load and execute audited repository code, and the fix phase can rewrite many files. No prompt injection evidence was found in the reviewed files.

## Stats

- Views: 206
- Downloads: 7
- Favorites: 0
- Popularity score: 0
