$npx -y skills add OdradekAI/bundles-forge --skill testingUse when testing a bundle-plugin locally before release — generating dev-marketplace environments, verifying component discovery, running hook smoke tests, and validating cross-platform readiness
| 1 | # Testing Bundle-Plugins |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Dynamic verification of a bundle-plugin project: install it locally, confirm components are discoverable, validate hooks fire correctly, and run cross-platform smoke tests. Complements `bundles-forge:auditing` (static analysis) with runtime validation. |
| 6 | |
| 7 | **Core principle:** Audit tells you if the structure is correct; testing tells you if it actually works. |
| 8 | |
| 9 | **Skill type:** Flexible — adapt the test scope based on target platforms and project maturity. |
| 10 | |
| 11 | **Announce at start:** "I'm using the testing skill to verify this plugin works correctly." |
| 12 | |
| 13 | ## Step 1: Resolve Input & Detect Scope |
| 14 | |
| 15 | ### Input Normalization |
| 16 | |
| 17 | The target must be a local bundle-plugin project (has `package.json` + `skills/`). Remote URLs and archives are not supported — testing requires a local working directory. |
| 18 | |
| 19 | ### Scope Detection |
| 20 | |
| 21 | | Target | Mode | |
| 22 | |--------|------| |
| 23 | | Project root with multiple platforms | **Full testing** — all 5 test phases | |
| 24 | | Project root with single platform | **Platform testing** — phases 1-4 for the target platform | |
| 25 | | Single skill directory | **Skill-only testing** — phase 3 (component discovery) only | |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | ## Phase 1: Local Test Environment |
| 30 | |
| 31 | Generate a temporary dev-marketplace for local installation testing. |
| 32 | |
| 33 | ### For Claude Code |
| 34 | |
| 35 | 1. Create `../dev-marketplace/` adjacent to the project directory |
| 36 | 2. Generate `.claude-plugin/marketplace.json` pointing to the project: |
| 37 | |
| 38 | ```json |
| 39 | { |
| 40 | "name": "<project-name>-dev", |
| 41 | "owner": { "name": "dev" }, |
| 42 | "plugins": [ |
| 43 | { |
| 44 | "name": "<project-name>", |
| 45 | "source": "../<project-directory-name>" |
| 46 | } |
| 47 | ] |
| 48 | } |
| 49 | ``` |
| 50 | |
| 51 | 3. Instruct the user: |
| 52 | |
| 53 | ``` |
| 54 | Dev marketplace created at ../dev-marketplace/ |
| 55 | |
| 56 | To install locally: |
| 57 | /plugin marketplace add ./dev-marketplace |
| 58 | /plugin install <project-name>@<project-name>-dev |
| 59 | |
| 60 | To reload after changes: |
| 61 | /plugin marketplace update <project-name>-dev |
| 62 | |
| 63 | To clean up when done: |
| 64 | /plugin marketplace remove <project-name>-dev |
| 65 | ``` |
| 66 | |
| 67 | ### For Cursor |
| 68 | |
| 69 | Cursor plugins are installed from local paths directly: |
| 70 | |
| 71 | ``` |
| 72 | To test locally in Cursor: |
| 73 | 1. Open Cursor Settings → Extensions → Install from Path |
| 74 | 2. Select the project root directory |
| 75 | 3. Reload Cursor to pick up changes |
| 76 | ``` |
| 77 | |
| 78 | ### For Other Platforms |
| 79 | |
| 80 | - **Codex:** Symlink `skills/` into `~/.agents/skills/` per INSTALL.md |
| 81 | - **OpenCode:** Register the plugin path in `.opencode/plugins/` |
| 82 | - **Gemini CLI:** Point the extension config to the local directory |
| 83 | |
| 84 | See `references/platform-test-guides.md` for platform-specific setup instructions. |
| 85 | |
| 86 | --- |
| 87 | |
| 88 | ## Phase 2: Hook Smoke Tests |
| 89 | |
| 90 | Verify hooks execute without errors by running them directly. |
| 91 | |
| 92 | ### SessionStart Hook |
| 93 | |
| 94 | ```bash |
| 95 | bash hooks/session-start |
| 96 | ``` |
| 97 | |
| 98 | **Expected:** Exits 0, prints a one-line prompt containing the project name and available skills. No stderr output. |
| 99 | |
| 100 | **Verify output format:** |
| 101 | - If `CLAUDE_PLUGIN_ROOT` is set: valid JSON with `hookSpecificOutput.additionalContext` |
| 102 | - If `CURSOR_PLUGIN_ROOT` is set: valid JSON with `additional_context` |
| 103 | - Neither: plain text |
| 104 | |
| 105 | ### Custom Hooks (if configured) |
| 106 | |
| 107 | If the project defines `PreToolUse` or `PostToolUse` hooks in `hooks.json`, run each referenced script directly and verify: |
| 108 | - PreToolUse scripts: exit 0 on a valid project, exit 2 to block writes on critical issues |
| 109 | - PostToolUse scripts: always exit 0, warnings go to stderr |
| 110 | |
| 111 | ### OpenClaw Hook-Pack (if present) |
| 112 | |
| 113 | Verify `hooks/openclaw-bootstrap/HOOK.md` has valid YAML frontmatter with `events` declaration, and `handler.js` uses ESM `export default`. |
| 114 | |
| 115 | --- |
| 116 | |
| 117 | ## Phase 3: Component Discovery |
| 118 | |
| 119 | Verify that all declared components can be found by the host platform. |
| 120 | |
| 121 | ### Skills |
| 122 | |
| 123 | For each directory under `skills/`: |
| 124 | - [ ] Contains `SKILL.md` |
| 125 | - [ ] Frontmatter has `name` and `description` |
| 126 | - [ ] `name` matches directory name |
| 127 | - [ ] `description` starts with "Use when..." |
| 128 | |
| 129 | ### Agents |
| 130 | |
| 131 | For each `.md` file under `agents/`: |
| 132 | - [ ] Has YAML frontmatter |
| 133 | - [ ] Body has 5+ non-empty lines (self-contained protocol) |
| 134 | |
| 135 | ### Platform Manifests |
| 136 | |
| 137 | For each target platform: |
| 138 | - [ ] Manifest file exists and is valid JSON |
| 139 | - [ ] Paths in manifest resolve to existing files/directories |
| 140 | - [ ] Version matches `package.json` version |
| 141 | |
| 142 | --- |
| 143 | |
| 144 | ## Phase 4: Cross-Platform Readiness |
| 145 | |
| 146 | Generate a platform-specific test checklist based on `references/platform-test-guides.md` and known limitations from `bundles-forge:scaffolding` — `references/platform-adapters.md`. |
| 147 | |
| 148 | ### Known Limitations to Verify |
| 149 | |
| 150 | | Platform | Limitation | Test | |
| 151 | |----------|-----------|------| |
| 152 | | Claude Code | Plugin caching breaks `../` paths | Verify no `../` in hook commands or manifest paths | |
| 153 | | Cursor | Bootstrap lost after `/clear` | Verify session-start runs independently of prior context | |
| 154 | | Codex | No hook bootstrap | Verify AGENTS.md or INSTALL.md has manual setup instructions | |
| 155 | | O |