Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

working-with-aspire与 aspire 合作

Agent Skill

working-with-aspire 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

927

周安装

39

GitHub Stars

2

下载量

324
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:working-with-aspire(与 aspire 合作)
来源仓库:https://github.com/mhagrelius/dotfiles
仓库路径:skills/working-with-aspire
安装命令:
npx skills add https://github.com/mhagrelius/dotfiles --skill working-with-aspire
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mhagrelius/dotfiles --skill working-with-aspire

简介

working-with-aspire 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Working with.NET Aspire 13

For AI Assistants: Use MCP Tools

CRITICAL: When helping users debug Aspire applications, use the Aspire MCP tools instead of curl, external HTTP calls, or suggesting manual dashboard inspection.

TaskMCP ToolNOT This
Check resource statuslist_resources❌ curl to dashboard API
Get service logslist_console_logs❌ curl, docker logs
View traceslist_traces❌ curl to OTLP endpoint
Find errors in traceslist_trace_structured_logs❌ manual dashboard search
List available AppHostslist_apphosts❌ file system search

If MCP is not configured, guide the user to run aspire mcp init in their AppHost directory.

Quick Reference

TaskReference File
AppHost patterns, resources, lifecycleapp-host.md
Azure integrations (databases, messaging, AI)azure-integrations.md
Database integrations (Postgres, SQL, Mongo)database-integrations.md
Caching (Redis, Valkey, Garnet)caching-integrations.md
Messaging (Kafka, RabbitMQ, NATS)messaging-integrations.md
Polyglot (Node.js, Python, Go, Rust, Java)polyglot-integrations.md
Deployment, CLI, and aspire do pipelinesdeployment-cli.md
Testing with Aspiretesting.md
Errors and troubleshootingdiagnostics.md
MCP integration for AI assistantsmcp-integration.md
VS Code extensionvs-code-extension.md
Certificate trust configurationcertificate-config.md
Migration from 9.x to 13.xaspire-13-migration.md

Common Mistakes

❌ Wrong: Using non-existent or deprecated APIs

WrongCorrectWhy
AddPythonUvicornAppAddUvicornAppMethod is just AddUvicornApp
AddNpmAppAddViteApp or AddJavaScriptAppAddNpmApp removed in 13.0
AddPythonApp for FastAPIAddUvicornAppUse AddUvicornApp for ASGI (FastAPI, Starlette)
Aspire.Hosting.NodeJsAspire.Hosting.JavaScriptPackage renamed in 13.0

❌ Wrong: Putting secrets in appsettings.json

// WRONG - secrets exposed in source control
// appsettings.json: { "Parameters": { "api-key": "secret123" } }

// CORRECT - use user-secrets for development
// dotnet user-secrets set "Parameters:api-key" "secret123"

Aspire 13 Breaking Changes

Critical: Migration from Aspire 9.x requires attention. See aspire-13-migration.md for full details.

JavaScript/Node.js Changes (13.0)

// BEFORE (9.x) - REMOVED IN 13.0
builder.AddNpmApp("frontend", "../app", scriptName: "dev", args: ["--no-open"])

// AFTER (13.0) - Use AddJavaScriptApp or AddViteApp
builder.AddJavaScriptApp("frontend", "../app")
    .WithRunScript("dev")
    .WithArgs("--no-open");

// For Vite/React specifically:
builder.AddViteApp("frontend", "../app")
    .WithHttpEndpoint(env: "PORT");

// Package renamed: Aspire.Hosting.NodeJs → Aspire.Hosting.JavaScript

Azure Redis Changes (13.1)

// BEFORE (13.0) - DEPRECATED
builder.AddAzureRedisEnterprise("cache")

// AFTER (13.1)
builder.AddAzureManagedRedis("cache")

Network Context Changes (13.0)

// BEFORE (9.x) - containerHostName parameter removed
await resource.ProcessArgumentValuesAsync(
    executionContext, processValue, logger,
    containerHostName: "localhost", cancellationToken);

// AFTER (13.0) - Use NetworkIdentifier
await resource.ProcessArgumentValuesAsync(
    executionContext, processValue, logger, cancellationToken);

// Get endpoints with network context
var endpoint = api.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork);

Publishing API Changes (13.0)

// BEFORE (9.x)
public class MyPublisher : IDistributedApplicationPublisher { }

// AFTER (13.0) - Use aspire do pipelines instead
// IDistributedApplicationPublisher is deprecated

Aspire 13.0+ New Features

Certificate Trust Automation

// Automatic - no configuration needed
var pythonApi = builder.AddUvicornApp("api", "./api", "main:app");
var nodeApi = builder.AddJavaScriptApp("frontend", "./frontend");
// Both automatically trust development certificates

MCP Integration for AI Assistants

# Initialize MCP for Claude Code, GitHub Copilot, etc.
aspire mcp init

aspire do Pipeline System

aspire do build           # Build container images
aspire do push            # Push to registry
aspire do deploy          # Full deployment
aspire do diagnostics     # Show available steps

aspire init (Aspirify Existing Projects)

aspire init               # Interactive setup
aspire init --single-file # Create .cs AppHost without .csproj

Single-File AppHost

// apphost.cs - no project file needed
#:package Aspire.Hosting@*
#:package Aspire.Hosting.Redis@*

var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache");
builder.Build().Run();

Common Patterns

FastAPI + React (Vite) Full Stack

// Required packages:
// dotnet add package Aspire.Hosting.Python
// dotnet add package Aspire.Hosting.JavaScript  (NOT NodeJs!)
// dotnet add package Aspire.Hosting.PostgreSQL

var builder = DistributedApplication.CreateBuilder(args);

// Database
var db = builder.AddPostgres("db")
    .AddDatabase("appdata")
    .WithDataVolume();

// FastAPI backend - use AddUvicornApp (NOT AddPythonApp!)
var api = builder.AddUvicornApp("api", "../api", "main:app")
    .WithHttpEndpoint(port: 8000, env: "PORT")
    .WithReference(db)
    .WaitFor(db);

// React frontend - use AddViteApp (NOT AddNpmApp!)
builder.AddViteApp("frontend", "../frontend")
    .WithHttpEndpoint(env: "PORT")
    .WithExternalHttpEndpoints()
    .WithReference(api);

builder.Build().Run();

Frontend reads API URL from env: process.env.services__api__http__0

Basic AppHost Structure

var builder = DistributedApplication.CreateBuilder(args);

// Database
var db = builder.AddPostgres("db")
    .AddDatabase("appdata")
    .WithDataVolume();

// API with database reference
var api = builder.AddProject<Projects.Api>("api")
    .WithReference(db)
    .WaitFor(db);

// Frontend with API reference
builder.AddViteApp("frontend", "../frontend")
    .WithHttpEndpoint(env: "PORT")
    .WithReference(api);

builder.Build().Run();

Service Discovery Pattern

// Producer exposes endpoint
var api = builder.AddProject<Projects.Api>("api")
    .WithHttpEndpoint(port: 5000, name: "api");

// Consumer references it (gets services__api__api__0 env var)
builder.AddProject<Projects.Web>("web")
    .WithReference(api);

Health Checks and Wait

var db = builder.AddPostgres("db");
var cache = builder.AddRedis("cache");

builder.AddProject<Projects.Api>("api")
    .WithReference(db)
    .WithReference(cache)
    .WaitFor(db)           // Wait for running
    .WaitForHealthy(cache); // Wait for healthy (requires health check)

When to Read Specific Files

Read app-host.md when:

  • Setting up new AppHost project
  • Understanding resource lifecycle events
  • Configuring endpoints and networking
  • Using parameters and secrets

Read azure-integrations.md when:

  • Using Azure services (Cosmos, Service Bus, Storage)
  • Running Azure emulators locally
  • Using RunAsEmulator() or RunAsContainer()
  • Customizing Bicep output

Read polyglot-integrations.md when:

  • Adding Node.js, Python, Go, Rust, or Java apps
  • Frontend frameworks (Vite, Angular, React)
  • Container-based polyglot services
  • Migrating from AddNpmApp to AddJavaScriptApp

Read deployment-cli.md when:

  • Using aspire deploy, aspire publish, or aspire do
  • Using aspire init to Aspirify existing projects
  • Setting up CI/CD pipelines
  • Understanding manifest format

Read mcp-integration.md when:

  • Setting up AI assistant integration
  • Configuring Claude Code, GitHub Copilot, or Cursor
  • Excluding resources from MCP access

Read vs-code-extension.md when:

  • Using Aspire in VS Code
  • Debugging polyglot applications
  • Creating new Aspire projects in VS Code

Read certificate-config.md when:

  • Configuring HTTPS for polyglot apps
  • Custom certificate authorities
  • Certificate trust issues between services

Read aspire-13-migration.md when:

  • Upgrading from Aspire 9.x
  • Seeing deprecated API warnings
  • Container networking issues after upgrade

Read diagnostics.md when:

  • Seeing ASPIRE* compiler errors
  • Debugging service discovery issues
  • Troubleshooting container startup

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

32.28%
按下载量换算105

Claude Code

23.26%
按下载量换算75

Antigravity

17.61%
按下载量换算57

Codex

12.54%
按下载量换算41

trae

8.57%
按下载量换算28

Gemini CLI

3.57%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills