instar-identity

Restore persistent agent identity from .instar files after session restarts.

75|18|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/JKHeadley/instar --skill instar-identity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instar-identity
Source: https://github.com/JKHeadley/instar/tree/main/skills/instar-identity
Command: npx skills add https://github.com/JKHeadley/instar --skill instar-identity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of agents losing their identity, preferences, and learned context when sessions restart or the context window compacts. It provides a durable way to recover who the agent is and what it already knows.

Core Features & Use Cases

  • Persistent agent identity stored on disk in .instar files instead of fragile chat context.
  • Session-start and compaction-recovery workflows that re-inject identity and memory automatically.
  • Manual reorientation steps for cases where hooks did not fire or the session lost track of its role.
  • Use cases: recovering after a restart, resuming autonomous work, orienting a new Claude Code session, and preserving user preferences across long-running projects.

Quick Start

Use the instar-identity skill to verify Instar is installed, recover the project identity files, and reorient the session if the agent has lost track of who it is or what it is doing.

Frequently Asked Questions about instar-identity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Claude Code agent identity and memory intact across sessions?

Persistent agent identity is preserved by storing context in local .instar files and using session-start and compaction hooks to automatically rehydrate AGENT.md, USER.md, and MEMORY.md content into the session.

Why does my autonomous agent lose its learned context after context compaction?

Context compaction discards previous session context to free up the context window. Without persistent state files and compaction-recovery hooks, the agent cannot rehydrate its memory or reorient itself to its original role.

What's the best way to recover agent memory after a session restart?

Session recovery is handled by applying the instar-identity skill to verify the Instar installation, recover the project identity files, and manually reorient the session if the automatic startup hooks did not fire.

Do I need specific files to restore persistent state for autonomous agent workflows?

Yes, restoring persistent state requires readable AGENT.md, USER.md, and MEMORY.md files stored on disk within the project, which are read during session-start and compaction-recovery workflows to rehydrate context.

Can I manually reorient a Claude Code session if the automatic compaction hooks fail?

Yes, manual reorientation steps are supported for cases where the compaction-recovery hooks did not fire or the session lost track of its role, allowing you to manually recover the project identity and resume autonomous work.

When should I not rely on chat context for long-running agent projects?

Fragile chat context should not be used for long-running projects, as session restarts and compaction will clear it. Durable .instar identity files on disk are required to preserve user preferences and learned context.