Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>AI GuardrailNew to Visual Studio Code? Get it now.
AI Guardrail

AI Guardrail

up2you

|
12 installs
| (0) | Free
Catches the mistakes AI coding assistants make, with free live rules and your team's own rules
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Guardrail

Catches the mistakes AI coding assistants actually make — as you type.

AI-generated code looks right. That's the problem. It imports packages that don't exist, inlines API keys to "make it work", and reaches for innerHTML because the training data did. AI Guardrail underlines these in your editor before they reach a commit.

It also tells your assistant the rules before it writes: every rule's instruction can be written into AGENTS.md, CLAUDE.md, Cursor and Copilot, so the same rule both prevents the mistake and catches it.

The free rules need no account. A subscription adds your team's own rules, delivered to every developer's editor and every repository's AI instructions.

Every rule, the team subscription and the full guide: AI Guardrail on UP2YOU

Your code never leaves your machine

Scanning is fully local. The only things that ever leave your editor:

  • Rule requests — to up2you.app when the editor starts, a setting changes or you refresh the rules; once you connect an API key they carry a session token minted from it
  • Package names — checked against the npm registry on open, on save and when the rules refresh, to catch hallucinated dependencies and, with a subscription, packages almost nobody downloads
  • Rule metadata — only if you explicitly send feedback (rule key, verdict, file language, engine version and your note — never code or file names)

No telemetry, no code upload, no exceptions.

What it catches

  • Hallucinated dependencies: imports of npm packages that were never published, and known typosquats with the correct name suggested
  • Secrets: provider API keys, tokens and private keys committed into code or documentation
  • Injection and unsafe output: SQL and shell commands built from strings, unescaped HTML, code built at runtime
  • Insecure defaults: TLS verification off, weak hashing, wildcard CORS, debug mode left on
  • AI SDK and agent misuse: model keys shipped to the browser, LangChain flags that let model output load pickles, run code or call any URL, and with a subscription our pro rules for model output and agent tools
  • Copied code: a block of 6 or more lines you just added or edited that already exists in another file or further up the same one, with a link to the existing copy. Duplication already in your last commit stays quiet; test files, migrations and blocks made mostly of declarations (markup, fields, signatures, enum cases, parameter lists) are left out. The project is indexed in memory on your machine and kept current as you type, save, or change files with git

The full, current list is in the rule catalog on AI Guardrail on UP2YOU.

It scans JavaScript, TypeScript, Vue, PHP and Blade, Python, Go, Java, C# and Ruby files, Markdown documentation for real provider keys, and JSON and YAML files for the rules written for them; which rules apply to each language comes from the live ruleset.

Rules are live data, not extension code. They're maintained centrally and improve without extension updates: the editor loads the latest rules when it starts, when a setting changes, and when you click the status bar or run AI Guardrail: Refresh Rules.

Getting started

Install, open a project, done. The extension and the free ruleset are free and load anonymously — no account, no configuration.

Your team's own rules

Our rules catch what every AI assistant gets wrong. Your team also has rules nobody else knows: "dates are stored in UTC", "the database is reached only through the repository layer", "use our internal client, not fetch". With the AI Guardrail app on UP2YOU you write them once in your panel:

  • Every teammate's editor underlines them the next time it loads the rules, with no extension update and no config file to copy
  • Rules fit your architecture: limit a rule to the folders it is about or keep it out of some, and require a line every file must have, such as declare(strict_types=1);
  • What the code uses is defined: every translation key passed to t() exists in your locale file, nested keys and plural forms included, with the closest existing key suggested for a typo; on request, keys nothing uses are flagged too. A rule that finds no definitions, or none for most of its uses, is paused with a warning instead of underlining every use
  • Every repository's AI instructions carry them, so a new developer's assistant follows your conventions on day one
  • Any of our rules can be tuned: publish a rule with the same key and yours replaces ours for your team
  • False positives your developers report land in your panel, so you see which rule needs narrowing
  • Our pro rules come on top

The app is a one-time monthly or yearly payment for your team's workspace that never renews automatically. Buying it opens your team's panel at up2you.app → My apps → AI Guardrail. Once your team has it:

  1. Your admin adds you under the panel's Members tab, by the email of your UP2YOU account.
  2. Create an API key at up2you.app → Profile → API keys. Scope it to the AI Guardrail workspace so the key only reaches that app's data. The key is shown once — copy it.
  3. Run AI Guardrail: Connect with API Key from the command palette and paste it. The status bar shows AG: N rules (free + pro): our pro rules now apply; they are maintained by us and update without an extension release, like the free set.
  4. Once your team publishes a rule in the panel, it loads from the workspace the key is scoped to, with no setting, and the status bar shows AG: N rules (free + pro + org). A rule of yours overrides ours with the same key. Your panel holds only your team's rules; ours arrive without being imported.

When the subscription ends, the pro rules stop loading and are removed from the offline cache; the free set keeps working.

Your UP2YOU password is never stored in the editor. Revoke a key any time from the same screen: within 24 hours its session ends and the editor stops receiving new versions of your team's rules and the pro rules. The free rules keep working, the last loaded rules stay in the offline cache, and nothing else on your account is affected.

Found a false positive? Open the lightbulb menu on the finding → Report false positive. Your admin sees it in the panel.

Teach your AI assistant the rules

Run AI Guardrail: Write AI Instructions and pick your tools. Each rule's one-line instruction is written where the tool reads it:

Tool File
AGENTS.md (Codex and others) A marked block in AGENTS.md; the rest of the file is yours and stays as is
Claude Code .ai-guardrail/instructions.md, imported by one line in CLAUDE.md
Cursor .cursor/rules/ai-guardrail.mdc
GitHub Copilot .github/instructions/ai-guardrail.instructions.md

Nothing is written until you ask, and a file that did not change is never touched. Commit the files so every teammate's assistant gets the same rules; your team's own rules are written too. To change what the assistant is told, edit the rule in the panel, not the file. In CI, npx ai-guardrail-cli instructions --check fails when the files fall behind the rules.

Suppressing a finding

// ai-guardrail-disable-next-line
// ai-guardrail-disable-next-line client-secret-leak
// ai-guardrail-disable-line client-secret-leak -- test fixture, AG-214

Set aiGuardrail.suppressMode to strict to require a justification after -- — suppressions without one are void, and the comment itself is flagged.

A copied block is reported on its first line, so the comment goes above that line. A file missing a required line is reported on its first line: put ai-guardrail-disable-line with the rule key on that line. An undefined key is reported where it is used, so the usual comment works there; an unused key in a JSON file cannot carry a comment, so the rule's definition files are narrowed in the panel instead.

Settings

Setting Purpose
aiGuardrail.tenantId Another workspace's rules; empty uses the workspace your API key is scoped to
aiGuardrail.ignore Extra path segments to skip (build output is skipped by default)
aiGuardrail.suppressMode simple (default) or strict
aiGuardrail.copiesInUnchangedCode Also report copied code that is unchanged since the last commit (default off)
aiGuardrail.instructions.targets Tools to write AI instructions for: agents, claude, cursor, copilot (empty = never write)
aiGuardrail.instructions.autoUpdate Rewrite the instruction files whenever the rules change (default off)

Build output (node_modules, dist, .next, bundles, minified files) is never scanned. To skip files for everyone on the project, add a .aiguardrailignore file at the workspace root; the CLI reads the same file. One entry per line: a bare name skips every folder or file with that name, an entry with a slash is a path from the root, and # starts a comment. aiGuardrail.ignore adds to it for your editor only. Offline? The last fetched ruleset keeps working from cache; the status bar tells you.

Command line and CI

The same rules, suppress comments, npm check, duplicate code check and cross reference check run outside the editor with the ai-guardrail-cli package:

npx ai-guardrail-cli --fail-on error

It prints file:line:column findings or JSON (--format json) and exits with 1 when a finding reaches --fail-on, so a CI job fails before the code is merged.

For team admins

Your team's rules live in your UP2YOU panel: create and edit them with a form, import rule packs, review member feedback, and publish changes that reach every editor the next time it loads the rules and every repository's AI instructions on the next write. See the Docs tab in your app panel for the full guide.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft