Back to skill

Security audit

cleanup

Security checks for vulnerabilities and agentic risk

Overview

This cleanup skill is not clearly malicious, but it can automatically run code and persist session data during broad wrap-up flows, so it needs careful review before installation.

Install only if you want an assertive session-end cleanup system that may run hooks/scripts, inspect agent hook configuration, persist current session content to RAG or local queue files, and mutate task/checklist state. Disable or fix the graph-stop evaluator unless it resolves only trusted code outside the active workspace, and set explicit do-not-store expectations for sensitive projects.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
resources/graph-stop-evaluator.sh:9
Finding

Workspace-Controlled Python Evaluator Is Automatically Executed by a Stop Hook

Content
View full analysis

Vulnerability Details

File Location: resources/graph-stop-evaluator.sh, lines 9–26
Vulnerability Type: Execution of untrusted workspace code
Risk Level: High

Vulnerable Code

bash
ES6KR_ROOT="${CLAUDE_PROJECT_ROOT:-$(pwd)}"
AGENTS_ROOT="${ES6KR_ROOT}/.agents"

if [[ ! -d "${AGENTS_ROOT}" ]]; then
  # Fallback if invoked outside es6kr root
  AGENTS_ROOT="${HOME}/.agents"
fi

RUNNER="${AGENTS_ROOT}/graph/scripts/run_stop_evaluator.py"

if [[ ! -f "${RUNNER}" ]]; then
  exit 0
fi

# Execute evaluator in auto-drain mode (sub-100ms)
PYTHONPATH="${AGENTS_ROOT}" python3 "${RUNNER}" \
  --workspace "${ES6KR_ROOT}" \
  --auto-drain \
  --format summary 2>&1 || true

Technical Analysis

The wrapper derives AGENTS_ROOT from the active project root whenever the workspace contains an .agents directory. It then executes .agents/graph/scripts/run_stop_evaluator.py directly and places the same workspace-controlled directory in PYTHONPATH.

Consequently, repository content is treated as trusted native code solely because the repository is the current workspace. An untrusted repository or lower-trust workspace contributor can supply the evaluator script. The attacker may also place malicious Python modules under .agents that are imported by an otherwise legitimate evaluator due to the PYTHONPATH assignment.

The script only verifies that the target is a regular path accepted by -f. It does not verify that the evaluator belongs to a trusted installation, resolve and constrain symlinks, validate ownership or permissions, or check a pinned hash or signature. The || true suffix also suppresses a nonzero result from the payload, reducing the visibility of failed or partially completed malicious activity.

Attack Path

  1. An attacker prepares or modifies a repository containing:
    • .agents/graph/scripts/run_stop_evaluator.py, or
    • a malicious Python module under .agents that the evaluator imports.
  2. A victim opens or works ...[truncated 1415 chars]
Remediation
View remediation

Remediation Suggestions

  1. Resolve run_stop_evaluator.py exclusively from a trusted installation directory outside the active workspace. Do not prefer ${CLAUDE_PROJECT_ROOT}/.agents for executable hook code.
  2. Remove the workspace-controlled PYTHONPATH assignment. Use an isolated, trusted module path or a packaged evaluator with pinned dependencies.
  3. If workspace-local evaluators are an intentional extension mechanism, require explicit user approval before first execution and bind that approval to the repository identity and evaluator digest.
  4. Canonicalize the evaluator path with a mechanism such as realpath, reject symlinks, and ensure the resolved path remains under an approved directory.
  5. Validate ownership and permissions so lower-trust local users or repository content cannot replace the approved evaluator.
  6. Verify the evaluator against a pinned cryptographic hash or trusted signature before execution.
  7. Avoid silently suppressing all failures with || true. Record a clear, sanitized failure event so unexpected evaluator behavior remains visible without exposing sensitive output.
  8. Run the evaluator with reduced privileges and a minimal environment where practical, restricting filesystem and network access to what Stop-state evaluation actually requires.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (35)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill mandates persisting session findings, decisions, and artifacts to external or semi-external storage at wrap-up, but it does not require user notice or consent at the point of collection. Because the data categories include infrastructure findings, decisions, troubleshooting procedures, and artifacts, this can expose sensitive operational information beyond the immediate session context.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · run-knowledge-persist.md (reported line 50)May include surrounding context.

md
**Self-check (every cleanup run, before the Step 5 report)**:
1. Does `<workspace>/llm-wiki/AGENTS.md` exist? If no, report N/A and move on.
2. If yes, did you Read `index.md`'s category list before judging scope? If not, do that first — do not judge from the abstract `AGENTS.md` definition alone.
3. Does any session discovery meet an existing category's actual scope (not just the abstract "company knowledge" framing), or the Wiki's abstract scope for teammates?
4. If yes, dispatch to the raw knowledge ingest skill — never hand-author `pages/`.
4. State the explicit outcome (candidates found + dispatched, or none) in the Step 5 report — this row is mandatory whenever `llm-wiki/` exists in the workspace, matching the RAG row's mandatory-reporting discipline.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · run-self-improve.md (reported line 94)May include surrounding context.

md
**Self-check (every cleanup run, before the Step 5 report)**:
1. Does `<workspace>/llm-wiki/AGENTS.md` exist? If no, report N/A and move on.
2. If yes, did you Read `index.md`'s category list before judging scope? If not, do that first — do not judge from the abstract `AGENTS.md` definition alone.
3. Does any session discovery meet an existing category's actual scope (not just the abstract "company knowledge" framing), or the Wiki's abstract scope for teammates?
4. If yes, dispatch to the raw knowledge ingest skill — never hand-author `pages/`.
4. State the explicit outcome (candidates found + dispatched, or none) in the Step 5 report — this row is mandatory whenever `llm-wiki/` exists in the workspace, matching the RAG row's mandatory-reporting discipline.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · run-self-improve.md (reported line 37)May include surrounding context.

md
#### Hook behavior review

1. Collect the registered hooks from the canonical inventory first — `Read` the registry at the private companion repo's `hook-registry.yaml` (relocated 2026-09-10; procedure: `hook-kit`'s `registry.md` redirect), then compare it against the live surfaces (`~/.claude/settings.json` `hooks`, each plugin's `hooks/hooks.json`). A settings.json entry whose id is already registered on a plugin surface is a dual registration to remove; a file with no registry row is a backfill candidate, not an orphan to re-point by guesswork
2. **Verify hook file existence**:
   - Extract the executable path from each hook's `command`
   - Check whether the file actually exists

Context Leakage

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

The skill explicitly requires extracting and persisting the active session UUID and storing detailed session content into RAG/memory systems. That increases the risk of leaking conversation metadata and sensitive operational context into longer-lived storage, especially when imports are mandatory and broadly applied.

Content

Scanner excerpt · run.md (reported line 141)May include surrounding context.

md
| 3 | RAG receiver readyz responds OK but the import call is skipped while the report table still shows a "RAG Store" row | The call itself is mandatory — the report row displays the result, it is not a bypass channel |
| 4 | The cleanup wrap-up table explicitly states the RAG row, but the subsequent separate session-end report (e.g., "## ✅ Session Ended") buries the RAG result in a 1-line prose list | The session-end report carries the same obligation — highlight visibility with a separate markdown table row / bold line / dedicated header section |
| 5 | Fill the "Self-Improve / Knowledge Persist" rows with a self-written inline retrospect text + FA Prune non-execution report + comprehensive-matrix text (0 claudify Skill call traces) | **Only quoting Skill call results is allowed.** Quote only the `Skill("claudify", "improve")` tool response result text + `Skill("claudify", "persist")` tool response result text into the rows. Filling the row with a self-written retrospect report = bypassing the call = a violation |
| 6 | Omitting the active session UUID (`<uuid>`) or substituting a placeholder in the RAG store row or report header | Always extract conversation ID and explicitly format as `session UUID <full-36-UUID>` in row 3-C.1 and report header |
| 7 | Omit the physical numerical chunk count `N` (e.g. replacing `N chunks added` with vague prose omitting `N`) | Always include the concrete integer number of chunks `N` (e.g., `12 chunks added`) and imported artifacts count `M` in row 3-C.1 (e.g. `12 chunks added (receiver: RAG import dispatch) — session UUID <uuid>. 0 artifacts imported.`) |
| 8 | On a 2nd+ `/cleanup` invocation in the same session, reconstruct this table from memory of the prior pass's report shape | Re-read this section's literal row text before composing — a remembered shape silently drops compound sub-clauses (e.g., the Session identity row's `/rename` sub-clause) that a fresh read would catch. Enforced by `block-cleanup-missing-rename.sh` (Sto
...[truncated 25 chars]

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
91% confidence
Finding

The anti-refusal language pressures the agent not to exercise independent safety judgment and frames deviation from the procedure as a violation. In a hostile or misconfigured environment, this can suppress protective hesitation and increase the chance that unsafe side effects are executed despite contextual red flags.

Content

Scanner excerpt · run.md (reported line 187)May include surrounding context.

md
**`--ralph`-in-interactive-session remap (HARD STOP)**: when `--ralph` is typed but `RALPH_LOOP=1` is not set, the session is attended — a human just asked cleanup not to interrupt them, not to restrict itself to record-only autonomous-loop behavior. Treat this exactly as **Auto Mode**, not Ralph Mode: suppress asks, but still directly commit/edit/call skills as a normal attended run would, and report to chat as normal. Do not apply Ralph's record-only restrictions here — those exist for the *no-human-present* case, which this is not. `--ralph` remains available for its literal, fully-restricted meaning whenever `.ralph/` + `RALPH_LOOP=1` both hold.

**If `.ralph/` exists but it's an interactive user session with neither flag given, use normal mode** — AskUserQuestion is used normally. Do not judge based on `.ralph/` existence alone.

**No retry safety net in Auto Mode (HARD STOP)**: unlike a true `RALPH_LOOP=1` loop, Auto Mode (including the `--ralph`-remapped case) has no next iteration — a step skipped now is skipped for good unless someone notices. Do not silently skip a step just because asking is suppressed; use the step's documented default instead. See the RAG-store carve-out below, which applies regardless of which mode triggered ask-suppression.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes very generic conversational phrases such as "wrap up," "cleanup," "improve," and "next action," plus an automatic Stop-event injection. This creates a real risk of unintended invocation at session end, which is especially concerning because the skill can chain into other skills and initiate persistence or helper-script activity without a fresh, explicit user request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly advertises automated helper script execution (fa-analyze.py, hybrid_sweep_rag.py, sync_dual_wiki.py) but the top-level skill file does not clearly warn the user about code execution, filesystem changes, or external persistence side effects. In combination with broad triggers and Stop-event injection, this can lead to users invoking behavior with materially different risk than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The configuration documentation advertises persistent "memory storage" and recording failed attempts to a feedback store, but it does not clearly warn users that operational or potentially sensitive workflow data may be retained. In an agent skill context, silent persistence increases the risk of storing prompts, mistakes, infrastructure details, or other sensitive project information without informed consent or retention boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill treats broad, natural-language wrap-up phrases like 'finish' or 'cleanup' as sufficient activation signals for persistence behavior. That can cause unintended execution of storage actions during ordinary conversation, especially because the action includes exporting findings and artifacts to persistent media.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The '3+ turns of housekeeping' trigger is subjective and context-dependent, so the skill may infer wrap-up state without the user's intent. In this file, that ambiguity is more dangerous because inferred activation leads directly to persistent storage and cleanup actions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

The skill explicitly requires cross-session persistence of session import payloads to a durable local queue. That creates a retention channel for potentially sensitive session content outside the active conversation and may bypass user expectations about ephemerality.

Content

Scanner excerpt · rag-store.md (reported line 104)May include surrounding context.

md
### Medium (4) — local durable pending-import queue (HARD STOP — server-down ≠ info lost)

**When all RAG-server media (1)-(3) fail (server unreachable / network down), the info is NOT preserved by "register BLOCKED + retry next session".** Next session may never run; the semantic index is then permanently lost. Medium (4) is the **terminal, always-available** fallback: write the import payload to a durable local queue file **this session**, so a future cleanup deterministically drains it when the server returns.

**Queue location** (central — drained by any future cleanup, workspace-independent):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The local durable queue fallback writes session payloads to disk for later import, but the file does not require notifying the user that potentially sensitive content will be stored on disk and retained across sessions. Hidden local persistence changes the data-retention model and increases risk if the host is shared, backed up, or later inspected.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · rag-store.md (reported line 118)May include surrounding context.

md
- Distilled facts (decisions, infra findings) with metadata `{type, project, date, topic}`
- One-line reason the server was unreachable (e.g., `Qdrant readyz http_code=000`)

**Drain step (next cleanup 3-C.1)**: before/after the session import, `ls ~/.claude/skills/cleanup/data/rag-pending/*.md`. For each queued file, if RAG server now reachable → import its payload → delete the queue file. If still unreachable → leave queued.

| # | Don't | Do |
|---|-------|-----|

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

Requiring the agent to write a pending-import queue file 'THIS session' when other media fail guarantees data retention even when the primary store is unavailable. In context, that means sensitive troubleshooting or infrastructure details are persisted automatically rather than failing closed.

Content

Scanner excerpt · rag-store.md (reported line 139)May include surrounding context.

md
1. Medium (1) MCP failed → did you try medium (2) vendor script?
2. Medium (2) script failed → identify cause (cache miss / dependency / network) → did you try medium (3) REST API direct call?
3. Medium (3) failed → check "RAG server readyz" (server up?). Only mark RAG-server media unusable when the server itself is down
4. **All server media (1)-(3) fail → write medium (4) local pending-import queue file THIS session** (`~/.claude/skills/cleanup/data/rag-pending/<session-uuid>.md`). Do NOT punt to "next session retry" — that abandons preservation. The queue file is the durable guarantee
5. Only after medium (4) queue is written: register a BLOCKED note in `fix_plan` as a supplementary reminder (the queue file, not the note, is the preservation)

## fix_plan.md Completed Item RAG Sync + Delete Obligation (HARD STOP)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · rag-store.md (reported line 175)May include surrounding context.

md
| 14 | Report "RAG obligation done" after 1 script sync then compress other-section `[x]` items | Script parses **Completed section only**. Other-section `[x]` handling + body-loss cases require separate manual RAG store. Report both "script: N + manual: M" counts |
| 15 | "If user concludes 'no further action needed', the body can be cleaned up too" reasoning | Conclusion and body preservation are separate. User conclusion = **state decision**; body = **troubleshooting steps / primary source / commit history** with future value. Conclusion = `[x]` processing; body = RAG store then compress |
| 16 | Treat oversized `[x]` items as safe to ignore because they're "not in `## Completed`" | The sync script's Completed-only scope is a tooling gap, not a signal that inline `[x]` bloat is fine. At wrap-up, also scan top-level `- [x]` items outside `## Completed` for size — condense the same way |
| 17 | Delete a synced `## Completed` body without checking whether any item is Plane-indexed | RAG sync (step 1) is a search-index write, not a canonical-record write. A Plane-indexed item still needs its Plane issue completed (or intake-registered if missing) before its local text — the only remaining trace of the work — is deleted (step 1.5) |

### Self-Check (every session start / end + every time before fix_plan Edit)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · run.md (reported line 270)May include surrounding context.

md
| 14 | Report "RAG obligation done" after 1 script sync then compress other-section `[x]` items | Script parses **Completed section only**. Other-section `[x]` handling + body-loss cases require separate manual RAG store. Report both "script: N + manual: M" counts |
| 15 | "If user concludes 'no further action needed', the body can be cleaned up too" reasoning | Conclusion and body preservation are separate. User conclusion = **state decision**; body = **troubleshooting steps / primary source / commit history** with future value. Conclusion = `[x]` processing; body = RAG store then compress |
| 16 | Treat oversized `[x]` items as safe to ignore because they're "not in `## Completed`" | The sync script's Completed-only scope is a tooling gap, not a signal that inline `[x]` bloat is fine. At wrap-up, also scan top-level `- [x]` items outside `## Completed` for size — condense the same way |
| 17 | Delete a synced `## Completed` body without checking whether any item is Plane-indexed | RAG sync (step 1) is a search-index write, not a canonical-record write. A Plane-indexed item still needs its Plane issue completed (or intake-registered if missing) before its local text — the only remaining trace of the work — is deleted (step 1.5) |

### Self-Check (every session start / end + every time before fix_plan Edit)

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The skill instructs proactive scanning for oversized completed items and then RAG-storing their full detail before condensing the local file. This expands the amount of session-derived content retained across sessions and can capture detailed troubleshooting history, references, and decision context without a clear user-facing retention boundary.

Content

Scanner excerpt · rag-store.md (reported line 187)May include surrounding context.

md
5. Does the body to be compressed contain sub-bullets (options / verification medium / primary source / user-decision commit SHA / hold work / related plan refs) that would be lost?
6. If yes, did you call `mcp__<vendor>__*-store` **before** the Edit? Include source location (fix_plan-L<num>) + type/project/date/category metadata?
7. Only after RAG store success, run Edit (script does not handle other sections — manual obligation)
8. **At wrap-up, scan for oversized inline `- [x]` items outside `## Completed`** (rough heuristic: > 10 lines of body under one top-level item) — the `block-fixplan-completed-bloat.sh` hook advisory is one signal, but also check proactively since the hook only fires on the Edit/Write that touches the file
9. For each oversized item found, RAG-store the full detail (with pointer to any artifact file already holding it), then condense to a 1-line summary + pointers — same procedure as trigger condition 4

## Exceptions

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file states that locale-specific regex patterns are loaded from a git-ignored file so the public repository never sees Korean characters, and otherwise falls back to English-only markers. This creates a language/locale-dependent behavior that is not presented as a user choice or clearly justified as a region-specific tool, which matches the policy's language/locale violation category.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill requires repeated inclusion of the full session UUID and session-derived naming metadata in reports, checklist items, and other persisted artifacts. Even if framed as operational bookkeeping, this increases exposure of stable session identifiers across multiple media, which can enable cross-system correlation, transcript lookup, or unintended disclosure of internal session history if those artifacts are shared or stored less securely.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to persist a narrative walkthrough of the session's attempts, findings, decisions, and summarized artifacts into a durable file. This creates a high-risk data retention channel for potentially sensitive operational context, prompts, paths, errors, and internal reasoning-adjacent material that may outlive the chat session and be accessible to later users, tools, or indexing systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill repeatedly instructs the agent to persist session-derived information into RAG, memory, skills, and wiki destinations, but it does not require an explicit user-consent or privacy warning before storing potentially sensitive conversation content. Because the procedure treats persistence as mandatory and broad in scope, private data, internal troubleshooting details, or user-provided secrets could be retained beyond the session without meaningful notice.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · run-knowledge-persist.md (reported line 122)May include surrounding context.

md
**On failure, all of the following are mandatory**:

1. **Recovery-attempt decision is a mandatory ask, not an autonomous judgment (HARD STOP)** — when the failure occurs and connection info for the underlying service is knowable (an endpoint documented in the receiver topic, a local process/port, a VPN state, etc. — i.e., there is *something* to check or restart), do NOT autonomously decide either "attempt recovery" or "skip straight to fallback." Call `AskUserQuestion` immediately: state the failure (tool/endpoint + error text), and offer options such as "Attempt recovery now (check/restart the underlying service, re-probe)" / "Skip recovery — fall back to local pending queue now" / "Investigate more (I'll look at the connection details first)". Only proceed with whichever path the user selects. This applies even mid-cleanup — do not defer the ask to the end-of-cleanup Phase 2 batch, since the RAG store step blocks subsequent steps' correctness (retry-task registration content depends on the outcome).
   - **Exception**: if no connection info is knowable at all (no documented endpoint, no local process to check, receiver skill provides no diagnostic path) — there is nothing to ask about; skip directly to the FAILED procedure below without asking (asking "recover?" with no actionable path is a hollow ask).
2. On confirmed recovery failure (whether reached via the user selecting "skip" or via an attempted-and-failed recovery), mark the Step 5 completion-report table's "3-C.1 RAG Store" row as **`❌ FAILED`** (not worded as "Skipped"/"held")
3. Use **"⚠️ cleanup FAILED (RAG store failed)"** instead of "✅ cleanup complete" in the report title/header
4. **Medium (4) local pending-import queue file — the actual preservation mechanism (HARD STOP, do this BEFORE step 5)**: write `~/.claude/skills/cleanup/data/rag-pending/<session-uuid>.md` per [rag-store.md](./rag-store.md) "Medium (4)" spec (session UUID + date, artifact paths, distilled facts with metadata, one-line unre
...[truncated 25 chars]

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The mandated write to ~/.claude/skills/cleanup/data/rag-pending creates cross-session persistence of session artifacts and distilled facts in a user-home location outside the workspace. In this context, that increases privacy and data-retention risk because the content may outlive the session, be overlooked by users, and include sensitive troubleshooting or environment details.

Content

Scanner excerpt · run-knowledge-persist.md (reported line 125)May include surrounding context.

md
- **Exception**: if no connection info is knowable at all (no documented endpoint, no local process to check, receiver skill provides no diagnostic path) — there is nothing to ask about; skip directly to the FAILED procedure below without asking (asking "recover?" with no actionable path is a hollow ask).
2. On confirmed recovery failure (whether reached via the user selecting "skip" or via an attempted-and-failed recovery), mark the Step 5 completion-report table's "3-C.1 RAG Store" row as **`❌ FAILED`** (not worded as "Skipped"/"held")
3. Use **"⚠️ cleanup FAILED (RAG store failed)"** instead of "✅ cleanup complete" in the report title/header
4. **Medium (4) local pending-import queue file — the actual preservation mechanism (HARD STOP, do this BEFORE step 5)**: write `~/.claude/skills/cleanup/data/rag-pending/<session-uuid>.md` per [rag-store.md](./rag-store.md) "Medium (4)" spec (session UUID + date, artifact paths, distilled facts with metadata, one-line unreachable-reason). A `TaskCreate`/fix_plan retry note alone is a reminder, not preservation — per rag-store.md's own self-check, the queue file is the durable guarantee that survives even if no future session reads the retry task.
5. **Retry task registration obligation**: register a "Retry RAG store (session <UUID> + N artifacts)" pending task via `TaskCreate` — do not end with carryover text alone. This is supplementary to step 4's queue file, not a substitute for it.
   - **Fallback when `TaskCreate` itself is disconnected (HARD STOP)**: do not silently drop the retry obligation. Register it in the workspace's `fix_plan.md` `## Hold` section instead, using the same `[BLOCKED] ... **trigger: <condition>**` format as other hold items (trigger = "Task tools reconnect" or equivalent). This mirrors step4-wrapup.md's medium-separation principle (BLOCKED external-wait items go to fix_plan.md hold, not a task) extended to the case where the task-tracking tool itself is the unavailable dependency. Step 4's queue fi
...[truncated 25 chars]

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates writing a durable pending-import file under ~/.claude after RAG failures, again without requiring explicit user approval or a privacy warning. That queue file is described as containing session UUIDs, artifact paths, distilled facts, and failure reasons, which can preserve sensitive operational context on the local machine even when the primary store is unavailable.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.