@kurokeita/add-skill 1.21.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,95 @@
1
1
  ---
2
2
  name: git-commit
3
- description: This skill should be used when the user asks to "commit changes", "commit message", or "follow conventional commits". Provides guidelines for Conventional Commits specification and commit message formatting.
4
- version: 1.0.0
3
+ description: Use BEFORE running any write-side git or gh command (git commit, git commit --amend, git push --force / --tags, git reset --hard, git rebase, gh pr create, gh pr merge), and whenever the user asks to commit changes, write a commit message, or follow conventional commits. Provides the hard pre-commit protocol (stop, summarize, propose, ask, wait) plus the Conventional Commits format used for the proposed message.
4
+ version: 2.0.0
5
5
  ---
6
6
 
7
7
  # Git Commit
8
8
 
9
- Guide for managing version control commit message formatting following the Conventional Commits specification.
9
+ This skill enforces the pre-commit protocol AND specifies the commit-message format. Both are mandatory before any gated git/gh write operation runs.
10
10
 
11
- ## When to Use This Skill
11
+ ## When to Use
12
12
 
13
- - Formatting commit messages to follow project standards
14
- - Learning the Conventional Commits specification
15
- - Ensuring consistency across the repository's history
13
+ Invoke this skill BEFORE calling Bash for any of:
16
14
 
17
- ## Conventional Commits
15
+ - `git commit` (any form, including `-m`, `-am`, no-args, heredoc, chained via `&&`/`;`)
16
+ - `git commit --amend` (any form)
17
+ - `git push --force` / `git push -f` / `git push --force-with-lease`
18
+ - `git push --tags`
19
+ - `git reset --hard`
20
+ - `git rebase` (any form, interactive or non-interactive)
21
+ - `gh pr create`
22
+ - `gh pr merge`
18
23
 
19
- Format commit messages according to the [Conventional Commits](https://www.conventionalcommits.org/) specification to enable automated changelog generation and easier history browsing.
24
+ Also invoke when the user asks to commit changes, write a commit message, or follow conventional commits.
25
+
26
+ The `permissions.ask` rule in `~/.claude/settings.json` will surface a permission prompt for these commands regardless. This skill ensures the prompt arrives with a proper proposal already presented to the user.
27
+
28
+ ## Pre-Commit Protocol (HARD RULE)
29
+
30
+ Every gated command, every time. No exceptions for "tiny" or "obvious" changes. Each commit gets its own gate even within the same session. Plan approval, prior "go ahead" signals, and approvals of earlier commits do NOT carry over.
31
+
32
+ ### Step 1 — STOP
33
+
34
+ Do not retry the command yet. The first attempt is your trigger, not your green light.
35
+
36
+ ### Step 2 — Emit a detailed technical summary
37
+
38
+ ```bash
39
+ ### Technical summary
40
+ - Scope: <files added/modified/deleted, one-line purpose each>
41
+ - Behavior change: <user-visible / API-visible effect, or "none" for pure refactors>
42
+ - Architecture/contract impact: <new exports, removed symbols, changed signatures, new dependencies, or "none">
43
+ - Tests: <what was added/updated, what was run, the result>
44
+ - Risk notes: <edge cases, deferred follow-ups, impact-analysis severity>
45
+ ```
46
+
47
+ Fill every bullet. "None" is a valid answer; an omitted bullet is not.
48
+
49
+ ### Step 3 — Propose a commit message
50
+
51
+ Format per the Conventional Commits section below. No `Co-Authored-By: Claude` trailer. Imperative present tense, no trailing period in the subject. When a body is included, it explains the why.
52
+
53
+ **Match the message size to the change.** For small commits — single file, trivial scope, narrow type change, doc tweak, small revert, one-line config flip, renamed prop — propose a title-only message. No body, no bullets. The subject alone conveys intent and a body adds friction without value.
54
+
55
+ ```bash
56
+ ### Proposed commit message
57
+ <type>(<scope>): <imperative subject>
58
+ ```
59
+
60
+ Reserve the full proposal format (body + bullets) for commits that touch multiple files, change behavior in subtle ways, or introduce risk worth flagging:
61
+
62
+ ```bash
63
+ ### Proposed commit message
64
+ <type>(<scope>): <imperative subject>
65
+
66
+ <body paragraph(s) explaining motivation and behavior change>
67
+
68
+ - bullet of notable change
69
+ - bullet of notable change
70
+ ```
71
+
72
+ ### Step 4 — Ask the user verbatim
73
+
74
+ Print exactly: **"Commit as-is, edit the message, or skip?"**
75
+
76
+ ### Step 5 — Wait for explicit approval
77
+
78
+ Only after the user replies with an affirmative answer may you re-attempt the command. The OS permission prompt will then surface for final confirmation.
79
+
80
+ If the user declines or asks to edit, do not commit. Update the proposal and re-ask.
81
+
82
+ ## Multi-commit work
83
+
84
+ If you have several logical commits ready, emit one full proposal per commit and gate each independently. Do not batch proposals. Do not commit any of them until each is individually approved.
85
+
86
+ ## Subagent delegation
87
+
88
+ If you dispatch a subagent that will end in a gated command, you (the orchestrator) own the proposal step. Either instruct the subagent to stop before the command and report back, or require it to wait for an "approved" signal you forward only after the user approves the proposal. A subagent that commits on its own initiative is a rule violation.
89
+
90
+ ## Conventional Commits format
91
+
92
+ Format the proposed message per the [Conventional Commits](https://www.conventionalcommits.org/) specification.
20
93
 
21
94
  ### Structure
22
95
 
@@ -30,36 +103,27 @@ Format commit messages according to the [Conventional Commits](https://www.conve
30
103
 
31
104
  ### Types
32
105
 
33
- - `feat`: A new feature
34
- - `fix`: A bug fix
35
- - `docs`: Documentation only changes
36
- - `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
37
- - `refactor`: A code change that neither fixes a bug nor adds a feature
38
- - `perf`: A code change that improves performance
39
- - `test`: Adding missing tests or correcting existing tests
40
- - `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
41
- - `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
42
- - `chore`: Other changes that don't modify src or test files
43
- - `revert`: Reverts a previous commit
106
+ - `feat`: a new feature
107
+ - `fix`: a bug fix
108
+ - `docs`: documentation only changes
109
+ - `style`: changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
110
+ - `refactor`: a code change that neither fixes a bug nor adds a feature
111
+ - `perf`: a code change that improves performance
112
+ - `test`: adding missing tests or correcting existing tests
113
+ - `build`: changes that affect the build system or external dependencies
114
+ - `ci`: changes to CI configuration files and scripts
115
+ - `chore`: other changes that do not modify src or test files
116
+ - `revert`: reverts a previous commit
44
117
 
45
118
  ### Guidelines
46
119
 
47
- - **Description**: Use the imperative, present tense (e.g., "add", not "added" or "adds").
48
- - **Case**: The description should be in lower-case or sentence-case.
49
- - **Scope**: Use a scope to provide additional contextual information (e.g., `feat(auth): add login validation`).
50
- - **Body**: Use the body to explain the "what" and "why" of the change, not the "how".
51
- - **Footer**: Use the footer to reference issues (e.g., `Closes #123`) or breaking changes.
52
-
53
- ## Additional Resources
54
-
55
- ### Reference Files
56
-
57
- For detailed patterns and advanced git workflows, consult:
58
-
59
- - **`references/conventional-commits.md`** - Detailed Conventional Commits specification.
60
-
61
- ### Example Files
120
+ - **Description**: imperative, present tense ("add", not "added" or "adds")
121
+ - **Case**: lower-case or sentence-case, no trailing period
122
+ - **Scope**: noun in parentheses describing a section of the codebase (e.g., `feat(auth): add login validation`)
123
+ - **Body**: explain the what and why, not the how
124
+ - **Footer**: reference issues (`Closes #123`) or breaking changes (`BREAKING CHANGE: ...`)
125
+ - **Breaking changes**: indicate with `!` after the type/scope OR a `BREAKING CHANGE:` footer
62
126
 
63
- Working examples in `examples/`:
127
+ ### Reference files
64
128
 
65
- - **`commit-messages.txt`** - Examples of well-formatted commit messages.
129
+ For detailed patterns and edge cases, see `references/conventional-commits.md`.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
9
+
10
+ Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
11
+
12
+ Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
13
+
14
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
15
+
16
+ If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: init-agents-md
3
+ description: Analyze a codebase to initialize or update its AGENTS.md (or CLAUDE.md) file, extract architectural patterns to docs/architectural_patterns.md, and procedural skills to .agents/skills/. Use when initializing a project's agent instructions, updating CLAUDE.md/AGENTS.md, or documenting project structure and workflows.
4
+ ---
5
+
6
+ # Initialize Agent Instructions & Patterns
7
+
8
+ Use this skill to analyze a workspace and create or update standard developer onboarding and workflow guidelines.
9
+
10
+ ## Workflow
11
+
12
+ ### 1. Analyze Codebase
13
+
14
+ Explore the codebase to identify:
15
+
16
+ - **WHAT**: Core technology stack, languages, frameworks, main libraries.
17
+ - **WHY**: Core business logic or project purpose.
18
+ - **HOW**: Scripts and CLI commands (e.g., in package.json, Makefile, etc.).
19
+ - **Files/Docs**: Existing documentation, configuration files, and key source directories.
20
+ - **Workflows**: Critical operational workflows (specifically: build, test, release).
21
+
22
+ ### 2. Generate or Update AGENTS.md
23
+
24
+ Create or update the `AGENTS.md` (or `CLAUDE.md`) file in the project root.
25
+
26
+ - Keep the file **under 150 lines** (optimum is 100–150 lines).
27
+ - Reference [agents_template.md](references/agents_template.md) for the structure.
28
+ - Follow these constraints strictly:
29
+ 1. Cover: WHAT (tech stack), WHY (purpose), and HOW (commands).
30
+ 2. Index all major documentation files or folders using progressive disclosure (one-line description each).
31
+ 3. Use **file:line references** (e.g., `src/main.ts:L42`) instead of embedding code snippets.
32
+ 4. Document exactly 2–3 critical workflows (e.g., build, test, release) as numbered steps.
33
+ 5. Do not include formatting or code styling rules (assume linters handle them).
34
+ 6. Always include these two lines under rules/guidelines:
35
+ - `Be extremely concise. Sacrifice grammar for concision.`
36
+ - `At the end of each plan, list unresolved questions.`
37
+
38
+ ### 3. Extract Architectural Patterns
39
+
40
+ Identify recurring design patterns, folder structure conventions, or key abstractions in the codebase.
41
+
42
+ - Extract these into `docs/architectural_patterns.md`.
43
+ - Reference [patterns_template.md](references/patterns_template.md) for the structure.
44
+ - Provide file:line references for concrete code examples of these patterns.
45
+
46
+ ### 4. Extract Procedural Know-How
47
+
48
+ Identify step-by-step procedures, deployment configurations, setup guides, or domain-specific instructions that would clutter the main `AGENTS.md` file.
49
+
50
+ - Extract these into `.agents/skills/<name>/SKILL.md` under the project scope.
51
+ - Reference the newly created skills in `AGENTS.md` or `docs/architectural_patterns.md` where relevant.
@@ -0,0 +1,42 @@
1
+ # AGENTS.md
2
+
3
+ ## Purpose & Tech Stack
4
+
5
+ - **WHAT**: [Tech stack, e.g., Next.js, TypeScript, TailwindCSS]
6
+ - **WHY**: [Core project purpose, target users, problem solved]
7
+
8
+ ## Commands
9
+
10
+ ```bash
11
+ pnpm dev # Run local dev server
12
+ pnpm build # Build project for production
13
+ pnpm test # Run test suite
14
+ pnpm lint # Check types and linting
15
+ ```
16
+
17
+ ## Documentation Index
18
+
19
+ - [docs/architecture.md](file:///path/to/docs/architecture.md) — One-line overview of architecture
20
+ - [docs/api.md](file:///path/to/docs/api.md) — One-line overview of API design
21
+
22
+ ## Critical Workflows
23
+
24
+ ### 1. Development & Build
25
+
26
+ 1. Run local environment: `command`
27
+ 2. Validate changes: `command`
28
+
29
+ ### 2. Testing
30
+
31
+ 1. Run unit tests: `command`
32
+ 2. Run integration tests: `command`
33
+
34
+ ### 3. Release/Deployment
35
+
36
+ 1. Build assets: `command`
37
+ 2. Deploy command or CI pipeline trigger: `command`
38
+
39
+ ## Guidelines
40
+
41
+ - Be extremely concise. Sacrifice grammar for concision.
42
+ - At the end of each plan, list unresolved questions.
@@ -0,0 +1,19 @@
1
+ # Architectural & Design Patterns
2
+
3
+ This document details the recurring architectural, design, and structural patterns found in this codebase.
4
+
5
+ ## 1. [Pattern Name]
6
+
7
+ - **Intent**: [What problem does this pattern solve?]
8
+ - **Location/Example**: [e.g., src/utils/paths.ts:L10-L40]
9
+ - **Implementation Details**:
10
+ - [Key implementation note 1]
11
+ - [Key implementation note 2]
12
+
13
+ ## 2. [Pattern Name]
14
+
15
+ - **Intent**: [What problem does this pattern solve?]
16
+ - **Location/Example**: [e.g., src/commands/add.ts:L45-L90]
17
+ - **Implementation Details**:
18
+ - [Key implementation note 1]
19
+ - [Key implementation note 2]