debug-run 0.5.3 → 0.5.4

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.
Files changed (3) hide show
  1. package/README.md +26 -3
  2. package/dist/index.cjs +83 -22
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,18 +34,41 @@ npx debug-run --help
34
34
 
35
35
  ### Claude Code Skill (Recommended)
36
36
 
37
- To enable Claude Code to use debug-run effectively, install the skill:
37
+ To enable AI coding assistants to use debug-run effectively, install the skill:
38
38
 
39
39
  ```bash
40
- debug-run install-skill
40
+ # Install for Claude Code (default)
41
+ npx debug-run install-skill
42
+
43
+ # Install for GitHub Copilot
44
+ npx debug-run install-skill --copilot
45
+
46
+ # Install for both Claude Code and GitHub Copilot
47
+ npx debug-run install-skill --claude --copilot
48
+
49
+ # Install to project directory (for team sharing)
50
+ npx debug-run install-skill --project # Claude: .claude/skills/
51
+ npx debug-run install-skill --copilot --project # Copilot: .github/skills/
52
+
53
+ # Install to custom directory
54
+ npx debug-run install-skill --dir /path/to/skills
41
55
  ```
42
56
 
43
- This copies the skill files to `~/.claude/skills/debug-run/`, teaching Claude how to use debug-run for debugging .NET, Python, and TypeScript applications. The skill includes:
57
+ | Option | Description |
58
+ |--------|-------------|
59
+ | `--claude` | Install to Claude Code (`~/.claude/skills/`) - default |
60
+ | `--copilot` | Install to GitHub Copilot (`~/.copilot/skills/`) |
61
+ | `--project` | Install to project directory instead of user home |
62
+ | `--dir <path>` | Install to custom directory |
63
+
64
+ This copies skill files teaching AI assistants how to use debug-run for debugging .NET, Python, and TypeScript applications:
44
65
  - `SKILL.md` - Main skill with options reference and best practices
45
66
  - `DOTNET.md` - .NET-specific guide (vsdbg, ASP.NET, NUnit)
46
67
  - `PYTHON.md` - Python-specific guide (debugpy)
47
68
  - `TYPESCRIPT.md` - TypeScript/JavaScript guide (js-debug)
48
69
 
70
+ **Note**: For GitHub Copilot, enable the `chat.useAgentSkills` setting in VS Code for Agent Skills support.
71
+
49
72
  ### Development Setup
50
73
 
51
74
  ```bash
package/dist/index.cjs CHANGED
@@ -6959,9 +6959,11 @@ function createCli() {
6959
6959
  program2.command("install-adapter <name>").description("Download and install a debug adapter").action(async (name) => {
6960
6960
  await installAdapter(name);
6961
6961
  });
6962
- program2.command("install-skill").description("Install the Claude Code skill for debug-run to ~/.claude/skills/").action(async () => {
6963
- await installSkill();
6964
- });
6962
+ program2.command("install-skill").description("Install the debug-run skill for AI coding assistants").option("--claude", "Install to Claude Code (~/.claude/skills/)").option("--copilot", "Install to GitHub Copilot (~/.copilot/skills/)").option("--project", "Install to project directory instead of user home").option("--dir <path>", "Install to custom directory").action(
6963
+ async (options) => {
6964
+ await installSkill(options);
6965
+ }
6966
+ );
6965
6967
  return program2;
6966
6968
  }
6967
6969
  async function runTestDebugSession(options) {
@@ -7163,11 +7165,51 @@ Successfully installed js-debug!`);
7163
7165
  process.exit(1);
7164
7166
  }
7165
7167
  }
7166
- async function installSkill() {
7167
- const os4 = await import("node:os");
7168
- const path12 = await import("node:path");
7168
+ function getSkillTargets(options) {
7169
+ const os4 = require("node:os");
7170
+ const path12 = require("node:path");
7169
7171
  const homeDir = os4.homedir();
7170
- const targetDir = path12.join(homeDir, ".claude", "skills", "debug-run");
7172
+ const projectDir = process.cwd();
7173
+ const targets = [];
7174
+ if (options.dir) {
7175
+ targets.push({
7176
+ name: "custom",
7177
+ directory: path12.resolve(options.dir, "debug-run")
7178
+ });
7179
+ return targets;
7180
+ }
7181
+ const installClaude = options.claude || !options.copilot && !options.dir;
7182
+ const installCopilot = options.copilot;
7183
+ if (installClaude) {
7184
+ if (options.project) {
7185
+ targets.push({
7186
+ name: "Claude Code (project)",
7187
+ directory: path12.join(projectDir, ".claude", "skills", "debug-run")
7188
+ });
7189
+ } else {
7190
+ targets.push({
7191
+ name: "Claude Code",
7192
+ directory: path12.join(homeDir, ".claude", "skills", "debug-run")
7193
+ });
7194
+ }
7195
+ }
7196
+ if (installCopilot) {
7197
+ if (options.project) {
7198
+ targets.push({
7199
+ name: "GitHub Copilot (project)",
7200
+ directory: path12.join(projectDir, ".github", "skills", "debug-run")
7201
+ });
7202
+ } else {
7203
+ targets.push({
7204
+ name: "GitHub Copilot",
7205
+ directory: path12.join(homeDir, ".copilot", "skills", "debug-run")
7206
+ });
7207
+ }
7208
+ }
7209
+ return targets;
7210
+ }
7211
+ async function installSkill(options = {}) {
7212
+ const path12 = await import("node:path");
7171
7213
  const moduleDir = path12.dirname(new URL(__importMetaUrl).pathname);
7172
7214
  const possibleSources = [
7173
7215
  path12.join(moduleDir, "..", ".claude", "skills", "debug-run"),
@@ -7186,25 +7228,44 @@ async function installSkill() {
7186
7228
  console.error("Expected to find SKILL.md in .claude/skills/debug-run/");
7187
7229
  process.exit(1);
7188
7230
  }
7189
- fs2.mkdirSync(targetDir, { recursive: true });
7231
+ const targets = getSkillTargets(options);
7232
+ if (targets.length === 0) {
7233
+ console.error("Error: No installation target specified.");
7234
+ console.error("Use --claude, --copilot, --project, or --dir <path>");
7235
+ process.exit(1);
7236
+ }
7190
7237
  const files = ["SKILL.md", "DOTNET.md", "PYTHON.md", "TYPESCRIPT.md"];
7191
- let copiedCount = 0;
7192
- for (const file of files) {
7193
- const srcPath = path12.join(sourceDir, file);
7194
- const destPath = path12.join(targetDir, file);
7195
- if (fs2.existsSync(srcPath)) {
7196
- fs2.copyFileSync(srcPath, destPath);
7197
- copiedCount++;
7238
+ for (const target of targets) {
7239
+ fs2.mkdirSync(target.directory, { recursive: true });
7240
+ let copiedCount = 0;
7241
+ for (const file of files) {
7242
+ const srcPath = path12.join(sourceDir, file);
7243
+ const destPath = path12.join(target.directory, file);
7244
+ if (fs2.existsSync(srcPath)) {
7245
+ fs2.copyFileSync(srcPath, destPath);
7246
+ copiedCount++;
7247
+ }
7198
7248
  }
7199
- }
7200
- console.log(`Installed debug-run skill to: ${targetDir}`);
7201
- console.log(`Copied ${copiedCount} files:`);
7202
- for (const file of files) {
7203
- if (fs2.existsSync(path12.join(targetDir, file))) {
7204
- console.log(` - ${file}`);
7249
+ console.log(`Installed debug-run skill for ${target.name}:`);
7250
+ console.log(` Directory: ${target.directory}`);
7251
+ console.log(` Files copied: ${copiedCount}`);
7252
+ for (const file of files) {
7253
+ if (fs2.existsSync(path12.join(target.directory, file))) {
7254
+ console.log(` - ${file}`);
7255
+ }
7205
7256
  }
7257
+ console.log();
7258
+ }
7259
+ const targetNames = targets.map((t) => t.name);
7260
+ if (targetNames.some((n) => n.includes("Claude"))) {
7261
+ console.log("Claude Code will now use this skill when debugging.");
7262
+ }
7263
+ if (targetNames.some((n) => n.includes("Copilot"))) {
7264
+ console.log("GitHub Copilot will now use this skill when debugging.");
7265
+ console.log(
7266
+ "Note: Enable the chat.useAgentSkills setting in VS Code for Agent Skills support."
7267
+ );
7206
7268
  }
7207
- console.log("\nClaude Code will now use this skill when debugging.");
7208
7269
  }
7209
7270
 
7210
7271
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debug-run",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "CLI tool enabling AI agents to programmatically debug code via DAP",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",