🧠
AI EngineeringPython

Strategic Compact

by ThamJiaHe

Strategic Compact is an AI Engineering skill for Claude Code, published by ThamJiaHe in claude-code-handbook.

201 stars22 forkson ThamJiaHe/claude-code-handbookAdded 2026/09/05Repository updated 2026/04/19
aianthropic-claudeclaudeclaude-aiclaude-codeclaude-skillsllmmcpprompt-engineering
Install in seconds
Install Strategic Compact
Copy Strategic Compact into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/ThamJiaHe/claude-code-handbook/tree/main/skills/examples ~/.claude/skills/examples

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/ThamJiaHe/claude-code-handbook.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/examples/strategic-compact-skill.md in ThamJiaHe/claude-code-handbook
Installs to
~/.claude/skills/examples
Collection
One of 25 skills cataloged from this repository
Category
AI Engineering3101 skills

What Strategic Compact does

Strategic Compact helps you compact Claude Code sessions without losing important decisions, progress, or debugging state. Use it when context usage reaches about 60-80% to save state and preserve what matters.

Strategic Compact is cataloged under AI Engineering on DirSkills. Strategic Compact comes from a repository tagged ai, anthropic-claude, claude, claude-ai and claude-code.

Documentation

README

Strategic Compact

Smart context compaction that preserves what matters and discards what doesn't.

Overview

Running /compact blindly can lose critical context — architecture decisions, debugging hypotheses, partial progress. This skill teaches when and how to compact strategically.

When to Compact

Context Usage Action
< 50% Continue working. No action needed.
50-60% Finish current task, then compact.
60-70% Run /compact now — recovers ~70% of usable context.
70-80% Save state first, then /compact.
> 80% Save session immediately. Consider starting fresh.

Pre-Compact Checklist

Before running /compact, ensure these survive:

This is the opening of the README. Read the full README on GitHub.

Commands Strategic Compact provides

Slash commands named in this skill’s SKILL.md, listed in the order they first appear.

  • /compact
  • /save-session
  • /resume-session

Frequently asked about Strategic Compact

  • What else does ThamJiaHe publish alongside Strategic Compact?

    Strategic Compact is one of 25 skills that DirSkills catalogs from ThamJiaHe/claude-code-handbook, the repository it ships in. Its siblings there include API Development, API Security Hardening and AWS Cloud Infrastructure. Each one is a separate skill with its own page in this directory, installs the same way Strategic Compact does, and is maintained by ThamJiaHe in that same repository. The rest of the collection is listed on the ThamJiaHe/claude-code-handbook page.

  • How does Strategic Compact compare to other AI Engineering skills?

    Strategic Compact ranks #2851 by stars among the 3101 AI Engineering skills in this catalog. The most-starred ones next to it are Architecture Decision Records, AI-First Engineering and Agentic OS. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Strategic Compact against them. Open each page to compare what they document and how they install.

More from ThamJiaHe/claude-code-handbook

Strategic Compact is one of 25 skills cataloged on DirSkills from ThamJiaHe/claude-code-handbook.

See all 25 skills
🔌
48m ago

API Development

API Development enforces REST API practices like proper status codes, RFC 7807 error responses, input validation, and centralized error handling. Use it when building routes, handling failures, or shaping consistent JSON responses.
Automation
20122
🛡️
48m ago

API Security Hardening

API Security Hardening helps secure REST and GraphQL APIs against common attack vectors. Use it when adding authentication, validating input, rate limiting, handling uploads, or exposing endpoints to outside consumers.
AI Engineering
20122
☁️
48m ago

AWS Cloud Infrastructure

AWS Cloud Infrastructure deploys Node.js apps on AWS with EC2, RDS, IAM, security groups, and monitoring. Use it when setting up cloud infrastructure, databases, secrets, or cost-conscious production hosting.
DevOps
20122
🛠️
48m ago

Build Error Resolver

Build Error Resolver fixes build failures, TypeScript errors, and lint issues with minimal diffs. Use it when CI breaks or a build needs to be made green quickly.
Quality
20122
🛡️
48m ago

Cybersecurity Threat Modeling

Cybersecurity Threat Modeling applies STRIDE to application architecture to identify spoofing, tampering, disclosure, DoS, and privilege risks. Use it when designing systems, reviewing architecture, or assessing security posture.
Quality
20122
🐳
48m ago

Docker Containerization

Docker Containerization provides patterns for multi-stage Dockerfiles, compose setups, and container security hardening. Use it when building, optimizing, or deploying containerized apps.
DevOps
20122