Compact a project's OpenSpec main specs: find requirements specified twice, scenarios pasted under several requirements and leftovers from archive, then write the cleanup as one reviewable OpenSpec change.
On first use, approve the sign-in request in your browser. SkillGild connects Claude Code automatically. Restart or reload your agent, then ask it to use this skill.
Developer detailsAPI examples, server tools and input schemas
How it runs
Your agent starts a session. SkillGild checks your access and allowance, counts one run, and sends the skill's instructions for this task.
Your agent does the work with its own model and tools, in your project. SkillGild makes no AI model call.
Private steps run on SkillGild. Your agent calls the server tools below and gets their results. The tool code never leaves SkillGild, and tool input is not stored.
Use it from code
Start a session, call its tools, then end it. Create an API key under Account and pass it as a bearer token.
Terminal
# Prints the session ID, its tools and the instructions for your agent
skillgild session openspec-compact
skillgild call <session-id> compact_specs --input '{"specs":[{"path":"specs/auth/spec.md","content":"# auth Specification\n\n## Purpose\nSign-in and account recovery.\n\n## Requirements\n\n### Requirement: Password reset\nThe system SHALL email a single-use reset link that expires after one hour.\n\n#### Scenario: Known address\n- **WHEN** a user requests a reset for a registered email address\n- **THEN** a reset link valid for one hour is emailed\n"},{"path":"specs/account-recovery/spec.md","content":"# account-recovery Specification\n\n## Purpose\nTBD - created by archiving change add-recovery. Update Purpose after archive.\n\n## Requirements\n\n### Requirement: Reset password by email\nThe system SHALL email a single-use reset link that expires after one hour.\n\n#### Scenario: Registered email\n- **WHEN** a user requests a reset for a registered email address\n- **THEN** a reset link valid for one hour is emailed\n"}]}'
skillgild end <session-id>
Server tools
Each call uses one of the session's tool calls.
compact_specsFind OpenSpec specs to compact
Reads a project's main specs (openspec/specs/**/spec.md) and lists compaction candidates: near-duplicate requirements across or within capabilities, scenarios repeated under several requirements, repeated requirement names, placeholder Purposes left by archive, one-requirement capabilities and oversized ones, and requirements missing SHALL/MUST or scenarios. Similarity is lexical, not semantic, so read each candidate before merging. It changes nothing: write the cleanup as an OpenSpec change (MODIFIED for the requirement you keep with every scenario you keep, REMOVED for the ones folded into it).
FieldTypeNotes
specsRequiredarrayNo extra rules.
max_findingsintegerMinimum 1. Maximum 500
similaritynumberMinimum 0.3. Maximum 0.95
validate_changeValidate an OpenSpec change
Checks a proposed OpenSpec change the way `openspec validate` does: change name, the proposal's Why and What Changes sections, delta spec sections (ADDED/MODIFIED/REMOVED/RENAMED Requirements), SHALL/MUST requirement text, scenarios and task checkboxes. Checks structure only; it does not read the project or judge whether the plan is right.
FieldTypeNotes
change_nameRequiredstringUp to 120 characters
specsRequiredarrayNo extra rules.
proposalstringUp to 60000 characters
skip_specsbooleanNo extra rules.
tasksstringUp to 60000 characters
Questions
Does OpenSpec Compact change my specs?
Not directly. It writes a normal OpenSpec change under openspec/changes/ with MODIFIED, REMOVED, ADDED and RENAMED deltas. Your specs change only when you review the change and run openspec archive.
How does it decide two requirements are duplicates?
It compares word pairs after removing the words every requirement shares, such as SHALL, WHEN and THEN. That catches copied and lightly edited requirements, but not two requirements that say the same thing in different words. Your agent reads every candidate and drops false positives before writing the change.
What leaves my machine?
Only the contents of openspec/specs/**/spec.md go to SkillGild's server tool, which runs code and makes no AI model call. Your source code is not sent.
How is this different from the OpenSpec CLI?
The CLI validates and archives one change at a time. It has no command that reads all main specs together to find duplicated requirements or leftover structure. OpenSpec Compact does that, then hands the result back as an ordinary OpenSpec change.
Related guides
Setup steps and worked examples for this kind of skill.