strategic-compaction SKILL.md skillA

strategic-compaction from jnpiyush/agentx is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add jnpiyush/agentx/strategic-compaction@v1.0.0

Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
jnpiyush/agentx
Path
.github/skills/development/strategic-compaction/SKILL.md
Versions recorded
4
Latest version
v1.0.0, committed Sep 25, 2026
First version recorded
May 18, 2026
Size
7,596 bytes
Repository stars
19
License
Apache-2.0

Decide when to compact, reset, or continue a long-running agent session. Use when context pressure rises, when a checkpoint boundary is reached, or when a clean handoff to a different agent is needed. Encodes the rule that compaction is safe between phases but dangerous mid-implementation, and that reset beats compaction once durable artifacts diverge from the chat transcript.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Strategic Compaction

> **Purpose**: Choose between continue, compact, and reset without losing work or fabricating context.
> **Scope**: Long-running sessions, checkpoint transitions, agent handoffs, token-pressure events.

---

## When to Use This Skill

- Token budget is approaching the provider's compaction trigger.
- A workflow checkpoint just changed (Plan -> Work, Work -> Review, Review -> Compound Capture).
- The user explicitly says "compact", "reset", "start over", or "switch agent".
- The chat transcript and the repo state have begun to disagree.

## When NOT to Use

- Mid-implementation, halfway through editing a file. Finish the bounded slice first.
- During an active validation run (tests executing, command in flight).
- Inside a self-review iteration where the next step is already queued.

## Decision Order

Try these in order. Pick the first one whose preconditions hold.

1. **Continue in place** when the active issue, plan, slice, and blocker state are still coherent and the budget will hold for at least one more bounded step.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add jnpiyush/agentx/strategic-compaction@sha256:05ae8ffe92522d43

The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_a3hnm22zzrnt66sk.svg)](https://markdownregistry.com/a/art_a3hnm22zzrnt66sk)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between May 18, 2026 and Sep 25, 2026, about one every 44 days.

versioncommittedcommitsizeaudit
v1.0.0 latest2026-09-25 244da72 7,596 BA view · diff
v1.0.02026-09-15 f17c505 7,594 BA view · diff
v1.0.02026-05-30 55f7137 7,588 BA view · diff
v1.0.02026-05-18 6c28d61 7,582 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (7596 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

jnpiyush/agentx · 19 stars · license Apache-2.0 · pushed 2026-11-04 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_a3hnm22zzrnt66sk
GET https://markdownregistry.com/api/v1/resolve?ref=jnpiyush/agentx/strategic-compaction
GET https://markdownregistry.com/api/v1/blob/05ae8ffe92522d438f4d306d9239499ed16c3b304f3ede6e79cee75ab82e7bf0

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from jnpiyush/agentx

000-frontier-core Cursor rule
jnpiyush/agentx · .cursor/rules/000-frontier-core.mdc · Frontier canonical contracts and workspace context for Cursor.
git:20261012.38fb931 · audit A · 19 stars
ai Cursor rule
jnpiyush/agentx · .cursor/rules/ai.mdc · AI / agent / LLM workflow standards (Frontier)
git:20261010.87e53aa · audit A · 19 stars
csharp Cursor rule
jnpiyush/agentx · .cursor/rules/csharp.mdc · C# / .NET coding standards (Frontier)
git:20261010.87e53aa · audit A · 19 stars
python Cursor rule
jnpiyush/agentx · .cursor/rules/python.mdc · Python coding standards (Frontier)
git:20261010.87e53aa · audit A · 19 stars
react Cursor rule
jnpiyush/agentx · .cursor/rules/react.mdc · React / TSX frontend standards (Frontier)
git:20261010.87e53aa · audit A · 19 stars
typescript Cursor rule
jnpiyush/agentx · .cursor/rules/typescript.mdc · TypeScript / Node backend standards (Frontier)
git:20261010.87e53aa · audit A · 19 stars
agent-memory-systems SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/agent-memory-systems/SKILL.md · Design agent memory beyond a single context window: short-term (working / scratchpad), long-term (episodic, semantic…
v1.0.0 · audit A · 19 stars
agent-observability SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/agent-observability/SKILL.md · Instrument LLM agents with tracing, metrics, and evaluation telemetry. Use when adding OpenTelemetry GenAI semantic…
v1.0.0 · audit A · 19 stars
ai-agent-development SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/ai-agent-development/SKILL.md · Build production-ready AI agents with Microsoft Foundry and Agent Framework. Use when creating AI agents, selecting LLM…
git:20261010.87e53aa · audit A · 19 stars
ai-evaluation SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/ai-evaluation/SKILL.md · Use when evaluating AI quality, safety, completeness and cost with held-out tasks, executable graders, calibrated…
v1.1.0 · audit A · 19 stars
ai-safety-and-red-teaming SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/ai-safety-and-red-teaming/SKILL.md · Defend LLM systems against prompt injection, jailbreaks, data exfiltration, and unsafe output. Covers input/output…
v1.0.0 · audit B · 19 stars
anthropic-claude SKILL.md skill
jnpiyush/agentx · .github/skills/ai-systems/anthropic-claude/SKILL.md · Implement production applications with Anthropic Claude models -- Messages API, tool use, prompt caching, adaptive…
v1.0.0 · audit A · 19 stars

Every file in jnpiyush/agentx

Browse by kind, by grade A, or by owner.