# Smart Compact

> |

- **Type:** Skill
- **Install:** `agentstack add skill-s-choung-research-skills-smart-compact`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [s-choung](https://agentstack.voostack.com/s/s-choung)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [s-choung](https://github.com/s-choung)
- **Source:** https://github.com/s-choung/Research-Skills/tree/master/skills/smart-compact

## Install

```sh
agentstack add skill-s-choung-research-skills-smart-compact
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Smart Compact

Save session state to file. User then runs `/clear` to reset.
The session-state.md is auto-read on next session start (via CLAUDE.md instruction).

## Instructions

When the user runs `/smart-compact`:

1. Write `.claude/session-state.md` in the **current working directory**
2. Tell the user it's done so they can `/clear`

**Speed principle**: This should take ~10 seconds, not minutes. Write dense, not verbose.

### Template

```markdown
# Session State
> /smart-compact at [date/time]

## Tone
[One line. e.g. "Korean casual + English tech terms, concise"]

## What We Did
[Numbered list of what happened this session, chronologically. Keep each item to 1-2 lines.
Include: what was requested → what was done → outcome]

## Key Decisions
[Bullet list of decisions + WHY. Quote user's exact words for preferences.]

## Files
| File | What Changed |
|------|-------------|
| path | one-line summary with key function/variable names |

## Current Status
- [x] Done tasks
- [ ] In-progress (note current state)
- [ ] TODO

## Bugs & Fixes
[Only if any. "Problem → cause → fix" format, one line each.]

## Code Notes
[Only for tricky/non-obvious code that would be hard to reconstruct.
Paste ONLY the critical snippets, not whole files. Skip if nothing tricky.]

## Tech Context
[Key paths, model names, config values, env details. Dense bullet list.]

## Next Steps
[Priority-ordered. What to do immediately after recovery.]
```

### Writing Guidelines
- **Dense, not verbose** — bullet points, not paragraphs
- Skip sections that are empty (except Tone, What We Did, Files, Current Status, Next Steps — always include these 5)
- Include specific names: variables, functions, paths, config values
- Quote user feedback verbatim when it matters
- For bugs: what didn't work is as important as what did
- Write for a new Claude that knows NOTHING about this conversation

## Post-Clear Recovery

Project CLAUDE.md auto-reads `.claude/session-state.md` on session start. No manual action needed.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [s-choung](https://github.com/s-choung)
- **Source:** [s-choung/Research-Skills](https://github.com/s-choung/Research-Skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-s-choung-research-skills-smart-compact
- Seller: https://agentstack.voostack.com/s/s-choung
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
