Auto-add .devkit/ to .gitignore on init - #13
Merged
Conversation
When devkit creates .devkit/ in a project, it now ensures the directory is listed in .gitignore so runtime state (DB, sessions) is never accidentally committed. Creates .gitignore if absent, appends if present, and skips if already ignored.
Claude Code discovers commands from the commands/ directory, not the manifest array. Move 20 command files back from skills/ to commands/ and update manifest paths accordingly.
The manifest is optional per the plugin spec. When present, it overrides directory scanning, which can interfere with auto-discovery. Since commands/, skills/, and agents/ directories are already correctly structured, let Claude Code discover them automatically.
Claude Code auto-discovers skills from skills/{name}/SKILL.md, not
flat files. Move all 14 skill files into the expected structure.
Claude Code constructs the full skill name as pluginName:directoryName automatically. The frontmatter name should match the directory name without the plugin prefix, matching the convention used by superpowers, context-mode, and all other working plugins.
Claude Code derives slash command names from pluginName:filename, not the frontmatter name field. Working plugins like hookify only use description in command frontmatter. Remove the redundant name field from all 20 commands.
Replace three-open pattern (scan, append, re-read) with one ReadFile and one WriteFile. Fixes unchecked scanner.Err() bug and removes unused bufio import.
- release.yml: read version solely from plugin.json, stop reading/writing manifest.json - CONTRIBUTING.md: update to commands/ and skills/*/SKILL.md structure, remove manifest.json references - README.md: update directory tree to show commands/, skills/*/SKILL.md, and .claude-plugin/ instead of manifest.json
Only proceed with empty content when .gitignore doesn't exist. If the file exists but can't be read (permission denied, I/O error), bail out rather than risk overwriting the user's .gitignore.
Cover reviewer suggestions: triple-call idempotency, whitespace-padded entries, and .devkit/ appearing in the middle of the file.
Explain that the slash command name comes from the filename, not frontmatter, per tri-review suggestion.
Resolve conflict: manifest.json was modified on main but intentionally removed in this branch (Claude Code auto-discovers from directories).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.devkit/state directory in a project, it now automatically ensures.devkit/is listed in the project's.gitignore.gitignoreif it doesn't exist, appends if it does, and skips if.devkitor.devkit/is already present.gitignorecan't be writtenTest plan
TestEnsureGitignore_CreatesNew— creates.gitignorefrom scratchTestEnsureGitignore_AppendsToExisting— appends to existing fileTestEnsureGitignore_NoTrailingNewline— handles missing trailing newlineTestEnsureGitignore_AlreadyPresent— no duplicate entriesTestEnsureGitignore_WithoutSlash— recognizes.devkitwithout trailing/