agentsclimarketplace

Media block compaction prep

Skill vishuwa2004/cskill-agents/skills/media-block-compaction-prep

Build curated agent skills for coding CLIs, terminal tools, context engines, remote bridges, and multi-agent runtimes

Install
npx -y skills add vishuwa2004/cskill-agents --skill media-block-compaction-prep

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Sanitize user messages by replacing images, documents, and other heavy media blocks with lightweight placeholders before compaction.

SKILL.md

1.6 KB, as published. Nobody here has run it

SKILL: Media-Block Compaction Prep

Domain: context-management Trigger: Use when compaction must summarize a session that contains embedded media or document-heavy user messages. Source Pattern: Distilled from reviewed compaction-time media stripping strategies.

Core Method

Walk user messages before compaction and replace heavy media blocks with lightweight placeholders that preserve the fact that the media existed. Keep non-media text and message order intact so the summarizer still sees the conversational structure without paying the full token cost of embedded media. Track whether media was stripped so the summary can note that omitted content existed if needed.

Key Rules

  • Replace heavy media with explicit placeholders instead of silently dropping it.
  • Preserve message order and all non-media text so downstream heuristics still see the same conversation structure.
  • Apply the sanitization before the compaction request so the token savings affect the summary call itself.

Example Application

If a user uploads screenshots and a PDF before a long debugging exchange, replace those media blocks with markers such as [image] or [document] before sending the transcript to the compactor.

Anti-Patterns (What NOT to do)

  • Do not delete media with no placeholder.
  • Do not rewrite assistant message structure during this prep step.
  • Do not leave nested media blocks inside heavy tool results unsanitized.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.