Gspdev prompt audit

From jubscodes/get-shit-pretty · View interactive version

Gspdev prompt audit is an AI agent skill from the GitHub repository jubscodes/get-shit-pretty. AI-driven semantic analysis of GSP skills and agents — finds dead weight, contradictions, vagueness, and over-prompting that automated checks can't catch.

How to use this skill

Skill file

<context>

GSP has 34 skills and 15 agents. Over time, rules accumulate to fix individual bad outputs, creating contradiction, repetition, and vagueness that makes the AI worse, not better.

This skill performs semantic analysis that automated tests (P1–P7 in audit-tests.sh) can't catch. It evaluates meaning, not just structure.

Principle: "Your AI setup should be getting simpler over time — addition by subtraction."

Source layout:

</context>

<objective>

Analyze prompt files for semantic quality issues and produce a report with specific cut/rewrite recommendations. Output to dev/reports/prompt-audit.md.

</objective>

<process>

Step 1: Parse scope

$ARGUMENTS determines what to analyze:

Step 2: Run automated baseline first

bash dev/scripts/audit-tests.sh prompts

Note the warnings — they provide structural context for the semantic analysis.

Step 3: Per-file semantic analysis

For each file in scope, read it fully and evaluate against these 5 criteria:

3a: Dead weight

Instructions the model already follows without being told. Examples:

Test: Would removing this instruction change the output? If no → dead weight.

3b: Contradictions

Rules that conflict within the same file or between a skill and its spawned agent. Examples:

Test: Can the model satisfy both instructions simultaneously? If not → contradiction.

3c: One-off patches

Rules that read like they were added to fix one specific bad output rather than a general pattern. Signs:

Test: Does this rule improve >50% of outputs, or just prevent one past mistake? If the latter → one-off patch.

3d: Vagueness

Instructions so ambiguous the model would interpret them differently every run. Examples:

Test: If 10 different Claude instances read this instruction, would they all do the same thing? If not → vague.

3e: Repetition

Instructions covered by:

Test: Is this instruction the only place this guidance exists? If not → repetition.

Step 4: Cross-file analysis

4a: Skill → Agent duplication

For each skill that spawns an agent, compare:

Flag instructions that appear in both — the agent receives them twice.

4b: Global patterns

Look for instructions that appear across 3+ files with slight variations. These should either be:

Step 5: Generate report

Write the report to dev/reports/prompt-audit.md with this structure:

# GSP Prompt Audit Report

Generated: {date}
Scope: {scope}
Automated baseline: {P1-P7 summary}

## Executive summary

- Files analyzed: X
- Total issues: Y
- Dead weight: A instances
- Contradictions: B instances
- One-off patches: C instances
- Vague directives: D instances
- Repetition: E instances

## Per-file findings

### {filename} ({lines} lines)

**Dead weight** (X items)
- Line ~N: "{instruction}" — {reason this is dead weight}

**Contradictions** (X items)
- "{instruction A}" contradicts "{instruction B}" — {explanation}

**One-off patches** (X items)
- Line ~N: "{instruction}" — {why this looks like a one-off fix}

**Vague directives** (X items)
- Line ~N: "{instruction}" — {why this is too vague to act on}

**Repetition** (X items)
- Line ~N: "{instruction}" — also in {other file(s)}

**Recommendation:** {cut X lines, rewrite Y lines, net reduction: Z lines}

---

{repeat for each file}

## Cross-file findings

### Skill → Agent duplication
{list of duplicated instructions between skill/agent pairs}

### Global patterns
{instructions repeated across 3+ files}

## Summary

| File | Lines | Dead | Contradict | One-off | Vague | Repeat | Cut |
|------|-------|------|-----------|---------|-------|--------|-----|
| ... | ... | ... | ... | ... | ... | ... | ... |

**Total potential reduction: X lines ({Y}% of corpus)**

Step 6: Prioritize

After the report, highlight the top 5 highest-impact changes — files where cutting dead weight would most improve output quality. Consider:

  1. Files used most frequently in the pipeline (gsp-start, gsp-project-build, gsp-project-designer)
  2. Files with the most issues per line
  3. Files where contradictions exist (these actively hurt output)

</process>

<rules>

</rules>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.