ai-slash-commands 2026.1.4 → 2026.1.5

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,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",
15
+ "type": "node",
16
+ "request": "launch",
17
+ "runtimeExecutable": "npm",
18
+ "runtimeArgs": ["run", "install"],
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-slash-commands",
3
- "version": "2026.1.4",
3
+ "version": "2026.1.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ai-slash-commands": "scripts/cli.mjs"
@@ -0,0 +1,36 @@
1
+ # Commands
2
+
3
+ This directory contains AI slash command prompts.
4
+
5
+ ## Available Commands
6
+
7
+ ### `/audit-packages`
8
+
9
+ # audit-packages - update packages
10
+
11
+ *Source: [audit-packages.md](audit-packages.md)*
12
+
13
+ ### `/commit`
14
+
15
+ # commit - make a commit
16
+
17
+ *Source: [commit.md](commit.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
+ Review the codebase, find files with many lines or a lot of duplicate code, suggest 2-3 refactoring tasks to improve the code.
34
+
35
+ *Source: [refactoring.md](refactoring.md)*
36
+
@@ -0,0 +1,11 @@
1
+ # audit-packages - 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.
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,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.
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}/`);
@@ -65,7 +65,9 @@ function parseArgs() {
65
65
  return { targets };
66
66
  }
67
67
 
68
- export async function install({ targets }) {
68
+ async function main() {
69
+ const { targets } = parseArgs();
70
+
69
71
  for (const t of targets) {
70
72
  if (!SRC[t] || !DEST[t]) {
71
73
  console.error(`Unknown target: ${t}. Allowed: ${Object.keys(SRC).join(", ")}`);
@@ -79,15 +81,7 @@ export async function install({ targets }) {
79
81
  }
80
82
  }
81
83
 
82
- async function main() {
83
- const { targets } = parseArgs();
84
- await install({ targets });
85
- }
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
- }
84
+ main().catch((err) => {
85
+ console.error(err);
86
+ process.exit(1);
87
+ });
File without changes