/xai-check
Explainability (XAI) audit for products containing AI components. Five-stage tier-scaled check: risk classification, stakeholder×question matrix, fidelity audit, system card, recourse path. Honest about what was validated functionally vs what needs user testing.
Claude Code
$ npx -y skills add haabe/mycelium --skill xai-check --agent claude-code
Codex
$ npx skills add haabe/mycelium --skill xai-check -a codex -y
Cursor
$ npx skills add haabe/mycelium --skill xai-check -a cursor -y
Gemini CLI
$ npx skills add haabe/mycelium --skill xai-check -a gemini-cli -y
GitHub Copilot
$ npx skills add haabe/mycelium --skill xai-check -a github-copilot -y
OpenCode
$ npx skills add haabe/mycelium --skill xai-check -a opencode -y
Windsurf
$ npx skills add haabe/mycelium --skill xai-check -a windsurf -y
SKILL.md
xai-check.SKILL.mdname: xai-check
description: "Explainability (XAI) audit for products containing AI components. Five-stage tier-scaled check: risk classification, stakeholder×question matrix, fidelity audit, system card, recourse path. Honest about what was validated functionally vs what needs user testing."
metadata:
instruction_budget: "60"
framework_dependency: "mycelium"
framework_dependency_note: "This skill is designed to run within the Mycelium framework (https://github.com/haabe/mycelium). Standalone use will skip the canvas state, theory gates, and harness behavior the skill assumes. Install: /plugin install mycelium@haabe-mycelium."
XAI Check Skill
Operational gate for the Explainability Theory Gate (Gate 13). Audits whether a product's AI components meet a defensible XAI bar — disclosure, decision-explanation, recourse, fidelity, system card — scaled to the AI Act risk tier.
This skill is **functionally-grounded** in Doshi-Velez & Kim's (2017) sense: it operates on artifacts and configuration, not on real users with real tasks. Output explicitly distinguishes `validated_functionally` from `needs_user_testing`. The honest tag is what passes Gate 13; user-grounded validation is recommended but not blocking.
**The gate reads this skill's record (v0.331.0).** On a product with AI components detected, an Explainability pass counts only when a `services[].xai` block holds a verdict for each stage the scale asks: at an L3 the tier (Stage 1); at an L4 or L5 every stage, with `recourse.verdict` asked from the `limited` tier up. A stage that does not apply takes a verdict saying so (`not_applicable`). The scale-lock gate and the release gate name the stage that is missing. Until 0.331.0 the gate passed on the status word.
When to Use
- An L3's `release` or `close`, **only when `active-stack.yml :: ai_components.detected: true`**
- An L4's `release` — required when AI components reach user-affecting decisions (deny, recommend, rank, generate user-shown content)
- An L5's `release` — required for any user-facing AI feature at launch
- After any change to AI components, prompts, or surfaces that affect user-facing decisions
- When Gate 13 is checked during `/mycelium:diamond-progress`
Precondition: AI components detected
Read `.claude/jit-tooling/active-stack.yml` (Step 1c output of `delivery-bootstrap` per `${CLAUDE_PLUGIN_ROOT}/jit-tooling/detector.md`). It is **project state** — it lives in the consumer's `.claude/`, not in the shared plugin cache.
- If `ai_components.detected` is missing or `false`: report **"No AI components detected — XAI Gate N/A. Run `/mycelium:delivery-bootstrap` if you believe AI is present but undetected."** Stop.
- If `ai_components.detected: true` but `user_facing_decisions: unknown` (Step 6 confirmation never answered): prompt the user explicitly: *"This product has AI components, but it's not on record whether their outputs reach end users in a user-affecting way. Does the AI's output deny / recommend / rank / generate content shown to users, or otherwise drive their experience?"* Do not proceed silently — XAI tier depends on this answer. If the user defers, default to `tier: limited` and note **"tier defaulted to limited pending user_facing_decisions confirmation"** in the output.
Workflow (5 stages)
For each service in `services.yml` (loop — multiple services produce per-service findings):
Stage 1 — Risk tier classification
**Source canonical tier from `/mycelium:regulatory-review` output if available.** Read `.claude/canvas/privacy-assessment.yml` for prior AI Act risk classification. If `/mycelium:regulatory-review` has run, use its tier; this skill does not re-classify regulatory tiers as that would risk producing divergent classifications across two skills.
If `/mycelium:regulatory-review` has not run: 1. Recommend running it: *"`/mycelium:regulatory-review` is the canonical AI Act tier classifier. Without it, this skill produces a provisional tier only — which is fine for early development but should not be the final source for L4/L5 transitions."* 2. Apply provisional logic: AI Act Annex III categories → `high`; user-affecting AI without Annex III → `limited`; non-user-affecting AI → `minimal`. 3. Record `xai.tier` with a `provisional: true` note until `/mycelium:regulatory-review` confirms.
If tier classification yields `prohibited`: **stop immediately.** Escalate. Do not run subsequent stages — the product cannot ship under EU AI Act Article 5.
**Item caps by tier** (pre-committed to prevent checklist sprawl):
- `minimal`: ≤5 total items across all stages
- `limited`: ≤15 total items
- `high`: ≤25 total items
Stage 2 — Stakeholder × question matrix
Rows = relevant stakeholders for this tier:
- `end_user` (always)
- `affected_non_user` (high-risk only — e.g., a person whose data is used but who didn't initiate the interaction)
- `deployer_developer` (limited+)
- `regulator` (high-risk)
Columns = Liao, Gruen, Miller (2020) question categories, subset by tier:
| Tier | Questions checked | |---|---| | minimal | `output` (what can it do?), `why` (basic rationale) | | limited | + `input` (what data?), `why_not` (contrastive), `how_to_be_that` (recourse) | | high | + `what_if` (sensitivity), `performance` (per-population accuracy), `how_global` (overall mechanism) |
For each cell relevant at the determined tier, ask the operational question: **"Is this answerable for this stakeholder, in the moment of impact, by an interface that exists today?"** Verdict per cell: `pass` / `partial` / `fail` / `N-A`.
This is intentionally Bansal et al. (2021) friendly — the test is "answerable when needed," not "always-on documentation."
Stage 3 — Fidelity audit
**Run only when the product surfaces LLM-generated rationales to users** (e.g., "Recommended because…", "Denied because…", chain-of-thought summaries).
1. Sample N outputs (N=5 minimal, 10 limited, 20 high) from production logs or a representative test set. 2. Method:
Read more
name: xai-check description: "Explainability (XAI) audit for products containing AI components. Five-stage tier-scaled check: risk classification, stakeholder×question matrix, fidelity audit, system card, recourse path. Honest about what was validated functionally vs what needs user testing." metadata: instruction_budget: "60" framework_dependency: "mycelium" framework_dependency_note: "This skill is designed to run within the Mycelium framework (https://github.com/haabe/mycelium). Standalone use will skip the canvas state, theory gates, and harness behavior the skill assumes. Install: /plugin install mycelium@haabe-mycelium."
XAI Check Skill
Operational gate for the Explainability Theory Gate (Gate 13). Audits whether a product's AI components meet a defensible XAI bar — disclosure, decision-explanation, recourse, fidelity, system card — scaled to the AI Act risk tier.
This skill is **functionally-grounded** in Doshi-Velez & Kim's (2017) sense: it operates on artifacts and configuration, not on real users with real tasks. Output explicitly distinguishes `validated_functionally` from `needs_user_testing`. The honest tag is what passes Gate 13; user-grounded validation is recommended but not blocking.
**The gate reads this skill's record (v0.331.0).** On a product with AI components detected, an Explainability pass counts only when a `services[].xai` block holds a verdict for each stage the scale asks: at an L3 the tier (Stage 1); at an L4 or L5 every stage, with `recourse.verdict` asked from the `limited` tier up. A stage that does not apply takes a verdict saying so (`not_applicable`). The scale-lock gate and the release gate name the stage that is missing. Until 0.331.0 the gate passed on the status word.
When to Use
- An L3's `release` or `close`, **only when `active-stack.yml :: ai_components.detected: true`**
- An L4's `release` — required when AI components reach user-affecting decisions (deny, recommend, rank, generate user-shown content)
- An L5's `release` — required for any user-facing AI feature at launch
- After any change to AI components, prompts, or surfaces that affect user-facing decisions
- When Gate 13 is checked during `/mycelium:diamond-progress`
Precondition: AI components detected
Read `.claude/jit-tooling/active-stack.yml` (Step 1c output of `delivery-bootstrap` per `${CLAUDE_PLUGIN_ROOT}/jit-tooling/detector.md`). It is **project state** — it lives in the consumer's `.claude/`, not in the shared plugin cache.
- If `ai_components.detected` is missing or `false`: report **"No AI components detected — XAI Gate N/A. Run `/mycelium:delivery-bootstrap` if you believe AI is present but undetected."** Stop.
- If `ai_components.detected: true` but `user_facing_decisions: unknown` (Step 6 confirmation never answered): prompt the user explicitly: *"This product has AI components, but it's not on record whether their outputs reach end users in a user-affecting way. Does the AI's output deny / recommend / rank / generate content shown to users, or otherwise drive their experience?"* Do not proceed silently — XAI tier depends on this answer. If the user defers, default to `tier: limited` and note **"tier defaulted to limited pending user_facing_decisions confirmation"** in the output.
Workflow (5 stages)
For each service in `services.yml` (loop — multiple services produce per-service findings):
Stage 1 — Risk tier classification
**Source canonical tier from `/mycelium:regulatory-review` output if available.** Read `.claude/canvas/privacy-assessment.yml` for prior AI Act risk classification. If `/mycelium:regulatory-review` has run, use its tier; this skill does not re-classify regulatory tiers as that would risk producing divergent classifications across two skills.
If `/mycelium:regulatory-review` has not run: 1. Recommend running it: *"`/mycelium:regulatory-review` is the canonical AI Act tier classifier. Without it, this skill produces a provisional tier only — which is fine for early development but should not be the final source for L4/L5 transitions."* 2. Apply provisional logic: AI Act Annex III categories → `high`; user-affecting AI without Annex III → `limited`; non-user-affecting AI → `minimal`. 3. Record `xai.tier` with a `provisional: true` note until `/mycelium:regulatory-review` confirms.
If tier classification yields `prohibited`: **stop immediately.** Escalate. Do not run subsequent stages — the product cannot ship under EU AI Act Article 5.
**Item caps by tier** (pre-committed to prevent checklist sprawl):
- `minimal`: ≤5 total items across all stages
- `limited`: ≤15 total items
- `high`: ≤25 total items
Stage 2 — Stakeholder × question matrix
Rows = relevant stakeholders for this tier:
- `end_user` (always)
- `affected_non_user` (high-risk only — e.g., a person whose data is used but who didn't initiate the interaction)
- `deployer_developer` (limited+)
- `regulator` (high-risk)
Columns = Liao, Gruen, Miller (2020) question categories, subset by tier:
| Tier | Questions checked | |---|---| | minimal | `output` (what can it do?), `why` (basic rationale) | | limited | + `input` (what data?), `why_not` (contrastive), `how_to_be_that` (recourse) | | high | + `what_if` (sensitivity), `performance` (per-population accuracy), `how_global` (overall mechanism) |
For each cell relevant at the determined tier, ask the operational question: **"Is this answerable for this stakeholder, in the moment of impact, by an interface that exists today?"** Verdict per cell: `pass` / `partial` / `fail` / `N-A`.
This is intentionally Bansal et al. (2021) friendly — the test is "answerable when needed," not "always-on documentation."
Stage 3 — Fidelity audit
**Run only when the product surfaces LLM-generated rationales to users** (e.g., "Recommended because…", "Denied because…", chain-of-thought summaries).
1. Sample N outputs (N=5 minimal, 10 limited, 20 high) from production logs or a representative test set. 2. Method:
Mycelium won't make your idea good. It keeps you and your agent honest about whether it is, from first idea to market. Built on Claude Code, where the gates are structural. The files and skills port to opencode, Codex and Cursor. Outcome over output.
Other skills on mycelium.
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 xai-check.
- Which coding agents can use xai-check?
- xai-check 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.

