Perigon.CLI copilot-instructions.md

Repository instructions for Perigon.CLI, a .NET command-line tool with a Blazor web interface, MCP server, package management, OpenAPI client generation, and code-generation features. They describe its technology stack, project structure, localization, and coding conventions.

In plain words
What is it for?
Use them when adding or modifying C#, Blazor, MCP, code-generation, localization, packaging, or test code in the Perigon.CLI repository.
Why use it?
They give an agent project-specific rules for making focused, compatible changes and avoiding guesses about architecture or localized text.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/aterdev/perigon.cli/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/AterDev/Perigon.CLI

Made for: GitHub Copilot.

Per session 1,254 This file is loaded in full into every session.
When invoked 1,254 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01254 $0.01254
Opus 5 $0.00627 $0.00627
Sonnet 5 $0.00251 $0.00251
Haiku 4.5 $0.00125 $0.00125

Measured yesterday against content hash 19e8f07e1ed0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Perigon.CLI copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub Copilot Instructions

本仓库是 Perigon.CLI:一个 .NET 10 命令行开发辅助工具,同时提供 Blazor Server Studio Web UI、MCP Server、模块打包/安装、OpenAPI 客户端生成,以及基于 Roslyn/Razor 的代码生成能力。生成或修改代码时,请优先遵循本文件,并参考 .agents/agents/engineer.agent.md.agents/skills 中的工程规范和技术栈技能。

General Guidelines

  • 准确性和确定性最重要;没有足够依据时先查代码或说明,不要猜测。
  • 没有明确要求时,不要私自构建整个项目;优先通过 IDE 诊断、静态检查和必要的局部测试判断正确性。
  • 保持改动聚焦,不要顺手重构无关代码或改动用户已有变更。
  • 用户可见文本需要考虑中英文本地化。Razor 中使用源生成器生成的 Localizer.<Key> 常量,例如 @Localizer.Get(Localizer.CodeGen)
  • 新增或修改本地化文本时,同时维护 src/Share/Localizer.zh-CN.resxsrc/Share/Localizer.en-US.resx

技术栈

  • 主要语言:C#,目标框架 net10.0,启用 nullable 与 implicit usings。
  • 包版本管理:Directory.Packages.props 中央包管理。
  • CLI:Spectre.Console.CliSpectre.ConsoleMicrosoft.Extensions.Hosting、DI、OutputHelper
  • Studio Web UI:ASP.NET Core、Blazor Server interactive components、Microsoft.FluentUI.AspNetCore.Components
  • MCP:ModelContextProtocol.AspNetCore
  • 代码生成:Roslyn (Microsoft.CodeAnalysis.*)、Microsoft.OpenApiRazorEngineCore、模板与生成模型。
  • 数据/映射/工具:Perigon.MiniDb、Mapster、Humanizer、共享 Helper/Context。
  • 测试:xUnit v3、Moq、Microsoft.NET.Test.Sdk

项目结构与分层

  • src/Apps/CommandLine: perigon dotnet tool 入口。命令只负责参数、上下文、输出和退出码,业务逻辑委托给 CoreMod。
  • src/Apps/Dashboard: Studio Web 服务和 Blazor UI。使用 Fluent UI,业务逻辑通过 managers/services 调用。
  • src/Modules/CoreMod: 主业务模块。Services 负责编排流程,Managers 负责 MiniDb 持久化和查询更新。
  • src/CodeGenerator: Roslyn/OpenAPI/Razor 代码生成、模板和分析 Helper。
  • src/Share: 共享实体、模型、常量、Helper、DefaultDbContextSolutionContext、本地化资源和框架扩展。
  • tests/StudioMod.Tests: 命令、服务、Manager、Helper、生成逻辑的行为测试。

依赖方向应保持为 App -> CoreMod -> CodeGenerator/Share;Share 不应依赖 App 层。

代码风格约定

  • 使用文件范围 namespace,匹配周围代码的 primary constructor 风格。
  • 优先使用已有 Helper、ConstValSolutionContextLocalizer 和 Mapster 映射模式。
  • CLI 命令继承 AsyncCommand<TSettings>AsyncCommand;Settings 继承 CommandSettings 并使用 CommandArgumentCommandOptionDescription
  • 新命令要在 src/Apps/CommandLine/Program.cs 注册,并使用本地化描述、别名和示例。
  • 用户输出使用 OutputHelperAnsiConsole;Spectre 表格中的动态文本用 Markup.Escape
  • Dashboard 使用 Fluent UI Blazor 组件和图标;不要把业务流程写进 Razor 组件。
  • HTTP、文件、外部 API 和长耗时异步流程应传递 CancellationToken
  • 测试 HTTP 行为时使用 stub HttpMessageHandler,不要访问真实网络。

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 56 lines · 1,254 tokens per session scan A 19e8f07e1ed0

Subscribe to this mod's changes

Perigon.CLI copilot-instructions.md is an instructions file published in the GitHub repository AterDev/Perigon.CLI (53 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,254 tokens to every session, about $0.0063 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

dotnet-skills AGENTS.md

Instructions for managedcode/dotnet-skills, covering agents.md, purpose, solution topology, rule precedence and path and linking rules.

managedcode/dotnet-skills · 13,592 tokens

SSW.VerticalSliceArchitecture CLAUDE.md

Instructions for SSWConsulting/SSW.VerticalSliceArchitecture, covering ssw vertical slice architecture — agent instructions, project overview, technology stack, rules and skills.

SSWConsulting/SSW.VerticalSliceArchitecture · 1,020 tokens

dotnet-skills copilot-instructions.md

Instructions for managedcode/dotnet-skills: Use AGENTS.md as the repository-wide source of truth for workflow, catalog structure, release policy, and skill maintenance rules.

managedcode/dotnet-skills · 97 tokens

copilot-instructions copilot-instructions.md

Instructions for SebastienDegodez/copilot-instructions, covering copilot instructions, language policy, development code generation and workflow implementation.

SebastienDegodez/copilot-instructions · 364 tokens

maf-doctor maf-deployment.instructions.md

Always-loaded production-deployment patterns for MAF 1.3.0. Auto-applies to Program.cs, DI registration files, and infra config. Covers ManagedIdentityCredential, MaxTokens caps, secret handling, OpenTelemetry wiring, and the analyzer rules that catch regressions at write time.

joslat/maf-doctor · 1,884 tokens

rosetta CLAUDE.md

Instructions for tikoci/rosetta, covering rosetta, project documentation, where does this go?, instruction routing and fast pointers.

tikoci/rosetta · 1,455 tokens