/semgrep:remove-guardian-developer-semgrep-rulefrom Semgrep Guardian
Removes a custom Semgrep rule from Guardian by listing installed rules, identifying the correct file, and deleting or editing it from user or repo rules directories.
Ships in Semgrep Guardian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Custom rules are plain files in two directories, both read on every scan:
~/.semgrep/guardian-rules/ — user scope, this developer everywhere<repo root>/.semgrep/guardian-rules/ — repo scope, everyone who clones the repositoryThere is no removal tool, because there is nothing to undo in a service: taking a rule off disk is the whole of it. What matters is removing the right one, and knowing who else loses it.
Call list_developer_semgrep_rules. It reports both directories, every rule file
with its scope and path, whether the rules are being sent, and the deployment's
limit. A file holds one rule or several, so check what a file carries before
removing it: the count drops by every rule in it.
If it refuses because the feature is off for the deployment, the rules on disk are still just files — nothing is being sent, so removal is still fine. List the two directories yourself and carry on.
The user will usually name a finding, not a file. Match what they describe — a
rule id, a message they keep seeing, a path — against the listing. If more than
one fits, ask with AskUserQuestion, showing the id, the scope and the path for
each; do not guess between two plausible rules.
Three cases worth noticing in the listing:
Before touching anything, tell the user the path, the rule id, and — for repo scope — that the rule is shared, so removing it takes it away from everyone who clones the repository. Get a yes for a repo-scope removal.
Only ever touch files inside the two rules directories, and only the file you named in step 3. Never delete a directory.
If the user wants the rule off for now rather than gone, do not delete it:
rename it to an extension that is not read — no-eval.yaml.off — or move it into
a subdirectory of the rules directory. Only .yaml, .yml and .json files
directly in the directory are loaded, so either way the rule stops running and
the text is still there to restore.
Run list_developer_semgrep_rules again and tell the user:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/add-and-validate-guardian-developer-semgrep-rulewrite a custom semgrep rule with the user, add it to guardian in either user or repo scope, and prove it fires by writing a file that should trip it. use when someone wants guardian to catch something it currently misses, asks to write or add a semgrep rule, or wants a project convention enforced on the code claude writes./install-mfwInstall the mfw (Semgrep Malware Firewall) CLI via the curl|sh installer and walk the user through setup — trust store, PATH shims, shell integration, and the background daemon — asking questions at real decision points. Detects when the user's shell rc files are *managed* (symlinked into nix / home-manager / chezmoi / GNU stow / a dotfiles git repo) and, instead of clobbering them, adds mfw's source line to the right source-of-truth. Use when the user wants to install, set up, or onboard mfw on this machine./recommend-guardian-policy-rulesRecommend Semgrep rules to add to the organization's Guardian policy for a repository — pull the rules Guardian runs now, gather candidates from the repo's existing findings and the org's custom rules, rank them for Guardian, let the user pick, and turn the picks on through the Semgrep MCP. Use when someone wants Guardian to catch more, asks which rules Guardian should run, or wants to tune or customize the Guardian policy for a repo./reconnectRe-check Semgrep Guardian's connection and recover it — verify the credential live, and log in again if it is expired. Use when Guardian reported that it timed out checking credentials or could not reach Semgrep, when scans seem not to be running, or when the user asks to reconnect Guardian.npx claudepluginhub semgrep/guardian --plugin semgrepOther plugins' skills for the same job