/appsec-advisor:remove-baselinefrom appsec-advisor
Removes an installed secure-coding baseline from Claude Code's instruction files, dropping the import so rules stop loading next session. Deletes files only after explicit confirmation.
Ships in appsec-advisor. 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.
You are removing a secure-coding baseline from Claude Code's instruction files.
Installing wired the baseline into a file Claude Code reads. Removing it undoes
that wiring, which is what scripts/baseline/remove_baseline.py does. Deleting the file
is a second, opt-in step — it is the part that can destroy something, so it is
never done without asking.
Do not write or delete any file yourself. No Write, no Edit, no rm. The
script is the only thing that touches CLAUDE.md or the baseline file, so the
removal stays line-exact and backed up.
For modular installations, the same import and carrier removal rules apply. Snapshot directories are retained for existing sessions, including with --delete-file; do not delete them automatically. Modified modular adapters are refused. Upstream-managed aiscb blocks and snapshots belong to the upstream installer and are not removed by this skill.
--help — inline help (early exit)If the user's arguments contain --help or -h, print this block verbatim and exit.
/appsec-advisor:remove-baseline — Remove an installed secure-coding baseline.
USAGE
/appsec-advisor:remove-baseline [--scope <scope>] [--repo <path>]
[--dry-run] [--delete-file]
SCOPES (omit --scope to pick from what is actually installed)
user Drops the import from ~/.claude/CLAUDE.md.
project Drops the import from <repo>/CLAUDE.md.
project-rules Deletes <repo>/.claude/rules/ — there is no import to drop
there, so this scope needs --delete-file.
FLAGS
--repo <path> Repository to remove from (default: current working dir)
--dry-run Report what would change, write nothing
--delete-file Also delete the baseline file, not just the import
WHAT IS REMOVED
By default only the @import line and the note the installer wrote above it,
so the rules stop loading and the file stays. Any instruction file that is
edited is backed up to <file>.bak first, and only a line that is nothing but
the import — or that note — is touched.
The only file --delete-file can ever delete is the one this scope installs
to, plus its .bak. An AGENTS.md or copilot-instructions.md that the install
imported instead of copying is never deleted — it is your file.
A baseline deployed organization-wide through Claude Code's managed policy
cannot be removed locally, and this command will say so rather than try.
Related: /appsec-advisor:verify-baseline — check what is loaded, changes nothing.
After printing, exit.
Recognized flags:
--scope <user|project|project-rules> --repo <path> --dry-run
--delete-file --help | -h
Default REPO_ROOT to the current working directory.
If the invocation contains any token that is not one of the flags above — or is
not the value consumed by --scope / --repo — DO NOT proceed. Print this to
stderr, substituting <TOKEN>, and exit with status 2:
Error: unknown argument '<TOKEN>'
/appsec-advisor:remove-baseline accepts only:
--scope <user|project|project-rules> Which install to remove (default: ask)
--repo <path> Repository (default: current dir)
--dry-run Report changes, write nothing
--delete-file Delete the file, not just the import
--help, -h Show full help and exit
Run `/appsec-advisor:remove-baseline --help` for details.
An unknown value for --scope is rejected the same way.
python3 "$CLAUDE_PLUGIN_ROOT/scripts/baseline/baseline_check.py" --repo "$REPO_ROOT" --json
Read status and scopes before offering anything — removing what is not
installed is the one way this command can only do harm.
disabled — this build has no baseline configured. Print
No secure-coding baseline is configured for this build — nothing to remove.
and exit 0.missing — nothing is loaded. Say so in one line and stop. If
present_unloaded is non-empty, name those files and say they are on disk but
already not loaded, so there is nothing to unwire. Do not offer to delete
them; they may belong to another tool. Exit 0.other — a different baseline is loaded, not the configured one. Name
both ids and stop: this command removes the configured baseline, and deleting
somebody else's rules is not what was asked. Exit 0.switched_off — the configured baseline comes from the AI Secure Coding Baseline's own installer (aiscb) and is only switched off for this session. Say that its own installer removes it, together with the hooks and links it set up, and exit 0.installed — continue, unless every record in matches carries managed_by: aiscb: then the same applies as for switched_off, because this command changes nothing in that installation.policy in scopes — say it before anything elseThe baseline was deployed organization-wide through Claude Code's managed policy. It applies to every session on this machine and cannot be removed locally — not by this command, not by editing a file in the repository.
If policy is the only scope, say that and exit 0. If it appears next to
user or project, say it once up front: removing the local copy will not stop
the rules loading, and the user should know that before they decide.
If --scope was passed, use it — but if it is not in the reported scopes,
say so and stop rather than removing something that is not there.
Otherwise: if exactly one removable scope is installed, use it and name it. If
both user and project are installed, ask with AskUserQuestion — one
question, header Scope, one option per installed scope, described by who loses
the rules:
~/.claude/CLAUDE.md stops importing it. Affects every
repository you open, nothing for your team. → scope userCLAUDE.md stops importing it. Once you
commit that, everyone who clones the repository loses the rules too.
→ scope projectFor project-rules, the file is the wiring, so there is nothing to unwire —
that scope always goes through Step 5.
python3 "$CLAUDE_PLUGIN_ROOT/scripts/baseline/remove_baseline.py" \
--scope "$SCOPE" --repo "$REPO_ROOT" --dry-run
Print the script's output as-is. It names every file it would change, and every
line prefixed with ! is a risk or something it refuses to touch — relay
those, do not summarize them away.
If the user passed --dry-run, stop here and exit with the script's status.
Unwiring alone needs no confirmation: the import line is backed up and re-running the install puts it back.
Deleting the file does need one. Before passing --delete-file — whether
the user asked for it or the scope is project-rules, which cannot work without
it — ask with AskUserQuestion, one question, header Delete file, and put the
absolute path from the dry run in the question text. Default to keeping:
<PATH> and its .bak. → pass --delete-fileState these before the question, and any ! line the dry run printed:
For project-rules, if the user chooses to keep the file, stop and say plainly
that the baseline still loads — .claude/rules/ loads on its own, so keeping
the file means keeping the rules.
python3 "$CLAUDE_PLUGIN_ROOT/scripts/baseline/remove_baseline.py" \
--scope "$SCOPE" --repo "$REPO_ROOT" $DELETE_FLAG
Print the output as-is and propagate the exit status.
On success, close with what applies and nothing more:
<file>.bak, named in the output.
Re-running /appsec-advisor:install-baseline also restores the import.project and project-rules, the change is uncommitted. Name the
paths so the user can review the diff. Do not commit them yourself.Then stop. Do not offer to reinstall it, and do not comment on whether removing it was a good idea.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
28 skills in this plugin
/abuse-casesList the technical and business abuse cases defined for a repository — the plugin's standard cases, the organization profile's cases, and the repository's own cases in docs/security/abuse-cases/ — each with its origin, kind, and title. Use for "which abuse cases are defined?", "welche abuse cases gibt es?", "show our business abuse cases", or to look up the ID to pass to analyze-threats --abuse-case. Read-only; it does not check a case against the code. For the outcome a past run recorded, use ask-security-assessment./analyze-threatsAdvisory threat analysis on request: a planned design, selected code changes, a concrete threat hypothesis against named files or directories at a Git revision, or a defined abuse case by its ID. Combines source evidence with requirements, business context, and an optional threat model. Reports findings, scenarios, assumptions, and questions whose answers change the assessment. Hypothesis checks distinguish supported, not confirmed in scope, and unresolved; no result proves safety. Answers can be saved explicitly to a feature file. Never edits code, changes the threat model, or grants security approval./appsec-analyzerSecurity assessment of one repository through the deterministic controller; writes security-assessment.md and security-assessment.yaml to a private directory per application under the user data directory, or to --output. Runs full assessments only: --incremental, --rerender, --dry-run, --base, --pr-mode, --restore-from and a free-text focus are refused. Without a budget flag the depth sets a hard budget (quick 10, standard 20, thorough 40 USD). Models are fixed per role, not taken from the session; --model, --stride-model, --triage-model, --merger-model and --reasoning-model change them. --width sets the widest progress line (72 by default). Stop a running assessment with --stop./ask-security-assessmentAnswer ANY question about the threat model in this repo — read-only Q&A over the committed threat-model.yaml. The default surface for every natural-language query about the model, however simple: does one exist at all ("is there a threat model here?", "gibt es hier ein bedrohungsmodell?"), how it stands ("how bad is it?", "is it still current?"), anything about its contents ("what are the critical findings?", "does it cover SSRF / IDOR / auth?", "which findings touch the payment service?", "is there a fix for F-003?", "welche kritischen findings gibt es?", "deckt mein bedrohungsmodell XSS ab?"), and meta questions ("what does P1 mean?", "what is STRIDE here?"). Grounds every data answer in the model and cites F-ids; never analyzes code, re-scores, spawns agents, or writes files. Prefer this over show-security-assessment for anything phrased as a question — show only prints a fixed summary block on explicit request. To act on findings use triage-security-assessment; to (re)generate use appsec-analyzer./audit-security-requirementsAudit the current repository against a security requirements catalog and verify whether each requirement is implemented. Requirement IDs follow your catalog's own naming scheme (e.g. SEC-CSP-1, SCG-HARDENXML, or anything your YAML defines); tagging code with those IDs is optional and not required. Prints open requirements to the conversation with color-coded status and concise evidence. Optionally saves Markdown/PDF reports. With --json or --gate it also persists a deterministic structured verdict (.requirements-audit.json) and can act as a CI gate./authnz-reviewStandalone AuthN/AuthZ review of any repository. Runs three deterministic Python scanners (route inventory, auth-check scanner, IDOR confirmer) and dispatches a specialized agent that reasons over the combined output: cross-component IDOR chains, RBAC coverage gaps, JWT misconfiguration, and privilege-escalation signals. Optionally annotates findings with violated requirement IDs from a requirements catalog, and exports the findings as pentest tasks for an AI pentest agent. Does NOT require a prior threat model run. Prints results to the console; file output only with --save or --pentest-tasks.npx claudepluginhub appsec-foundry/appsec-advisor --plugin appsec-advisorOther plugins' skills for the same job