Skip to content

content-banned-references

Detect banned or deprecated model names, APIs, and custom patterns

Severity warning (auto)
Autofix -
Since v0.7.0
Category Content Intelligence

Why

Deprecated model names, retired API endpoints, and other banned references rot silently — the model will still try to use them, producing errors or unexpected behavior. Keeping references current avoids wasted tokens on instructions that cannot succeed.

Examples

Bad:

Use the `text-davinci-003` model for completions.
Call the `/v1/complete` endpoint.

Good:

Use `claude-sonnet-4-6` for completions.
Call the `/v1/messages` endpoint.

How to fix

Replace deprecated model names with their current equivalents and update retired API endpoints. Custom banned patterns configured via the banned list should be replaced per the message in the violation. A coding agent can update flagged references automatically.

Tuning

Add project-specific bans or disable the built-in checks:

rules:
  content-banned-references:
    banned:
      - pattern: "\\blegacy-api\\b"
        message: "Use v2-api instead"
    skip-builtins: false

Configuration

rules:
  content-banned-references:
    enabled: auto  # true | false | auto
    severity: warning
Parameter Description Default
banned Additional banned patterns as list of {pattern, message} dicts []
skip-builtins Disable built-in deprecated model/API checks false
regex-timeout Per-pattern wall-clock budget (seconds) for custom banned patterns; guards against catastrophic-backtracking regexes (clamped to 10s max) 2.0

Research Basis

Detects deprecated model names, retired APIs, and custom banned patterns.

LLMs trained on older data generate deprecated API calls 70–90% of the time when given outdated context (Wang et al., ICSE 2025). An instruction file that says "use claude-2 for summarization" or "call /v1/complete" becomes that outdated context — the model will generate code targeting APIs that no longer exist.

The rule ships with built-in patterns for deprecated Anthropic and OpenAI models and supports user-defined patterns via the banned config key.

References:

Run skillsaw explain content-banned-references to see this documentation and the rule's effective configuration in your terminal.