Skip to content

About

Claude Code plugin that auto-archives completed OpenSpec changes before every git commit.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openspec-auto-archive

A Claude Code plugin. Before every git commit it archives completed OpenSpec changes (all tasks - [x], none - [ ]) and stages the result so the archive goes into the same commit. If openspec archive fails, the commit is blocked and Claude is instructed to invoke opsx:archive and retry the commit.

What's inside

openspec-auto-archive/
├── .claude-plugin/
│   ├── plugin.json          # manifest (this is the only file that lives here)
│   └── marketplace.json     # the repo doubles as its own marketplace
├── hooks/
│   ├── hooks.json           # PreToolUse(Bash) → openspec-archive.sh
│   └── scripts/
│       ├── openspec-archive.sh          # the hook itself
│       └── archive-complete-changes.sh  # core: archives + stages the archived paths
└── README.md

The hook is invoked via ${CLAUDE_PLUGIN_ROOT}, so it works from the plugin cache on any machine — no absolute paths.

Installation

The repo is both a plugin and a marketplace:

/plugin marketplace add vyhuholl/openspec-auto-archive
/plugin install openspec-auto-archive@openspec-tools

Local check without publishing:

/plugin marketplace add ./openspec-auto-archive
/plugin install openspec-auto-archive@openspec-tools
# after edits:
/reload-plugins

Dependencies (in PATH)

bash, git, jq, openspec. If openspec is not found, the hook silently skips the commit (does not block).

Notes

  • pre-commit. The core script was also designed to work as a pre-commit hook. The plugin only ships the Claude Code path — it cannot (and should not) install a git hook into someone else's repo. For pre-commit, add a call to archive-complete-changes.sh in your repo separately.

About

Claude Code plugin that auto-archives completed OpenSpec changes before every git commit.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages