/context-firewall
Audit provider-facing context, trust, drift, poisoning signals, and budget, then manage the reviewed baseline through a plan-first public CLI workflow
Claude Code
$ npx -y skills add jmagly/aiwg --skill context-firewall --agent claude-code
Codex
$ npx skills add jmagly/aiwg --skill context-firewall -a codex -y
Cursor
$ npx skills add jmagly/aiwg --skill context-firewall -a cursor -y
Gemini CLI
$ npx skills add jmagly/aiwg --skill context-firewall -a gemini-cli -y
GitHub Copilot
$ npx skills add jmagly/aiwg --skill context-firewall -a github-copilot -y
OpenCode
$ npx skills add jmagly/aiwg --skill context-firewall -a opencode -y
Windsurf
$ npx skills add jmagly/aiwg --skill context-firewall -a windsurf -y
SKILL.md
context-firewall.SKILL.mdnamespace: aiwg
name: context-firewall
platforms: [all]
kernel: true
description: Audit provider-facing context, trust, drift, poisoning signals, and budget, then manage the reviewed baseline through a plan-first public CLI workflow
Context Firewall
Use the public AIWG CLI to inspect context that can enter provider sessions. Keep scans read-only, never print source bodies as part of a threat finding, and treat baseline confirmation as an attestation that every planned record was reviewed.
Triggers
- "audit context" → run the read-only firewall scan
- "check context budget" → scan and explain budget attribution
- "review memory baseline" → produce the full baseline plan without writing
- "approve the context baseline" → plan first, then request explicit write authorization
- "doctor says the context baseline is missing" → route to the plan-first workflow
Process
1. Run `aiwg context-firewall scan`, adding repeatable `--provider <name>`, `--strict`, or `--json` only when the task needs them. 2. Report violations and warnings using paths, trust labels, review states, digests, sizes, and signal identifiers. Do not reproduce suspicious content. 3. If a baseline is requested, run `aiwg context-firewall baseline --plan`. Inspect every emitted record and surface any quarantined, stale, external, or changed entry before considering a write. 4. Do not infer approval from a request to scan, diagnose, plan, or repair. Baseline mutation requires explicit user authorization after the plan has been presented and reviewed. 5. Only after that authorization, run `aiwg context-firewall baseline --write --confirm-reviewed`. Use `--output <project-relative-path>` only when the user requested a custom destination. 6. Re-run `aiwg context-firewall scan --strict` and report the resulting status.
The writer fails closed for unsafe records, paths outside the project root, symlink escapes, and missing confirmation. Do not bypass those checks or invoke the underlying implementation script directly.
Output
Report:
- providers and total portable context budget;
- attribution by memory, rule, skill, agent, generated bridge, and project-local;
- trust and review findings by path, without source bodies;
- whether the operation was read-only or changed the reviewed baseline;
- the final strict scan status.
References
- @$AIWG_ROOT/docs/security/context-memory-firewall.md — operator model and remediation guide
- @$AIWG_ROOT/docs/agents/cli-reference.md — public CLI contract
- @$AIWG_ROOT/tools/security/context-memory-firewall.mjs — packaged engine; never invoke directly for user remediation
Read more
namespace: aiwg name: context-firewall platforms: [all] kernel: true description: Audit provider-facing context, trust, drift, poisoning signals, and budget, then manage the reviewed baseline through a plan-first public CLI workflow
Context Firewall
Use the public AIWG CLI to inspect context that can enter provider sessions. Keep scans read-only, never print source bodies as part of a threat finding, and treat baseline confirmation as an attestation that every planned record was reviewed.
Triggers
- "audit context" → run the read-only firewall scan
- "check context budget" → scan and explain budget attribution
- "review memory baseline" → produce the full baseline plan without writing
- "approve the context baseline" → plan first, then request explicit write authorization
- "doctor says the context baseline is missing" → route to the plan-first workflow
Process
1. Run `aiwg context-firewall scan`, adding repeatable `--provider <name>`, `--strict`, or `--json` only when the task needs them. 2. Report violations and warnings using paths, trust labels, review states, digests, sizes, and signal identifiers. Do not reproduce suspicious content. 3. If a baseline is requested, run `aiwg context-firewall baseline --plan`. Inspect every emitted record and surface any quarantined, stale, external, or changed entry before considering a write. 4. Do not infer approval from a request to scan, diagnose, plan, or repair. Baseline mutation requires explicit user authorization after the plan has been presented and reviewed. 5. Only after that authorization, run `aiwg context-firewall baseline --write --confirm-reviewed`. Use `--output <project-relative-path>` only when the user requested a custom destination. 6. Re-run `aiwg context-firewall scan --strict` and report the resulting status.
The writer fails closed for unsafe records, paths outside the project root, symlink escapes, and missing confirmation. Do not bypass those checks or invoke the underlying implementation script directly.
Output
Report:
- providers and total portable context budget;
- attribution by memory, rule, skill, agent, generated bridge, and project-local;
- trust and review findings by path, without source bodies;
- whether the operation was read-only or changed the reviewed baseline;
- the final strict scan status.
References
- @$AIWG_ROOT/docs/security/context-memory-firewall.md — operator model and remediation guide
- @$AIWG_ROOT/docs/agents/cli-reference.md — public CLI contract
- @$AIWG_ROOT/tools/security/context-memory-firewall.mjs — packaged engine; never invoke directly for user remediation
Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Other skills on aiwg.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about context-firewall.
- Which coding agents can use context-firewall?
- context-firewall installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

