monica-third-party-module-development
Skill18 starsChanged 7 months agoMITView on GitHub
Create, modernize, validate, package, containerize, or publish independent Monica extension repositories. Use when building one or several publisher-owned Monica NuGet packages, separating capability/provider/UI packages, assigning manifest ecosystem keys and cross-package dependencies, pairing a provider connector with CPU or NVIDIA OCI images, applying ecosystem branding, preparing CI/release automation, or migrating an older third-party module repository.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- monica-application-building-block-developmentSkill
- monica-application-microserviceSkill
- monica-application-modular-monolithSkill
- monica-applicationSkill
- monica-application-ui-developmentSkill
- monica-application-uiSkill
- monica-application-unit-testingSkill
- monica-architectureSkill
- monica-coding-standardsSkill
- monica-contributionSkill
- monica-developmentSkill
- monica-docs-authoringSkill
- monica-frameworkSkill
- monica-guideSkill
- monica-infra-aiSkill
- monica-infra-configurationSkill
- monica-infra-hostingSkill
- monica-infra-jobsSkill
- monica-infra-messagingSkill
- monica-infra-observabilitySkill
- monica-infra-persistenceSkill
- monica-infra-uiSkill
- monica-infra-webSkill
- monica-opentelemetrySkill
- monica-requirement-designSkill
- monica-troubleshootingSkill
- monica-ui-auditSkill
- monica-ui-bridge-debugSkill
- monica-ui-designSkill
- monica-ui-developmentSkill
- monica-ui-localizationSkill
- monica-unit-testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 16 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Use $monica-architecture for package and module boundaries.
- Very specific: line 15
Use $monica-development for host-bound registrations, providers, Facades, and services.
- Very specific: line 16
Use $monica-ui-development for UI packages, $monica-ui-localization for localization changes, and $monica-ui-audit when reviewing a …
- Very specific: line 17
Use $monica-unit-testing for tests.
- Very specific: line 18
Use $monica-docs-authoring for canonical Agent Skill instructions or Monica.Docs guidance.
- Very specific: line 19
Use $monica-ui-bridge-debug and $playwright-cli for runnable UI verification.
- Distinctive: line 28
every NuGet package ID, project path, description, tags, and package dependency
- Distinctive: line 29
every module name, kind, manifest ecosystem key, full manifest-key dependency, and provider target
- Distinctive: line 32
Read ecosystem-standard.md and reject invalid package/module identity.
- Distinctive: line 33
Read project-patterns.md. Split packages only for real install, dependency, support, or release boundaries.
- Very specific: line 34
Write schema-v2 monica.manifest.json from manifest-schema.md, then run:
- Distinctive: line 41
Add sociable tests at the smallest honest boundary.
- Distinctive: line 59
Read publishing.md, validate an immutable effective version, and publish only after all NuGet and OCI artifacts pass together.
- Very specific: line 63
Use manifest schemaVersion: 2.
- Very specific: line 65
Keep PackageId, project name, assembly name, and root namespace identical.
- Very specific: line 71
Use kind: provider plus providerFor for a module implementing IModuleProvider.
- Distinctive: line 72
Never embed a sibling package assembly to avoid a dependency.
- Distinctive: line 73
Keep one aligned manifest version for all NuGet and OCI artifacts in a repository release.
- Distinctive: line 79
Keep all packages in one repository under the same publisher segment.
- Very specific: line 80
Put package-owned module types and registration extensions in <PackageId>.Modules.
- Very specific: line 82
Use a final .UI package/key segment for a separately distributed UI package.
- Distinctive: line 86
Keep public routes under the package-family prefix.
- Distinctive: line 92
Keep context, Dockerfile, runtime stage, platform, accelerator, and tag suffix explicit.
- Distinctive: line 94
Use one Dockerfile DAG so targets share base, dependency, application, and model layers before diverging into CPU/NVIDIA runtime stages.
- Very specific: line 97
Add releaseGates only after provider-specific CPU/NVIDIA smoke scripts exist.
- Distinctive: line 98
Treat missing release gates as fail-closed: the scaffold omits the entire publish workflow for a release unit containing OCI images.
- Very specific: line 104
Add the open-source badge only when license.openSource=true and a NuGet SPDX expression is declared.
- Distinctive: line 106
Never claim official, certified, verified, endorsed, or supported status.
- Distinctive: line 111
Do not describe a repository as ready until all applicable checks pass:
- Distinctive: line 119
no sibling assemblies, secrets, machine paths, or source-project references in packages
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Monica Third-Party Module Development
Build independent packages and companion images from one explicit repository contract. Treat a NuGet package as a distribution boundary, a Monica module as a runtime capability, and an OCI repository as an independently runnable provider-service boundary.
Resolve every bundled scripts/, references/, and assets/ path from this skill's own directory. Do not assume an .agents or .claude projection path.
Companion skills by task
- Use
$monica-architecturefor package and module boundaries. - Use
$monica-developmentfor host-bound registrations, providers, Facades, and services. - Use
$monica-ui-developmentfor UI packages,$monica-ui-localizationfor localization changes, and$monica-ui-auditwhen reviewing a concrete UI risk. - Use
$monica-unit-testingfor tests. - Use
$monica-docs-authoringfor canonical Agent Skill instructions or Monica.Docs guidance. - Use
$monica-ui-bridge-debugand$playwright-clifor runnable UI verification.
Independently published packages override Monica's first-party test naming rule: use one tests/Test.<PackageId> project per package. The host lifecycle, isolation, assertion, and test execution rules from $monica-unit-testing still apply.
Workflow
- Inspect repository instructions, status, license, projects, APIs, tests, and existing release automation. Preserve unrelated work.
- Collect the repository contract:
- durable publisher/repository identity and aligned release version
- every NuGet package ID, project path, description, tags, and package dependency
- every module name, kind, manifest ecosystem key, full manifest-key dependency, and provider target
- optional OCI repository, companion connector package, build context, Dockerfile, bake targets, stages, platforms, accelerators, tag suffixes, provider-specific smoke commands, and managed NVIDIA runner labels
- Monica version, target framework, source visibility, license, branding, contacts, and publishing target
- Read ecosystem-standard.md and reject invalid package/module identity.
- Read project-patterns.md. Split packages only for real install, dependency, support, or release boundaries.
Write schema-v2
monica.manifest.jsonfrom manifest-schema.md, then run:python scripts/scaffold_repository.py --manifest <manifest.json> --output <repository-directory>- Implement the real capability. Do not publish scaffold shells, fake providers, placeholder services, TODO behavior, or sample secrets. OCI declarations generate the deterministic Bake contract and directory only; implement every declared Dockerfile before validation.
- Add sociable tests at the smallest honest boundary. Prove package references, module composition, provider selection, localization, and UI integration through real host composition.
Validate source, package metadata, and optional OCI targets:
python scripts/validate_repository.py --root <repository-directory> python scripts/validate_localization.py --root <repository-directory> --strict # UI only python scripts/validate_oci.py --root <repository-directory> # OCI only- Restore the exact declared Monica NuGet version, then build, test, and pack sequentially using paths understood by the selected SDK. Do not replace Monica package references with local source-project switches. The repository validator rejects any
Monica.*PackageReferencewhose resolved version differs frommonicaVersion. - Inspect the exact release artifact set and consume every package entry point from a clean local feed:
python scripts/inspect_packages.py --root . --artifacts artifacts
python scripts/inspect_images.py --root . # after local image builds- For NVIDIA targets, run an actual
docker run --gpus ...recognition smoke test. Building a CUDA-tagged image or runningnvidia-smialone does not prove provider execution. - Read publishing.md, validate an immutable effective version, and publish only after all NuGet and OCI artifacts pass together.
Repository and dependency rules
- Use manifest
schemaVersion: 2; keep package ecosystem tags atmonica-ecosystem-v1. - Give every package exactly one packable project at
src/<PackageId>/<PackageId>.csproj. - Keep
PackageId, project name, assembly name, and root namespace identical. - Declare the NuGet graph through package
packageDependenciesusing full package IDs. - Preserve declared package/module casing in the repository contract. The scaffold resolves case-insensitive dependency input to the owning declaration before emitting Linux-sensitive paths.
- Declare the repository distribution graph through module
dependsOnusing full manifest ecosystem keys. The scaffold resolves each key to a concreteRequire<TModule>()call inDescribe(ModuleDescriptor). Runtime identity is the moduleType. - Back every cross-package module dependency with a package dependency.
- Use
kind: providerplusproviderForfor a module implementingIModuleProvider; include the target manifest key independsOn, return the target CLR type fromProvidesFor, and declare the hard runtime edge inDescribe. - Never embed a sibling package assembly to avoid a dependency. The packed-artifact inspector rejects this.
- Keep one aligned manifest version for all NuGet and OCI artifacts in a repository release.
Identity and navigation
- Reserve
Monica.*and the purple Monica logo for first-party packages. - Name third-party packages
<Publisher>.Monica.<Package>[.<Variant>]with dot-separated ASCII letter-or-digit segments and at most 100 characters. - Keep all packages in one repository under the same publisher segment.
- Put package-owned module types and registration extensions in
<PackageId>.Modules. Cross-package dependencies use fully qualified concrete module types and qualify option types when an option contribution is needed. Monica-owned modules live inMonica.Modules. - Make every manifest module key equal its owning package ID or start with
<PackageId>.. - Use a final
.UIpackage/key segment for a separately distributed UI package. - Derive a UI category ID by removing only the UI module's manifest ecosystem key final
.UIsegment. ImplementIUIModule; do not infer UI runtime identity from the key suffix. - Contribute each UI category and its pages through one
ModuleShellUIOption.ConfigureNavigationcallback inDescribe, and contribute the module-owned resource marker toModuleLocalizationOptionthere as well. - Derive public routes from the package family without
<Publisher>.Monica.or a distribution-only final.UI:Tairitsua.Monica.GachaPooluses/gacha-pool;Tairitsua.Monica.AI.OCR.UIuses/ai-ocr. - Keep public routes under the package-family prefix; the host route namespace is shared and duplicate normalized routes fail fast.
OCI contract
- Model one OCI repository once and list its CPU/GPU variants as bake targets; do not create a second repository merely for acceleration.
- Make every OCI image name one connector package that owns a
kind: providermodule throughcompanionPackageId. - Keep context, Dockerfile, runtime stage, platform, accelerator, and tag suffix explicit.
- Derive immutable tags as
<manifest-version>-<tag-suffix>. - Use one Dockerfile DAG so targets share base, dependency, application, and model layers before diverging into CPU/NVIDIA runtime stages.
- Pin base images and dependency/model inputs. Run as non-root, declare a health check, and emit OCI version/source/revision plus Monica companion-package/accelerator labels.
- Make NVIDIA images fail fast when GPU execution is requested but unavailable unless the product explicitly documents CPU fallback.
- Add
releaseGatesonly after provider-specific CPU/NVIDIA smoke scripts exist. Every CPU target requirescpuSmokeCommand; every NVIDIA target requiresnvidiaSmokeCommandplus sharedmanagedNvidiaRunnerLabelscontainingself-hostedandnvidia. - Treat missing release gates as fail-closed: the scaffold omits the entire publish workflow for a release unit containing OCI images. With complete gates, it loads and inspects every image and runs meaningful CPU/NVIDIA provider inference before registry login or any artifact push.
Branding and licensing
- Copy the canonical emerald compatibility assets unchanged or use a publisher-owned icon.
- As optional open-source README presentation guidance, prefer a centered project logo at the top, a centered badge row immediately beneath it, and then a centered language selector before the introduction; keep this ordering consistent across localized READMEs. For UI-bearing packages, also consider representative desktop and narrow-width demo screenshots near the overview.
- Add the open-source badge only when
license.openSource=trueand a NuGet SPDX expression is declared. - Include the compatibility self-attestation and independence notice when using the mark.
- Never claim official, certified, verified, endorsed, or supported status.
- Let the publisher choose open-source, proprietary, dual, free, or paid distribution. Read licensing-and-commercial-use.md for nonstandard licensing or restricted feeds.
Completion gate
Do not describe a repository as ready until all applicable checks pass:
- manifest-to-project and project-to-package bijection
- package, assembly, namespace, manifest-key, concrete module
Type, module/provider, and dependency-graph alignment - exact manifest-declared Monica NuGet restore with no version drift or local source override
- XML documentation and zero warnings for restore/build/test/pack
- synchronized
zh-CN/en-US, theme-token, responsive, bridge, and browser checks for UI packages - exact
.nupkg/.snupkgset, internal nuspec dependencies, README/icon/license/symbol metadata, and clean consumers - no sibling assemblies, secrets, machine paths, or source-project references in packages
- exact Bake targets and
group.default, image platform/labels, non-root user, health check, CPU smoke, and real GPU OCR smoke for OCI releases - prerelease extension version whenever any Monica dependency is prerelease
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

