aspire-typescript-apphost
Skill632 starsChanged 4 days agoMITView on GitHub
Generate a TypeScript AppHost from an existing C# example AppHost, then add a TypeScriptAppHostTest-based integration test.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- aspire-upgradeSkill
- client-integration-authoringSkill
- dotnet-inspectSkill
- hosting-integration-authoringSkill
- playwright-cliSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 10 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Use this skill when the user wants to create a TypeScript AppHost (apphost.mts) from an existing C# example AppHost and add/update the …
- Distinctive: line 12
Ask for the integration only when this skill is actively running and only if the user did not provide it.
- Distinctive: line 13
Do not ask for integration selection before this skill is invoked.
- Distinctive: line 25
If the user already specified an integration, use it.
- Distinctive: line 36
Create or update the TypeScript AppHost folder
- Distinctive: line 44
Keep template/config conventions aligned with existing TypeScript AppHost examples in this repo.
- Very specific: line 45
Use TypeScript API method names generated for Aspire exports (for overloads, use the exported TypeScript name, not guessed C# casing).
- Very specific: line 49
Use TypeScript Aspire methods and options shapes.
- Distinctive: line 50
Keep path handling and package mapping valid for the example location.
- Distinctive: line 52
Add the integration TypeScript AppHost test
- Very specific: line 53
Add TypeScriptAppHostTests.cs in the integration test project if missing.
- Very specific: line 60
Follow existing test style and attributes ([RequiresDocker] when applicable).
- Distinctive: line 63
Run the relevant test project to ensure the TypeScript AppHost compiles and starts via the shared validation flow.
- Very specific: line 67
Do not edit generated .aspire/modules/ files.
- Distinctive: line 68
Do not change unrelated examples or tests.
- Distinctive: line 69
Keep all changes scoped to the selected integration plus the skill files.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Aspire TypeScript AppHost Generator
Use this skill when the user wants to create a TypeScript AppHost (apphost.mts) from an existing C# example AppHost and add/update the corresponding integration test.
Prompting rule
- Ask for the integration only when this skill is actively running and only if the user did not provide it.
- Do not ask for integration selection before this skill is invoked.
Goal
For one integration, produce:
- A TypeScript AppHost example beside the existing C# AppHost example.
- A test in the integration's
tests/CommunityToolkit.Aspire.Hosting.<Integration>.Testsproject that usesTypeScriptAppHostTest.Run(...).
Workflow
- Resolve the integration
- If the user already specified an integration, use it.
- Otherwise, prompt for it at runtime.
- Locate the source AppHost and test project
- Source C# example path pattern:
examples/<example>/CommunityToolkit.Aspire.Hosting.<Integration>.AppHost/Program.cs
- Target TypeScript example path pattern:
examples/<example>/CommunityToolkit.Aspire.Hosting.<Integration>.AppHost.TypeScript/
- Test project path:
tests/CommunityToolkit.Aspire.Hosting.<Integration>.Tests/
- Source C# example path pattern:
- Create or update the TypeScript AppHost folder
- Required files:
apphost.mtsaspire.config.jsonpackage.jsontsconfig.jsoneslint.config.mjspackage-lock.json
- Keep template/config conventions aligned with existing TypeScript AppHost examples in this repo.
- Use TypeScript API method names generated for Aspire exports (for overloads, use the exported TypeScript name, not guessed C# casing).
- Required files:
- Translate C# AppHost logic to TypeScript
- Preserve resource naming and behavior where practical.
- Use TypeScript Aspire methods and options shapes.
- Keep path handling and package mapping valid for the example location.
- Add the integration TypeScript AppHost test
- Add
TypeScriptAppHostTests.csin the integration test project if missing. - Use:
TypeScriptAppHostTest.Run(...)appHostProject=CommunityToolkit.Aspire.Hosting.<Integration>.AppHost.TypeScriptfolder namepackageName= integration package nameexampleName= example folder namewaitForResources= resources required to verify startup in Aspire
- Follow existing test style and attributes (
[RequiresDocker]when applicable).
- Add
- Validate changes
- Run the relevant test project to ensure the TypeScript AppHost compiles and starts via the shared validation flow.
Guardrails
- Do not edit generated
.aspire/modules/files. - Do not change unrelated examples or tests.
- Keep all changes scoped to the selected integration plus the skill files.
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.

