debug-run 0.5.2 → 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 +25 -6
  2. package/dist/index.cjs +107 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,22 +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, copy the skill to your skills directory:
37
+ To enable AI coding assistants to use debug-run effectively, install the skill:
38
38
 
39
39
  ```bash
40
- # Create skills directory if it doesn't exist
41
- mkdir -p ~/.claude/skills
40
+ # Install for Claude Code (default)
41
+ npx debug-run install-skill
42
42
 
43
- # Copy the debug-run skill
44
- cp -r node_modules/debug-run/.claude/skills/debug-run ~/.claude/skills/
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
45
55
  ```
46
56
 
47
- This installs the skill which teaches 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:
48
65
  - `SKILL.md` - Main skill with options reference and best practices
49
66
  - `DOTNET.md` - .NET-specific guide (vsdbg, ASP.NET, NUnit)
50
67
  - `PYTHON.md` - Python-specific guide (debugpy)
51
68
  - `TYPESCRIPT.md` - TypeScript/JavaScript guide (js-debug)
52
69
 
70
+ **Note**: For GitHub Copilot, enable the `chat.useAgentSkills` setting in VS Code for Agent Skills support.
71
+
53
72
  ### Development Setup
54
73
 
55
74
  ```bash
package/dist/index.cjs CHANGED
@@ -6959,6 +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 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
+ );
6962
6967
  return program2;
6963
6968
  }
6964
6969
  async function runTestDebugSession(options) {
@@ -7160,6 +7165,108 @@ Successfully installed js-debug!`);
7160
7165
  process.exit(1);
7161
7166
  }
7162
7167
  }
7168
+ function getSkillTargets(options) {
7169
+ const os4 = require("node:os");
7170
+ const path12 = require("node:path");
7171
+ const homeDir = os4.homedir();
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");
7213
+ const moduleDir = path12.dirname(new URL(__importMetaUrl).pathname);
7214
+ const possibleSources = [
7215
+ path12.join(moduleDir, "..", ".claude", "skills", "debug-run"),
7216
+ path12.join(moduleDir, ".claude", "skills", "debug-run"),
7217
+ path12.join(process.cwd(), ".claude", "skills", "debug-run")
7218
+ ];
7219
+ let sourceDir = null;
7220
+ for (const src of possibleSources) {
7221
+ if (fs2.existsSync(path12.join(src, "SKILL.md"))) {
7222
+ sourceDir = src;
7223
+ break;
7224
+ }
7225
+ }
7226
+ if (!sourceDir) {
7227
+ console.error("Error: Could not find skill files.");
7228
+ console.error("Expected to find SKILL.md in .claude/skills/debug-run/");
7229
+ process.exit(1);
7230
+ }
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
+ }
7237
+ const files = ["SKILL.md", "DOTNET.md", "PYTHON.md", "TYPESCRIPT.md"];
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
+ }
7248
+ }
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
+ }
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
+ );
7268
+ }
7269
+ }
7163
7270
 
7164
7271
  // src/index.ts
7165
7272
  var cli = createCli();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debug-run",
3
- "version": "0.5.2",
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",