stateCreate

Create timestamped session state files in a .state directory.

1|Updated Aug 6, 2022
One-click install
npx skills add https://github.com/wormholecowboy/.dotfiles --skill statecreate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stateCreate
Source: https://github.com/wormholecowboy/.dotfiles/tree/main/claude-config/skills/state-manager/stateCreate
Command: npx skills add https://github.com/wormholecowboy/.dotfiles --skill statecreate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill creates a dedicated .state/ directory and timestamped state files to persist session context across context resets. It simplifies starting new working sessions without losing continuity, by storing essential metadata and a ready-to-use template.

Core Features & Use Cases

  • Create .state/ directory if missing
  • Add .state/ to .gitignore if not present
  • Generate filename using Unix timestamp: $(date +%s).state.md
  • Create state file with a consistent template
  • Confirm creation to user
  • Use Case: Begin a new session and preserve context across resets for long-running conversations or projects

Quick Start

Use the stateCreate skill to generate a new session state file in the repository root, named with the current Unix timestamp, e.g. .state/1700000000.state.md.

Frequently Asked Questions about stateCreate

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

FAQPage Schema
How do I persist session state across context resets in a repository?

Session state persistence saves working context by writing metadata like session_id and timestamps into a structured Markdown file within a .state directory, allowing new sessions to recover previous context after resets.

How do I automatically add a state directory to gitignore?

Automating gitignore updates ensures the .state directory used for session persistence is excluded from version control. The skill checks for and appends the .state path to .gitignore during the state file creation process.

What is the best way to generate timestamped session files for long-running projects?

Generating timestamped session files involves using the current Unix timestamp to name the Markdown file, such as 1700000000.state.md. This ensures unique state tracking for each new working session in long-running projects.

Does this session persistence approach work without external dependencies?

Yes, this session persistence approach works without external dependencies. It relies solely on creating a local .state directory and generating a Markdown template file to store session metadata within your existing repository.

Why use a Unix timestamp for naming repository state files?

Using a Unix timestamp for naming repository state files prevents naming collisions and maintains chronological order. It clearly identifies when each session state was created for easier tracking and recovery.