ai-slash-commands 2026.1.4 → 2026.1.6

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.
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(node scripts/cli.mjs:*)",
5
+ "Bash(git add:*)",
6
+ "Bash(git rm:*)",
7
+ "Bash(git commit:*)"
8
+ ]
9
+ }
10
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "npm: gen",
6
+ "type": "node",
7
+ "request": "launch",
8
+ "runtimeExecutable": "npm",
9
+ "runtimeArgs": ["run", "gen"],
10
+ "console": "integratedTerminal",
11
+ "internalConsoleOptions": "neverOpen"
12
+ },
13
+ {
14
+ "name": "npm: install-configs",
15
+ "type": "node",
16
+ "request": "launch",
17
+ "runtimeExecutable": "npm",
18
+ "runtimeArgs": ["run", "install-configs"],
19
+ "console": "integratedTerminal",
20
+ "internalConsoleOptions": "neverOpen"
21
+ },
22
+ {
23
+ "name": "npm: uninstall",
24
+ "type": "node",
25
+ "request": "launch",
26
+ "runtimeExecutable": "npm",
27
+ "runtimeArgs": ["run", "uninstall"],
28
+ "console": "integratedTerminal",
29
+ "internalConsoleOptions": "neverOpen"
30
+ },
31
+ {
32
+ "name": "npm: link:windsurf",
33
+ "type": "node",
34
+ "request": "launch",
35
+ "runtimeExecutable": "npm",
36
+ "runtimeArgs": ["run", "link:windsurf"],
37
+ "console": "integratedTerminal",
38
+ "internalConsoleOptions": "neverOpen"
39
+ }
40
+ ]
41
+ }
42
+
package/README.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # ai-slash-commands
2
2
 
3
+ A tool for managing AI slash commands and prompts across multiple AI-powered editors. Write prompts once in markdown, and install them to Claude Code, Cursor, Windsurf, and Codex.
4
+
5
+ **Quick start:**
6
+ ```bash
7
+ npx ai-slash-commands
8
+ ```
9
+
10
+ [Prompts list](prompts/)
11
+
3
12
  Один набор markdown-промптов в `./prompts/*.md`, генерация в `./dist/**` и установка в домашние папки для:
4
13
  - Claude Code
5
14
  - Cursor
@@ -24,7 +33,7 @@ npm run gen
24
33
 
25
34
  3) Установи в домашние папки:
26
35
  ```bash
27
- npm run install
36
+ npm run install-configs
28
37
  ```
29
38
 
30
39
  ## NPX
@@ -61,7 +70,7 @@ npm run link:windsurf
61
70
  - `dist/windsurf/workflows/*.md`
62
71
  - `dist/codex/prompts/*.md`
63
72
 
64
- - `npm run install` - копирует из `dist/**` в:
73
+ - `npm run install-configs` - копирует из `dist/**` в:
65
74
  - `~/.claude/commands`
66
75
  - `~/.cursor/commands`
67
76
  - `~/.windsurf/workflows` (хранилище, дальше линк)
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "ai-slash-commands",
3
- "version": "2026.1.4",
3
+ "version": "2026.1.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ai-slash-commands": "scripts/cli.mjs"
7
7
  },
8
8
  "scripts": {
9
9
  "gen": "node scripts/gen.mjs",
10
- "install": "node scripts/install.mjs",
10
+ "install-configs": "node scripts/install-configs.mjs",
11
11
  "uninstall": "node scripts/uninstall.mjs",
12
12
  "link:windsurf": "node scripts/link-windsurf.mjs"
13
13
  }
@@ -0,0 +1,42 @@
1
+ # Commands
2
+
3
+ This directory contains AI slash command prompts.
4
+
5
+ ## Available Commands
6
+
7
+ ### `/commit`
8
+
9
+ # commit - make a commit
10
+
11
+ *Source: [commit.md](commit.md)*
12
+
13
+ ### `/dependencies`
14
+
15
+ # dependencies - update packages
16
+
17
+ *Source: [dependencies.md](dependencies.md)*
18
+
19
+ ### `/feat`
20
+
21
+ # feat - add a new feature
22
+
23
+ *Source: [feat.md](feat.md)*
24
+
25
+ ### `/learn`
26
+
27
+ # learn - add agents knowledge
28
+
29
+ *Source: [learn.md](learn.md)*
30
+
31
+ ### `/refactoring`
32
+
33
+ # refactoring - refactor the code
34
+
35
+ *Source: [refactoring.md](refactoring.md)*
36
+
37
+ ### `/run-and-check`
38
+
39
+ # run-and-check - run and check the code
40
+
41
+ *Source: [run-and-check.md](run-and-check.md)*
42
+
package/prompts/commit.md CHANGED
@@ -1,6 +1,18 @@
1
- Собери один аккуратный коммит по текущим изменениям.
1
+ # commit - make a commit
2
2
 
3
- Требования:
4
- - Один коммит, не несколько.
5
- - Сообщение коммита короткое, но информативное. Angular commit message style: feat(component), fix, test, docs, refactor, style, chore.
6
- - Если есть тесты - запусти их.
3
+ Act as a senior software engineer to commit changes to the repository in this format:
4
+ "$type${[(scope)]}{[!]}: $description"
5
+ # Notes:
6
+ # - Square brackets [] indicate optional parts.
7
+ # - "!" marks a breaking change.
8
+
9
+ Types: fix | feat | chore | docs | refactor | test | perf | build | ci | style | revert | other
10
+
11
+ Constraints {
12
+ When committing, don't log about logging in the commit message.
13
+ Use multiple -m flags, one for each log entry.
14
+ Limit the first commit message line to 50 characters.
15
+ Use conventional commits with a scope, title, and body.
16
+ }
17
+
18
+ If there are tests in project, run them before committing.
@@ -0,0 +1,11 @@
1
+ # dependencies - update packages
2
+
3
+ Check package versions for known vulnerabilities. Update vulnerable packages.
4
+
5
+ Verify the application works.
6
+
7
+ If it's quick, update all packages to the latest versions. If updating all packages isn't feasible, update only vulnerable ones.
8
+
9
+ When changing major versions, check for breaking changes and review code that uses them.
10
+
11
+ for package.json: run `npm audit fix --force`, verify the application works. First update dependencies, then devDependencies. If all packages couldn't be updated, update only vulnerable ones. When changing major versions, check for breaking changes and review code that uses them.
@@ -0,0 +1,68 @@
1
+ # feat - add a new feature
2
+
3
+ Act as a senior software engineer to add a new feature to the repository.
4
+
5
+ ### 0) Inputs and constraints
6
+
7
+ * Feature request (user description)
8
+ * Repo context (structure, stack, conventions, CI)
9
+ * Constraints (deadline, “no refactors”, compatibility, platforms, versions)
10
+
11
+ If critical info is missing, ask only the minimum set of questions required to proceed. Otherwise, make reasonable assumptions and clearly list them.
12
+
13
+ ### 1) Define the feature
14
+
15
+ Produce:
16
+
17
+ * A 1-2 sentence goal statement
18
+ * Primary user flows (happy path + 2-3 important edge cases)
19
+ * Definition of Done (clear acceptance criteria)
20
+ * Constraints and compatibility notes (APIs, data, platforms, versions)
21
+
22
+ ### 2) Codebase reconnaissance
23
+
24
+ Before editing:
25
+
26
+ * Identify where this feature should live (files/modules)
27
+ * List integration points (API/UI/CLI/config/DB)
28
+ * Call out risks (breaking changes, migrations, flags, performance, security)
29
+
30
+ ### 3) Implementation plan
31
+
32
+ Create a small-step plan:
33
+
34
+ * What changes by file/module
35
+ * New entities/interfaces/types/endpoints/tables (if any)
36
+ * Minimal incremental approach: skeleton first, then expand
37
+ * Rollback strategy and/or feature flag if risk is non-trivial
38
+
39
+ ### 4) Implement
40
+
41
+ Make changes carefully:
42
+
43
+ * Follow existing architecture and style
44
+ * Avoid duplication; extract shared logic
45
+ * Use clear names; add comments only when they add real value
46
+ * Preserve backward compatibility unless explicitly instructed otherwise
47
+ * Keep diffs focused; avoid unrelated refactors
48
+
49
+ ### 5) Tests
50
+
51
+ * Add/update tests (unit/integration) for key flows, if tests are present in the project.
52
+ * Include regression coverage for the behavior this feature is meant to address (when applicable)
53
+ * If tests are difficult, explain why and provide an alternative verification plan (smoke/e2e/manual checklist)
54
+
55
+ ### 6) Documentation and developer experience
56
+
57
+ * Update README/docs/examples as needed
58
+ * Document new config/env variables and defaults
59
+ * Add “How to verify locally”: commands and a couple of usage examples
60
+
61
+ ### 7) Final summary
62
+
63
+ End with:
64
+
65
+ * What changed (brief)
66
+ * Files touched (grouped by purpose)
67
+ * Commands to verify (lint/test/build/run)
68
+ * Known limitations / follow-ups (if any)
@@ -0,0 +1,3 @@
1
+ # learn - add agents knowledge
2
+
3
+ Look at the dialog. Add strategic knowledge to AGENTS.md, CLAUDE.md, .cursor/rules
@@ -0,0 +1,3 @@
1
+ # refactoring - refactor the code
2
+
3
+ Review the codebase, find files with many lines or a lot of duplicate code, suggest 2-3 refactoring tasks to improve the code.
@@ -0,0 +1,3 @@
1
+ # run-and-check - run and check the code
2
+
3
+ Run the code and check the results.
package/scripts/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { generate } from "./gen.mjs";
6
- import { install } from "./install.mjs";
6
+ import { install } from "./install-configs.mjs";
7
7
 
8
8
  const __filename = fileURLToPath(import.meta.url);
9
9
  const __dirname = path.dirname(__filename);
package/scripts/gen.mjs CHANGED
@@ -38,6 +38,41 @@ async function listPromptFiles(promptsDir) {
38
38
  .map(e => e.name);
39
39
  }
40
40
 
41
+ async function generateCommandsReadme(promptsDir) {
42
+ const promptFiles = await listPromptFiles(promptsDir);
43
+ const commands = [];
44
+
45
+ for (const name of promptFiles) {
46
+ if (name.toLowerCase() === "readme.md") {
47
+ continue; // Skip README.md itself
48
+ }
49
+ const srcPath = path.join(promptsDir, name);
50
+ const content = await fs.readFile(srcPath, "utf8");
51
+ const commandName = name.replace(/\.md$/i, "");
52
+ const firstLine = content.split("\n")[0].trim();
53
+ const description = firstLine || "No description";
54
+ commands.push({ name: commandName, description, filename: name });
55
+ }
56
+
57
+ // Sort commands alphabetically by name
58
+ commands.sort((a, b) => a.name.localeCompare(b.name));
59
+
60
+ // Generate README content
61
+ let readmeContent = "# Commands\n\n";
62
+ readmeContent += "This directory contains AI slash command prompts.\n\n";
63
+ readmeContent += "## Available Commands\n\n";
64
+
65
+ for (const cmd of commands) {
66
+ readmeContent += `### \`/${cmd.name}\`\n\n`;
67
+ readmeContent += `${cmd.description}\n\n`;
68
+ readmeContent += `*Source: [${cmd.filename}](${cmd.filename})*\n\n`;
69
+ }
70
+
71
+ const readmePath = path.join(promptsDir, "README.md");
72
+ await fs.writeFile(readmePath, readmeContent, "utf8");
73
+ console.log(`Generated: ${path.relative(repoRoot, readmePath)}`);
74
+ }
75
+
41
76
  export async function generate({ targets, promptsDir }) {
42
77
  const promptFiles = await listPromptFiles(promptsDir);
43
78
  if (promptFiles.length === 0) {
@@ -54,6 +89,9 @@ export async function generate({ targets, promptsDir }) {
54
89
  }
55
90
 
56
91
  for (const name of promptFiles) {
92
+ if (name.toLowerCase() === "readme.md") {
93
+ continue; // Skip README.md
94
+ }
57
95
  const srcPath = path.join(promptsDir, name);
58
96
  const content = await fs.readFile(srcPath, "utf8");
59
97
 
@@ -63,6 +101,9 @@ export async function generate({ targets, promptsDir }) {
63
101
  }
64
102
  }
65
103
 
104
+ // Generate commands README in prompts directory
105
+ await generateCommandsReadme(promptsDir);
106
+
66
107
  console.log("Generated:");
67
108
  for (const t of targets) {
68
109
  console.log(`- dist/${TARGETS[t].out}/`);
@@ -84,10 +84,7 @@ async function main() {
84
84
  await install({ targets });
85
85
  }
86
86
 
87
- const isMain = process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1]);
88
- if (isMain) {
89
- main().catch((err) => {
90
- console.error(err);
91
- process.exit(1);
92
- });
93
- }
87
+ main().catch((err) => {
88
+ console.error(err);
89
+ process.exit(1);
90
+ });
File without changes