CosmosDBShell
Copilot instructions4 starsChanged 9 days agoMITView on GitHub
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
19 rules. About 0 are common, 14 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Keep changes minimal and targeted.
- Distinctive: line 14
Prefer clear names over abbreviations unless the command surface already established the shorthand.
- Distinctive: line 15
Avoid adding comments unless they explain a non-obvious constraint or lifecycle detail.
- Distinctive: line 25
When renaming a command, update all of the following together:
- Distinctive: line 36
Keep help text aligned with the real CLI behavior.
- Distinctive: line 37
If a CLI option changes, update both the localized help strings and the user documentation.
- Distinctive: line 41
Keep README.md focused on end-user information: installation, quick start, capabilities, command usage, configuration, compatibility, and …
- Distinctive: line 42
Do not add implementation details, internal lifecycle or cleanup behavior, SDK plumbing, or test details to README.md.
- Distinctive: line 43
Before adding README text, identify what users can do differently or what they need to know because of it.
- Very specific: line 44
Update the relevant docs in docs/, especially:
- Very specific: line 51
Do not edit CHANGELOG.md in routine bugfix, feature, refactoring, or documentation PRs, including under ## Unreleased.
- Very specific: line 54
Always retain ## Unreleased at the top of CHANGELOG.md and its permanent categories in this order: ### Breaking changes, ### New features, …
- Distinctive: line 55
Put entries in the appropriate category.
- Very specific: line 60
Add or update tests in CosmosDBShell.Tests/ when changing behavior.
- Distinctive: line 61
Prefer focused command tests for command behavior changes.
- Distinctive: line 76
If behavior changes, update tests and docs in the same change.
- Very specific: line 80
When creating Git commits, do not add Copilot or AI Co-authored-by trailers.
- Distinctive: line 81
Ensure commit messages are clear, concise, and follow the project's existing style.
- Distinctive: line 82
Use the imperative mood in commit messages (e.g., "Add feature" instead of "Added feature").
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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
GitHub Copilot Instructions
Project Overview
- This repository is a C#/.NET CLI for Azure Cosmos DB shell workflows.
- The main app lives in
CosmosDBShell/. - Tests live in
CosmosDBShell.Tests/. - Docs live in
docs/and the rootREADME.md.
Coding Guidelines
- Keep changes minimal and targeted. Do not refactor unrelated code while fixing a focused issue.
- Match the existing C# style and file structure used in the surrounding code.
- Prefer clear names over abbreviations unless the command surface already established the shorthand.
- Avoid adding comments unless they explain a non-obvious constraint or lifecycle detail.
Commands
- Shell commands live in
CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/. - New or changed commands should use the existing metadata attributes:
CosmosCommandCosmosExampleCosmosOptionCosmosParameter
- When renaming a command, update all of the following together:
- command attribute name
- examples
- help/localization strings
- docs
- tests
- class and file names when appropriate
Localization And Help Text
- User-facing command descriptions and option descriptions are stored in
CosmosDBShell/lang/en.ftl. - Keep help text aligned with the real CLI behavior.
- If a CLI option changes, update both the localized help strings and the user documentation.
Documentation
- Keep
README.mdfocused on end-user information: installation, quick start, capabilities, command usage, configuration, compatibility, and actionable limitations. Update it only when a change affects information users need to understand or use the shell; not every user-visible bugfix requires a README edit. - Do not add implementation details, internal lifecycle or cleanup behavior, SDK plumbing, or test details to
README.md. Put implementation rationale in the PR description or a necessary code comment. - Before adding README text, identify what users can do differently or what they need to know because of it. If neither applies, leave the README unchanged. Keep detailed usage and troubleshooting guidance in the relevant
docs/page and link from the README only when useful. - Update the relevant docs in
docs/, especially:docs/commands.mdfor command usagedocs/navigation.mdfor CLI arguments and shell navigationdocs/mcp.mdfor MCP behavior
Changelog And Release Preparation
- Do not edit
CHANGELOG.mdin routine bugfix, feature, refactoring, or documentation PRs, including under## Unreleased. Update it only when the user explicitly requests release preparation or a changelog update. This avoids conflicts between parallel PRs. - Record user-visible changes, breaking changes, migration guidance, and relevant issue links in the PR description instead. Continue updating directly relevant usage documentation and tests in the same PR; do not create per-change changelog fragments.
- During release preparation, consolidate merged PRs since the previous release into user-facing changelog entries, reconciling any existing Unreleased entries without duplicates. Do not include unmerged changes.
- Always retain
## Unreleasedat the top ofCHANGELOG.mdand its permanent categories in this order:### Breaking changes,### New features,### Fixes,### Improvements, even when empty. Move the prepared entries into a dated version section below it. - Put entries in the appropriate category. Do not duplicate or reorder headings, reorder existing entries, or rewrite unrelated release history. Keep a blank line between sections.
- See CONTRIBUTING.md for the contributor workflow.
Tests And Validation
- Add or update tests in
CosmosDBShell.Tests/when changing behavior. - Prefer focused command tests for command behavior changes.
- Validate changes with build at minimum:
dotnet build CosmosDBShell/CosmosDBShell.csprojdotnet build CosmosDBShell.Tests/CosmosDBShell.Tests.csproj
Project-Specific Pitfalls
- Be careful with state transitions in the shell. Some states share the same
CosmosClient, so disposing the old state during navigation can break the new state. - Be careful with iterator lifetimes when returning
IAsyncEnumerable<T>; do not dispose iterators before enumeration completes. - MCP in this repo is HTTP-only. The
--mcpoption optionally accepts a port and defaults to6128.
Preferred Change Pattern
- Fix root causes instead of patching symptoms.
- Preserve public behavior unless the task explicitly changes the CLI or output contract.
- If behavior changes, update tests and docs in the same change.
Commits
- When creating Git commits, do not add Copilot or AI
Co-authored-bytrailers. - Ensure commit messages are clear, concise, and follow the project's existing style.
- Use the imperative mood in commit messages (e.g., "Add feature" instead of "Added feature").
- Reference relevant issues or pull requests in the commit message when applicable.
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.

