richfrem/agent-plugins-skills / plugins/agent-extension-authoring/.apm/skills/packaging-copilot-cowork-plugins
packaging-copilot-cowork-plugins
VerifiedCreates, validates and prepares Microsoft 365 Copilot Cowork plugin App Packages containing Agent Skills and optional remote MCP connectors. Use when scaffolding, converting, validating, provisioning, packaging or sharing a Cowork plugin. Not for APM package creation or installation (use packaging-with-apm).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.2 KB |
| evals/evals.json | config | 1.6 KB |
| evals/task-success.json | config | 3.1 KB |
| packaging-copilot-cowork-plugins-flow.mmd | other | 651 B |
| references/acceptance-criteria.md | markdown | 3.1 KB |
| references/cowork-capabilities-and-limits.md | markdown | 3.7 KB |
| references/cowork-deterministic-vs-generative.md | markdown | 3.5 KB |
| references/cowork-package-lifecycle.md | markdown | 13.9 KB |
| references/cowork-sandbox-findings.md | markdown | 7.0 KB |
| references/cowork-test-playbook.md | markdown | 3.6 KB |
| references/skill-install-routes.md | markdown | 4.7 KB |
| scripts/bundle_skill_companions.py | script | 19.8 KB |
| scripts/cowork_content_checks.py | script | 9.9 KB |
| scripts/cowork_markdown_utils.py | script | 4.8 KB |
| scripts/cowork_package_constants.py | script | 5.2 KB |
| scripts/package_cowork_plugin.py | script | 21.0 KB |
| scripts/scaffold_cowork_package.py | script | 13.4 KB |
| tests/test_bundle_and_scaffold.py | script | 10.9 KB |
| tests/test_content_checks.py | script | 8.9 KB |
| tests/test_package_cowork_plugin.py | script | 9.2 KB |
references/cowork-deterministic-vs-generative.md
View on GitHub# Deterministic Code or Generative AI in a Cowork Skill
Where to put the work in a skill: in a script that runs the same way every time, or in the
agent's own reasoning. Cowork usage is metered, so the choice affects cost and speed as well
as reliability.
## Contents
- [The rule](#the-rule)
- [Evidence and what is not measured](#evidence-and-what-is-not-measured)
- [The hybrid pattern we used](#the-hybrid-pattern-we-used)
- [When the sandbox forces the AI route](#when-the-sandbox-forces-the-ai-route)
- [A test to measure cost](#a-test-to-measure-cost)
## The rule
1. **Script anything you can check.** Parsing, splitting, linking, counting, formatting and
validation belong in a script using tools the sandbox already has (Python with
pdfplumber or pypdf, pandoc, LibreOffice). The same input gives the same output, and the
result can be compared with expected values.
2. **Use the agent only for judgment** a script cannot make, such as proposing topic
boundaries for a document with no headings, or naming things.
3. **Never let the agent rewrite content.** In the converter skills the page text is copied
from the source unchanged. The agent proposes boundaries and titles only.
4. **Put a human gate on every AI proposal.** Write the proposal to an editable file (a topics
spreadsheet) and ask the user to confirm before anything is built.
5. **Validate after the build** with numbers (character or word coverage, empty topics,
warnings), not with a model's opinion.
## Evidence and what is not measured
- **Reported:** when Cowork's built-in `/pdf` skill did the same conversion by agent, the
user saw it as likely slower and more expensive than running deterministic code.
- **Observed:** on the same manual the body text came out essentially the same from both. The
built-in route was better in formatting details (list nesting, image labels, a Contents
list, a richer report), and those were then added to the script.
- **Not measured:** no credit or time figures were recorded. Do not quote a saving. Use the
[test below](#a-test-to-measure-cost) to get one.
## The hybrid pattern we used
| Step | Done by | Why |
|---|---|---|
| Detect structure (bookmarks, heading sizes, Word heading styles) | Script | Deterministic and free of model cost |
| Propose topics when structure is weak | Agent, from a digest the script wrote | Needs judgment |
| Review and edit topics | The user, in an Excel or CSV file | Human gate |
| Build pages, index, links, media | Script | Repeatable |
| Check coverage and report | Script | Numbers, not opinion |
| Explain results and deliver files | Agent | Natural-language work |
## When the sandbox forces the AI route
Skill scripts may not be on disk in the sandbox (see
[the sandbox findings](cowork-sandbox-findings.md)). If a script cannot run:
- First try reading it with the file viewer and writing it to `/tmp` (not yet tested for a
large script).
- Otherwise ask the user to attach it. Do not silently fall back to doing the whole job by
agent, because quality and cost both change. Say so and let the user choose.
## A test to measure cost
Run one document both ways in fresh tasks and record, for each: elapsed time, the credit or
usage figure Cowork shows, whether the output passed the same validation, and how many
manual corrections it needed.
1. Task A: the skill with its script path.
2. Task B: the same request with the built-in agent skill (for a PDF, `/pdf`).
Add the figures to this file with the date and the document size, labelled Measured, and leave
the earlier Reported observation as it is.
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 |