From codebase-analyzer
Use when separating prompt-driven behavior from code-driven behavior, understanding what system prompts actually control vs what's hardcoded, or testing how behavior changes under different prompt configurations
How this skill is triggered — by the user, by Claude, or both
Slash command
/codebase-analyzer:analyze-prompt-influenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compare two influence sources: (1) what the system prompt instructs, (2) what the code actually enforces. Determine the gap between "told to do" and "forced to do."
Compare two influence sources: (1) what the system prompt instructs, (2) what the code actually enforces. Determine the gap between "told to do" and "forced to do."
Prerequisite: Reads docs/analysis/tool-graph.md and docs/analysis/gate-map.md (from extract-tool-graph and map-feature-gates).
Prompt is not behavior. This is the single most important insight for analyzing control architecture. A system prompt that says "don't do X" is a suggestion. Code that removes tool X from the tool registry is enforcement. The gap between them is where the real control architecture lives -- and where the real vulnerabilities hide.
Every "prompt-driven" behavior falls somewhere on this spectrum:
Suggestion <-------> Enforcement
| |
v v
Prompt only Code only
"Be concise" Token limit=500
"Don't do X" Tool X not registered
"Focus on Y" SQL filter WHERE y=Y
Most systems have behaviors scattered across the entire spectrum. The analyst's job is to map each one and find the gaps.
For each behavior dimension, run this three-question protocol:
Classify each gap:
Map prompt vs code control across these behavioral dimensions:
| Dimension | Prompt Control (Says) | Code Enforcement (Does) | Gap Type |
|---|---|---|---|
| Tool usage | "Use tool X only when Y" | Tool X registered only if gate Y passes | Variable -- check registration |
| Response style | "Be concise" / "Use markdown" | Token limit, output schema validation | Usually wide -- style is prompt-only |
| Safety | "Don't generate harmful content" | Output classifier + filter pipeline | Critical if prompt-only |
| Capabilities | "You can do X" | X only available if feature flag is on | Medium -- flag controls existence |
| Data access | "Only access user's own data" | Query-level row filtering, API scope checks | Critical if prompt-only |
| Error handling | "Apologize and retry" | Automatic retry with backoff in code | Usually narrow -- code handles it |
| Rate limiting | "Don't spam the user" | Hard throttle in middleware | Usually narrow |
| Context scope | "Focus on the current project" | File path sandboxing, repo boundary checks | Variable -- check sandbox config |
For each dimension, the analyst must answer: if the model ignores the prompt, what happens? If the answer is "nothing prevents it," that is a wide gap.
| Dimension | Prompt Control | Code Enforcement |
|---|---|---|
| Tool usage | "Use tool X only when Y" | Tool X registered only if gate Y passes |
| Response style | "Be concise" | Token limit in code |
| Safety | "Don't generate harmful content" | Output filter in code |
| Capabilities | "You can do X" | X only available if feature flag on |
The gap is the architecture. Systems with wide gaps in safety-critical dimensions (data access, tool usage, safety) rely on model compliance rather than engineering controls. This is the most important finding in any prompt influence analysis.
Write docs/analysis/prompt-influence.md using standard contract.
Include: prompt controls, code controls, gap analysis by dimension, behavioral dimensions with gap classification, and a summary of which dimensions are engineering-controlled vs trust-controlled.
npx claudepluginhub quangphu1912/codebase-analyzer --plugin codebase-analyzerProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.