T01 · Skill Instruction Hijacking
- Location
lib/index.js:928- Finding
Cross-role semantic compaction elevates user-controlled content to system authority
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent context-pruning tool, but it stores conversation content and can reinsert user-derived material as system-level context, which needs careful review before installation.
Install only if you are comfortable with local retention of conversation content and review the code first. Disable archive storage and chat/content logging unless explicitly needed, avoid storing secrets in conversations processed by this skill, and do not allow retrieved or compacted user content to be passed to an LLM as system instructions without modification.
lib/index.js:928Cross-role semantic compaction elevates user-controlled content to system authority
lib/index.js:1512Persistent archived user content is automatically restored as system instructions
lib/index.js:137Conversation content is archived and logged in plaintext by default
The uninstall instructions include a forceful recursive deletion of an absolute path under the user's skills directory. Although intended for legitimate uninstall, rm -rf is inherently dangerous because path mistakes, variable substitution, or copy/paste errors can cause irreversible deletion beyond the intended target.
Remove the skill folder and archive data:
rm -rf /Users/atharvadeshmukh/clawd/skills/context-pruner
rm -rf ./context-archive # or your custom archive path
The uninstall instructions include a forceful recursive deletion of an absolute path under the user's skills directory. Although intended for legitimate uninstall, rm -rf is inherently dangerous because path mistakes, variable substitution, or copy/paste errors can cause irreversible deletion beyond the intended target.
Remove the skill folder and archive data:
rm -rf /Users/atharvadeshmukh/clawd/skills/context-pruner
rm -rf ./context-archive # or your custom archive path
The guide instructs users to recursively force-delete ./context-archive, which may contain archived conversation history or other retained data. In the context of this skill, that makes the command more sensitive because it can silently and permanently erase stored memory data without any warning or confirmation.
rm -rf /Users/atharvadeshmukh/clawd/skills/context-pruner
rm -rf ./context-archive # or your custom archive path
The documented archive behavior stores conversation data on the local filesystem ('./context-archive') and presents it as automatic functionality without clearly declaring permissions, storage handling, or safeguards. In a context-management skill, silent persistence of prior conversations increases privacy risk because users may assume ephemeral handling while sensitive prompts are retained and later retrieved.
The documented archive behavior stores conversation data on the local filesystem ('./context-archive') and presents it as automatic functionality without clearly declaring permissions, storage handling, or safeguards. In a context-management skill, silent persistence of prior conversations increases privacy risk because users may assume ephemeral handling while sensitive prompts are retained and later retrieved.
The documented archive behavior stores conversation data on the local filesystem ('./context-archive') and presents it as automatic functionality without clearly declaring permissions, storage handling, or safeguards. In a context-management skill, silent persistence of prior conversations increases privacy risk because users may assume ephemeral handling while sensitive prompts are retained and later retrieved.
Referenced artifact was not completely inspected
import { createContextPruner } from './lib/index.js';
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
return this.pruner.getStatus();
}
// Clear conversation
clear() {
this.conversation = [];
this.pruner.resetStats();
Smart archive retrieval semantically resurfaces old archived text into future prompts as system messages, which can disclose prior user content across later interactions and elevate that content's influence. Reinjecting archived material as system-role text is especially risky because it may override current conversation boundaries, amplify stale or sensitive data, and expose past context to downstream LLM calls.
The uninstall section documents recursive deletion commands that permanently remove directories, including user data in the context archive, but does not explicitly warn about data loss or advise users to verify paths before execution. In an installation guide for a context-management skill that stores archived conversation data, this omission increases the chance of accidental destructive use.
The README advertises automatic pruning and a CLI command that writes output files without warning that content may be modified, summarized, or overwritten. In a context-management skill, silent alteration of prompts, chat history, or destination files can cause data loss, integrity issues, or unsafe downstream model behavior if users assume the operation is non-destructive.
The skill advertises archive storage and retrieval of prior conversation context without warning users that conversation data may be retained. In a context-management skill, this is dangerous because users may disclose secrets, personal data, or proprietary prompts under the assumption that context trimming reduces exposure, while the archive actually preserves and re-surfaces that data.
The manifest promises advanced optimization features including merging, summarizing, extracting, query-aware scoring, hierarchical memory, and chat event logging. This file instead documents a narrower pruning tool with temporal/priority/length strategies and optional semantic removal, indicating the documented behavior is materially different from the declared skill purpose.
The summary states 'No external dependencies required' and later advertises semantic functionality that 'requires dependencies', which is a direct contradiction within the skill's documentation. It also claims 'stores only current conversation' while the manifest context describes a context archive/hierarchical memory system, creating inconsistent statements about actual retention behavior.
The logger includes a user-derived query fragment in chat-visible logs via query.substring(0, 30), which can disclose sensitive prompt content, secrets, or personal data to downstream chat participants, logs, or monitoring systems without explicit consent. In this skill's context-optimization role, the archived queries are likely to contain prior conversation material, making inadvertent exposure more likely rather than hypothetical.
Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
await contextManager.addMessage(
i % 2 === 0 ? 'user' : 'assistant',
`Message ${i}: This is part of a long conversation about programming concepts and best practices. ` +
`We're discussing various topics to simulate a real conversation that might exceed context limits.`,
i % 10 === 0 ? 8 : 5 // Every 10th message is high priority
);
The example enables archive storage to a local path and presents it as a simple integration flow, which can cause user and assistant message content to be persisted to disk without any explicit consent, warning, or retention controls at the integration boundary. In a context-management skill, archived conversation data may contain secrets, personal data, or proprietary prompts, so silent persistence increases privacy and data-handling risk.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
* - Hierarchical memory system with context archive
*
* LLM calls are routed through SkillBoss API Hub:
* POST https://api.heybossai.com/v1/pilot
* Authorization: Bearer $SKILLBOSS_API_KEY
*/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
* - Hierarchical memory system with context archive
*
* LLM calls are routed through SkillBoss API Hub:
* POST https://api.heybossai.com/v1/pilot
* Authorization: Bearer $SKILLBOSS_API_KEY
*/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
* - Hierarchical memory system with context archive
*
* LLM calls are routed through SkillBoss API Hub:
* POST https://api.heybossai.com/v1/pilot
* Authorization: Bearer $SKILLBOSS_API_KEY
*/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
* - Hierarchical memory system with context archive
*
* LLM calls are routed through SkillBoss API Hub:
* POST https://api.heybossai.com/v1/pilot
* Authorization: Bearer $SKILLBOSS_API_KEY
*/
The skill persistently writes pruned context to local JSON files under an archive directory, creating storage of conversation data beyond transient optimization. In a context-management skill, this materially changes the data-handling model and increases exposure to local compromise, unintended reuse, and retention of sensitive content.
The archive store path logs the beginning of raw archived content and associated metadata directly to the console. Because this component handles pruned conversation context, those logs can expose sensitive user prompts, secrets, or prior discussion content to operators, log aggregators, or other local users without any minimization need.
The implementation both persists archived message content and prints content previews without a clear user-facing warning or consent mechanism. This is dangerous because users may reasonably expect context optimization to be ephemeral, while the code creates additional disclosure surfaces through disk and logs.
Logging archived context in plain language creates a direct data-disclosure path for previously pruned user content. Since the component is explicitly designed to handle conversation history, these logs can leak confidential prompts, credentials, or personal data into console output and downstream observability systems.
No suspicious patterns detected.