Skip to content

Commit e5e4aac

Browse files
Merge pull request #107 from microsoft/fix/skills-support
fix: skill integration bugs, transitive dep cleanup, and skill_integrator simplification
2 parents d8b546c + 467633f commit e5e4aac

File tree

14 files changed

+1070
-1265
lines changed

14 files changed

+1070
-1265
lines changed

docs/cli-reference.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,20 @@ apm uninstall microsoft/apm-sample-package --dry-run
270270
|------|----------|
271271
| Package entry | `apm.yml` dependencies section |
272272
| Package folder | `apm_modules/owner/repo/` |
273+
| Transitive deps | `apm_modules/` (orphaned transitive dependencies) |
273274
| Integrated prompts | `.github/prompts/*-apm.prompt.md` |
274275
| Integrated agents | `.github/agents/*-apm.agent.md` |
275276
| Integrated chatmodes | `.github/agents/*-apm.chatmode.md` |
276277
| Claude commands | `.claude/commands/*-apm.md` |
277278
| Skill folders | `.github/skills/{folder-name}/` |
279+
| Lockfile entries | `apm.lock` (removed packages + orphaned transitives) |
278280

279281
**Behavior:**
280282
- Removes package from `apm.yml` dependencies
281283
- Deletes package folder from `apm_modules/`
284+
- Removes orphaned transitive dependencies (npm-style pruning via `apm.lock`)
282285
- Removes all integrated files with `-apm` suffix that originated from the package
286+
- Updates `apm.lock` (or deletes it if no dependencies remain)
283287
- Cleans up empty parent directories
284288
- Safe operation: only removes APM-managed files (identified by `-apm` suffix)
285289

@@ -336,7 +340,7 @@ apm deps COMMAND [OPTIONS]
336340

337341
#### `apm deps list` - 📋 List installed APM dependencies
338342

339-
Show all installed APM dependencies in a Rich table format with context files and agent workflows.
343+
Show all installed APM dependencies in a Rich table format with per-primitive counts.
340344

341345
```bash
342346
apm deps list
@@ -350,24 +354,22 @@ apm deps list
350354

351355
**Sample Output:**
352356
```
353-
┌─────────────────────┬─────────┬──────────────┬─────────────┬─────────────┐
354-
│ Package │ Version │ Source Context │ Workflows
355-
├─────────────────────┼─────────┼──────────────┼─────────────┼─────────────┤
356-
│ compliance-rules │ 1.0.0 │ main │ 2 files │ 3 wf
357-
│ design-guidelines │ 1.0.0 │ main │ 1 files │ 3 wf
358-
└─────────────────────┴─────────┴──────────────┴─────────────┴─────────────┘
357+
┌─────────────────────┬─────────┬───────────────────┬─────────────┬────────┬────────┐
358+
│ Package │ Version │ Source │ Prompts │ InstructionsAgents │ Skills
359+
├─────────────────────┼─────────┼───────────────────┼─────────────┼────────┼────────┤
360+
│ compliance-rules │ 1.0.0 │ github 2 │ 1 │ - │ 1
361+
│ design-guidelines │ 1.0.0 │ github - │ 1 │ 1 │ -
362+
└─────────────────────┴─────────┴───────────────────┴─────────────┴────────┴────────┘
359363
```
360364

361365
**Output includes:**
362366
- Package name and version
363-
- Source repository/branch information
364-
- Number of context files (instructions, chatmodes, contexts)
365-
- Number of agent workflows (prompts)
366-
- Installation path and status
367+
- Source information
368+
- Per-primitive counts (prompts, instructions, agents, skills)
367369

368370
#### `apm deps tree` - 🌳 Show dependency tree structure
369371

370-
Display dependencies in hierarchical tree format showing context and agent workflows.
372+
Display dependencies in hierarchical tree format with primitive counts.
371373

372374
```bash
373375
apm deps tree

docs/dependencies.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ Skills are integrated to `.github/skills/`:
4545

4646
| Source | Result |
4747
|--------|--------|
48-
| Package with existing `SKILL.md` | Skill folder copied to `.github/skills/{folder-name}/` |
49-
| APM package with `.apm/` primitives (no SKILL.md) | SKILL.md auto-generated, folder copied to `.github/skills/{folder-name}/` |
50-
| Package without SKILL.md or primitives | No skill folder created |
48+
| Package with `SKILL.md` | Skill folder copied to `.github/skills/{folder-name}/` |
49+
| Package without `SKILL.md` | No skill folder created |
5150

5251
#### Skill Folder Naming
5352

@@ -355,6 +354,13 @@ Result:
355354
- `depth: 1` = direct dependency
356355
- `depth: 2+` = transitive dependency
357356

357+
Uninstalling a package also removes its orphaned transitive dependencies (npm-style pruning):
358+
359+
```bash
360+
apm uninstall acme/package-a
361+
# Also removes B and C if no other package depends on them
362+
```
363+
358364
### Cleaning Dependencies
359365

360366
```bash

docs/integrations.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,8 @@ apm install ComposioHQ/awesome-claude-skills/mcp-builder
264264
**How skill integration works:**
265265
1. `apm install` checks if the package contains a `SKILL.md` file
266266
2. If `SKILL.md` exists: copies the entire skill folder to `.github/skills/{folder-name}/`
267-
3. If no `SKILL.md` but package has `.apm/` primitives: auto-generates `SKILL.md` in `.github/skills/{folder-name}/`
268-
4. Updates `.gitignore` to exclude generated skills
269-
5. `apm uninstall` removes the skill folder
267+
3. Updates `.gitignore` to exclude integrated skills
268+
4. `apm uninstall` removes the skill folder
270269

271270
### Target-Specific Compilation
272271

docs/skills.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ APM automatically detects package types:
275275
| Has | Type | Detection |
276276
|-----|------|-----------|
277277
| `apm.yml` only | APM Package | Standard APM primitives |
278-
| `SKILL.md` only | Claude Skill | Auto-generates `apm.yml` |
278+
| `SKILL.md` only | Claude Skill | Treated as native skill |
279279
| Both files | Hybrid Package | Best of both worlds |
280280

281281
## Target Detection

0 commit comments

Comments
 (0)