agentsclimarketplace

Compact context

Skill JoaoAlavarse/cursor-config/skills/compact-context

Configuração global do Cursor: user rules, agent skills, slash commands e hooks com scripts de instalação.

Install
npx -y skills add JoaoAlavarse/cursor-config --skill compact-context

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

2 things to look at

  • 15 days oldThe repository was created 15 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 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

Compacts conversation and task context into a dense summary to reduce token usage. Use when context is large, before starting a new chat, when token usage is a concern, or when the user asks to compress or summarize context.

SKILL.md

4.6 KB, as published. Nobody here has run it

Objective

Compress the current conversation and task state into the smallest useful summary that preserves everything needed to continue the work without loss of critical information.

Optimize for token efficiency. Every retained item must justify its cost.

When to Use

Use this skill when:

  • the conversation is long and responses are degrading;
  • you need to carry context into a new chat;
  • verbose tool outputs or repeated explanations dominate the session;
  • the user explicitly asks to compact, compress, or summarize context.

Cursor also provides /compress for automatic summarization. This skill produces a structured, engineering-focused summary optimized for handoff and continuation.

Context

Before compacting:

  1. If project rules are available, read and follow them.
  2. If .cursor/work/current-task.md exists, treat it as the primary source of task state.
  3. Do not invent facts. Only preserve information supported by the conversation or workspace.
  4. Prefer references over reproduction (file paths, function names, decision IDs) instead of pasting large code blocks.

Compaction Process

  1. Identify the current objective and scope.
  2. Extract decisions already made and constraints in effect.
  3. List files created, modified, or identified as relevant — with path only, no full contents.
  4. Capture current progress: completed, in progress, remaining.
  5. Record open questions, blockers, and unresolved errors (with error message, not full stack traces unless essential).
  6. Note assumptions that must survive a context reset.
  7. Discard redundant explanations, repeated tool output, exploratory dead ends, and superseded plans.
  8. Produce the compact summary using the output format below.
  9. If a workspace file exists or the task is multi-step, update or create .cursor/work/context-compact.md.

What to Keep

CategoryKeepExample
GoalOne sentence"Implement JWT auth for /api/users"
DecisionsFinal choice + rationale (1 line each)"Use httpOnly cookies — XSS mitigation"
FilesPaths and rolesrc/auth/middleware.ts — token validation
ProgressChecklist state"[x] login route [ ] refresh token"
BlockersActive only"Missing JWT_SECRET in .env"
ErrorsMessage + location"TypeError in UserService:42"
Next stepSingle immediate action"Add refresh token endpoint"

What to Discard

  • Full file contents already in the repo (reference paths instead).
  • Complete tool output logs (summarize outcome: success/failure + key finding).
  • Explored but rejected approaches (keep only if rejection reason affects future work).
  • Repeated user/agent exchanges saying the same thing.
  • Generic explanations the agent already knows.
  • Stale plans superseded by later decisions.

Compaction Guidelines

Target 300–800 tokens for the summary. Shorter is better if nothing critical is lost.

Use telegraphic style: noun phrases, arrows, abbreviations where clear.

Never drop: active blockers, unresolved errors, user-stated constraints, security-sensitive decisions.

If information is uncertain, mark it [uncertain] rather than omitting or guessing.

When compaction would lose critical detail, state what was dropped and why the user should preserve it separately.

Do not continue implementing after compacting unless explicitly requested.

Output

Compact Summary

Provide the summary using this template:

## Goal
[one sentence]

## Decisions
- [decision]: [rationale]

## Files
- [path] — [role/status]

## Progress
- [x] done
- [ ] remaining

## Blockers
- [blocker or "none"]

## Next Step
[single immediate action]

## Handoff Note
[paste this block into a new chat to continue]

Token Estimate

State approximate token count of the summary and what was removed.

Recommendation

Conclude with one of:

  • Continue in this chat — summary is sufficient to free context
  • Start a new chat — paste the Handoff Note block
  • Context too fragmented — manual review needed before continuing

Workspace File

When the task spans multiple interactions, write the compact summary to:

.cursor/work/context-compact.md

If .cursor/work/current-task.md already exists, update it with the compacted state instead of creating a duplicate file.

Delete context-compact.md when the task is complete.

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.