richfrem/agent-plugins-skills / plugins/agent-extension-authoring/.apm/skills/packaging-with-apm
packaging-with-apm
FlaggedPackages, installs and distributes agent extensions with APM (Agent Package Manager). Use when the user wants to create a new APM package, convert or migrate an existing plugin to APM and check it installs cleanly, compile a package into AGENTS.md, CLAUDE.md or GEMINI.md, install, update, pin or roll back packages globally or per project, or create a plugin marketplace catalog (marketplace.json). Not for authoring a single skill, plugin, sub-agent or rule (use the authoring-* skills).
tests/test_scaffold_apm.py
View on GitHub#!/usr/bin/env python3
"""
Unit tests for scaffold_apm.py and validate_apm_package.py (packaging-with-apm skill).
Purpose:
Validates the documented quick start of the create mode:
1. `scaffold_apm.py --name <pkg>` works without --path and writes into the current directory
2. The scaffolded package passes `validate_apm_package.py --path <pkg>`
Key Input Dependencies:
- ../scripts/scaffold_apm.py (module under test)
- ../scripts/validate_apm_package.py
"""
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
SCRIPTS = Path(__file__).resolve().parent.parent / "scripts"
def run(script, *args, cwd):
return subprocess.run([sys.executable, str(SCRIPTS / script), *args], cwd=cwd,
capture_output=True, text=True)
class ScaffoldQuickStartTests(unittest.TestCase):
def test_name_only_scaffolds_into_current_directory(self):
with tempfile.TemporaryDirectory() as tmp:
result = run("scaffold_apm.py", "--name", "demo-pkg", cwd=tmp)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertTrue((Path(tmp) / "demo-pkg" / "apm.yml").is_file())
self.assertTrue((Path(tmp) / "demo-pkg" / "docs" / "governance.md").is_file())
def test_scaffolded_package_validates(self):
with tempfile.TemporaryDirectory() as tmp:
self.assertEqual(run("scaffold_apm.py", "--name", "demo-pkg", cwd=tmp).returncode, 0)
result = run("validate_apm_package.py", "--path", "./demo-pkg", cwd=tmp)
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |