spectra-commit
Skill2 starsChanged 7 months agoMITView on GitHub
Commit files related to a specific Spectra change
5 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- Will-SW74/passdown-osedited, first seen Oct 11, 2026
- DanSnow/hoarder-pipetteedited, first seen Oct 8, 2026
- leoho0722/naver-blog-image-downloaderword for word, first seen Aug 31, 2026
- PsychQuant/claude-hot-limitword for word, first seen Jul 1, 2026
- harrychuang/cursor-skillsword for word, first seen Jun 17, 2026
Used with
Projects with it also use spectra-analyze, spectra-drift and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
harrychuangSkillspectra-analyze
Analyze artifact consistency for a change
Also in 5 projects that use this
harrychuangSkillspectra-drift
Detect drift between a Spectra change and the current codebase state
Also in 5 projects that use this
- +1 more from harrychuang
Other versions5 projects use a version of this.
Word for word · 3
- harrychuang/cursor-skills★ 19100% same
- leoho0722/naver-blog-image-downloader★ 2100% same
- PsychQuant/claude-hot-limit★ 0100% same
Edited · 2
- DanSnow/hoarder-pipette★ 9814% same
- Will-SW74/passdown-os★ 0100% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- spectra-applySkill
- spectra-archiveSkill
- spectra-askSkill
- spectra-auditSkill
- spectra-debugSkill
- spectra-discussSkill
- spectra-ingestSkill
- spectra-proposeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
31 rules. About 0 are common, 23 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Commit files related to a specific Spectra change.
- Distinctive: line 24
If a name is provided, use it.
- Very specific: line 27
If ambiguous, run spectra list --json to get available changes.
- Distinctive: line 29
Always announce: "Committing for change: <name>"
- Very specific: line 33
Check for .spectra/touched/<change-name>.json.
- Distinctive: line 50
If the file does not exist, proceed without source file data — only artifact files will be included.
- Very specific: line 54
Run git status --porcelain and filter the output to files under openspec/changes/<name>/.
- Distinctive: line 84
If no tracking file was found, show a warning instead of the Source Files section:
- Distinctive: line 92
If there are no artifact files AND no tracked source files, inform the user that there is nothing to commit and STOP.
- Distinctive: line 96
Use the AskUserQuestion tool to ask the user how to proceed.
- Distinctive: line 100
Include all dirty files: Add all unrelated files to the commit as well
- Distinctive: line 102
Archive first, then commit together: Run archive before committing — archive file moves will be included in this commit
- Distinctive: line 104
If the user selects "Customize":
- Distinctive: line 106
Ask which files to add or remove
- Distinctive: line 109
If the user selects "Archive first, then commit together":
- Very specific: line 118
Read the tasks file at openspec/changes/<name>/tasks.md.
- Distinctive: line 120
If all tasks are complete: skip to 6a-ii.
- Distinctive: line 121
If incomplete tasks exist:
- Distinctive: line 123
Use the AskUserQuestion tool to ask: "These tasks are still incomplete.
- Distinctive: line 127
If AskUserQuestion tool is not available, ask the same question as plain text and wait for the user's response.
- Very specific: line 131
Check whether delta specs exist at openspec/changes/<name>/specs/.
- Distinctive: line 133
If no delta specs exist (directory is empty or absent): skip to 6a-iii.
- Distinctive: line 134
If delta specs exist:
- Distinctive: line 135
Use the AskUserQuestion tool to ask: "Delta specs found.
- Very specific: line 136
Yes: run spectra sync <name> before proceeding
- Distinctive: line 150
After archive completes successfully:
- Distinctive: line 153
Add these archive-related file changes to the commit set
- Very specific: line 181
Read the proposal file at openspec/changes/<name>/proposal.md.
- Very specific: line 192
If the archive sub-flow was executed (user selected "Archive first, then commit together"), add Archived: yes to the message body:
- Distinctive: line 257
If the tracking file is missing, warn but don't block — artifact-only commits are valid
- Distinctive: line 259
If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit files related to a specific Spectra change.
This is a utility skill (not a workflow step). It reads source file tracking data and artifact changes to stage and commit only the files belonging to one change — useful when multiple changes are in progress simultaneously.
Input: Optionally specify a change name after $spectra-commit (e.g., $spectra-commit add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Prerequisites: This skill requires git. Run git --version. If git is not available (command not found or similar error), inform the user to install git and STOP.
Steps
Select the change
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run
spectra list --jsonto get available changes. Use the AskUserQuestion tool to let the user select
Always announce: "Committing for change:
<name>"Read tracking file
Check for
.spectra/touched/<change-name>.json. If it exists, parse it to get source files grouped by task.Expected format:
{ "change": "<change-name>", "touched": [ { "task_id": "1", "task_desc": "Task description", "files": ["src/file1.ts", "src/file2.ts"] } ] }If the file does not exist, proceed without source file data — only artifact files will be included.
Collect artifact files
Run
git status --porcelainand filter the output to files underopenspec/changes/<name>/. These are the change's artifact files (proposal, design, tasks, specs, etc.).Identify unrelated dirty files
From the full
git status --porcelainoutput, any dirty files NOT in the artifact set and NOT in the tracking file are "unrelated changes."Display commit plan
Show the file list grouped into sections:
## Commit Plan: <change-name> ### Change Artifacts - M openspec/changes/<name>/proposal.md - M openspec/changes/<name>/tasks.md ### Source Files **Task 1: <task description>** - M src/lib/components/search.svelte - A src/lib/stores/search.ts **Task 3: <task description>** - M src/routes/+page.svelte ### Unrelated Changes (not included) - M src/lib/utils/format.ts - ?? tmp/scratch.jsIf no tracking file was found, show a warning instead of the Source Files section:
### Source Files ⚠ No source file tracking data found. Only artifact files will be committed. Use `spectra task done` during apply to enable source file tracking.If there are no artifact files AND no tracked source files, inform the user that there is nothing to commit and STOP.
User confirmation
Use the AskUserQuestion tool to ask the user how to proceed.
Options:
- Commit as shown: Proceed with the displayed artifact + source files
- Include all dirty files: Add all unrelated files to the commit as well
- Customize: Let the user add or remove specific files from the commit set
- Archive first, then commit together: Run archive before committing — archive file moves will be included in this commit
If the user selects "Customize":
- Show a numbered list of all dirty files (included and excluded)
- Ask which files to add or remove
- Re-display the updated commit plan for confirmation
If the user selects "Archive first, then commit together":
- Proceed to step 6a (Archive sub-flow) before continuing to step 7
6a. Archive sub-flow (only when the user selected "Archive first, then commit together")
This sub-flow executes three checks in sequence before returning to the main commit flow.
**6a-i. Incomplete task handling**
Read the tasks file at `openspec/changes/<name>/tasks.md`. Count `- [x]` (complete) and `- [ ]` (incomplete) checkboxes.
- If **all tasks are complete**: skip to 6a-ii.
- If **incomplete tasks exist**:
- Display the list of incomplete tasks
- Use the **AskUserQuestion tool** to ask: "These tasks are still incomplete. Mark all as complete before archiving?"
- **Yes**: set a flag to pass `--mark-tasks-complete` to `spectra archive`
- **No**: proceed without the flag (archive will continue with a warning)
If **AskUserQuestion tool** is not available, ask the same question as plain text and wait for the user's response.
**6a-ii. Delta spec sync check**
Check whether delta specs exist at `openspec/changes/<name>/specs/`.
- If **no delta specs exist** (directory is empty or absent): skip to 6a-iii.
- If **delta specs exist**:
- Use the **AskUserQuestion tool** to ask: "Delta specs found. Sync to main specs before archiving?"
- **Yes**: run `spectra sync <name>` before proceeding
- **No**: proceed without syncing
If **AskUserQuestion tool** is not available, ask the same question as plain text and wait for the user's response.
**6a-iii. Archive execution and file collection**
Execute the archive:
```bash
spectra archive <name> # without --mark-tasks-complete
spectra archive <name> --mark-tasks-complete # if user chose to mark tasks complete in 6a-i
```
After archive completes successfully:
1. Re-run `git status --porcelain` to capture all file changes produced by the archive (deletions from `openspec/changes/<name>/`, additions in `openspec/archived/`)
2. Add these archive-related file changes to the commit set
3. Display an **updated commit plan** showing all sections:
```
## Updated Commit Plan: <change-name> (with archive)
### Change Artifacts (archived)
- D docs/specs/changes/<name>/proposal.md
- D docs/specs/changes/<name>/tasks.md
- ...
### Archived Files
- A docs/specs/archived/<name>/proposal.md
- A docs/specs/archived/<name>/tasks.md
- ...
### Source Files
(same as before)
### Spec Sync Changes (if sync was performed)
- M docs/specs/specs/<spec-name>/spec.md
- ...
```
Then continue to step 7.7. Generate commit message
Read the proposal file at openspec/changes/<name>/proposal.md. Extract the first sentence from the Why section (or Problem/Summary section if Why is absent).
Generate a message in this format:
spectra(<change-name>): <summary>
Change: <change-name>
Tasks: <completed>/<total> completeIf the archive sub-flow was executed (user selected "Archive first, then commit together"), add Archived: yes to the message body:
spectra(<change-name>): <summary>
Change: <change-name>
Tasks: <completed>/<total> complete
Archived: yesTask progress comes from reading the tasks file and counting - [x] vs - [ ] checkboxes.
Show the generated message to the user and allow editing before proceeding.
Selective staging
Stage each confirmed file individually:
git add <file1> git add <file2> ...NEVER use
git add .orgit add -A. Each file must be staged explicitly.Commit
git commit -m "<message>"Show result
git log --oneline -1Display the commit hash and message to confirm.
Output On Success
## Committed: <change-name>
**Commit:** <short-hash> spectra(<change-name>): <summary>
**Files:** <N> files committed (<A> artifacts, <S> source files)
**Tasks:** <completed>/<total> completeOutput On Nothing To Commit
## Nothing to Commit
**Change:** <change-name>
No dirty files found for this change (no modified artifacts, no tracked source files).Guardrails
- NEVER use
git add .orgit add -A— every file must be staged individually withgit add <file> - NEVER commit files the user hasn't confirmed — always show the file list and get explicit confirmation first
- Always show the full file list before committing — no silent staging
- If the tracking file is missing, warn but don't block — artifact-only commits are valid
- The "Unrelated Changes" section is informational only — these files are excluded by default
- If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

