DevSkim
Copilot instructions1k starsChanged 4 months agoMITView on GitHub
DevSkim is a framework of IDE extensions and language analyzers that provide inline security analysis in the dev environment as the developer writes code. The repository contains: ⚠️ IMPORTANT: This repository uses private Azure DevOps feeds for package management: Rules for agents: 1. You MAY temporarily modify nuget.config or .npmrc files to use public feeds (nuget.org, npmjs.com) when working locally 2. You MUST NOT commit these changes - always revert them before committing 3. Use git restore nuget.config or git…
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about microsoft/DevSkim
- @righettod.eu“...I tested it in my context and it provided me with interesting information. 😊 So, I added this tool to …”Bluesky · Aug 6, 2025 · 3 likes
- oxsecurity/megalinter“DevSkim: Cannot use `--ignore-globs`: Get `Unexpected value` error”GitHub · Oct 23, 2022 · 3 reactions
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
21 rules. About 0 are common, 10 are distinctive, and 11 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.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Security Rules: Default rules and guidance (./rules/default/, ./guidance/)
- Very specific: line 25
Use git restore nuget.config or git restore DevSkim-VSCode-Plugin/.npmrc.pipeline before creating commits
- Very specific: line 30
⚠️ MANDATORY: All pull requests MUST include an update to Changelog.md
- Very specific: line 40
Add a new entry at the top of Changelog.md (after the header)
- Distinctive: line 46
Run this after committing your change and with your branch rebased on the latest main, since the height includes your own commit.
- Distinctive: line 47
Use today's date in YYYY-MM-DD format
- Distinctive: line 49
Write clear, actionable descriptions
- Distinctive: line 129
Follow standard C# naming conventions
- Distinctive: line 130
Use meaningful variable and method names
- Distinctive: line 131
Add XML documentation comments for public APIs
- Very specific: line 135
Use ESLint configuration in DevSkim-VSCode-Plugin/.eslintrc.js
- Distinctive: line 136
Follow TypeScript best practices
- Very specific: line 138
Avoid any types when possible
- Distinctive: line 143
Follow existing rule patterns when adding new rules
- Very specific: line 148
Create JSON rule in ./rules/default/
- Very specific: line 149
Create guidance markdown in ./guidance/ with rule ID
- Very specific: line 150
Test rule with DevSkim CLI
- Distinctive: line 151
Update tests if applicable
- Very specific: line 157
Document in Changelog.md under ### Dependencies
- Distinctive: line 160
VS Code plugin: Use F5 in VS Code to launch Extension Development Host
- Very specific: line 161
.NET projects: Use Visual Studio or dotnet run
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 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
Copilot Instructions for DevSkim
Repository Overview
DevSkim is a framework of IDE extensions and language analyzers that provide inline security analysis in the dev environment as the developer writes code. The repository contains:
- DevSkim Library (C#/.NET): Core security analysis engine (
./DevSkim-DotNet/) - DevSkim CLI (C#/.NET): Command-line tool (
./DevSkim-DotNet/Microsoft.DevSkim.CLI/) - Visual Studio Extension (C#/.NET): VS extension (
./DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/) - VS Code Plugin (TypeScript): VSCode extension (
./DevSkim-VSCode-Plugin/) - Security Rules: Default rules and guidance (
./rules/default/,./guidance/)
Critical Repository-Specific Rules
Package Management Configuration
⚠️ IMPORTANT: This repository uses private Azure DevOps feeds for package management:
- nuget.config: Contains private feed configuration (
PublicRegistriesFeed) - .npmrc files: VSCode plugin uses
.npmrc.pipelinefor private feeds
Rules for agents:
- You MAY temporarily modify
nuget.configor.npmrcfiles to use public feeds (nuget.org, npmjs.com) when working locally - You MUST NOT commit these changes - always revert them before committing
- Use
git restore nuget.configorgit restore DevSkim-VSCode-Plugin/.npmrc.pipelinebefore creating commits - The private feed configuration must remain in the repository commits
Changelog Requirements
⚠️ MANDATORY: All pull requests MUST include an update to Changelog.md
- This project uses squash merges
- PR gate checks verify
Changelog.mdis updated - Format follows Keep a Changelog
- Version headings are
[MAJOR.MINOR.PATCH]and must match the version the build actually produces
Versioning: this repo versions with Nerdbank.GitVersioning. version.json pins MAJOR.MINOR (currently 1.0) and the patch number is the git height, which is the commit count since version.json last changed. Do not guess it by incrementing the previous changelog entry: an open PR's height shifts every time another PR merges ahead of it, and blindly incrementing bakes that drift in permanently.
When making changes:
- Add a new entry at the top of
Changelog.md(after the header) - Determine the version by asking Nerdbank.GitVersioning what this commit produces, rather than incrementing the previous entry:
Run this after committing your change and with your branch rebased on the latestdotnet tool install --global nbgv # once nbgv get-version -v SimpleVersion # e.g. 1.0.95main, since the height includes your own commit. If your PR sits open while other PRs merge, re-run it and update the heading before merging. - Use today's date in YYYY-MM-DD format
- Group changes by type:
### Fix,### Added,### Changed,### Dependencies,### Pipeline, etc. - Write clear, actionable descriptions
Example (assuming nbgv get-version -v SimpleVersion reported 1.0.72):
## [1.0.72] - 2026-02-04
### Added
- Added Copilot instructions for repository-specific guidance
### Changed
- Updated build documentationException: the gate (tarides/changelog-check-action) is skipped on PRs carrying the no changelog label. That is reserved for changes that are not user-visible, and Dependabot applies it automatically via .github/dependabot.yml. Do not use it to avoid writing an entry for a real change.
Building and Testing
VS Code Plugin (TypeScript)
Location: ./DevSkim-VSCode-Plugin/
Setup:
cd DevSkim-VSCode-Plugin
npm run setup # Install dependencies and build .NET language server
npm run setup:release # Release buildBuild:
npm run compile # Compile TypeScript
npm run build # Full build (setup + compile)
npm run watch # Watch mode for developmentLint:
npm run lint # Run ESLint on TypeScript filesPackage:
npm run pack-ext # Package extension for release
npm run pack-ext:debug # Package extension for debug.NET Projects (C#)
Location: ./DevSkim-DotNet/
Build:
cd DevSkim-DotNet
dotnet build Microsoft.DevSkim.sln
dotnet build -c Release Microsoft.DevSkim.slnTest:
cd DevSkim-DotNet
dotnet test Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csprojRun CLI:
cd DevSkim-DotNet/Microsoft.DevSkim.CLI
dotnet run -- analyze --source-code <path>Language Server
Build:
cd DevSkim-DotNet/Microsoft.DevSkim.LanguageServer
dotnet publish -c Debug -f net8.0 -o ../../DevSkim-VSCode-Plugin/devskimBinaries
dotnet publish -c Release -f net8.0 -o ../../DevSkim-VSCode-Plugin/devskimBinariesCode Style and Conventions
C# Code
- Follow standard C# naming conventions
- Use meaningful variable and method names
- Add XML documentation comments for public APIs
- Security-focused: prioritize secure defaults
TypeScript Code
- Use ESLint configuration in
DevSkim-VSCode-Plugin/.eslintrc.js - Follow TypeScript best practices
- Use type annotations
- Avoid
anytypes when possible
Security Rules
- Rules are JSON files in
./rules/default/ - Each rule has corresponding guidance in
./guidance/ - Follow existing rule patterns when adding new rules
Common Tasks
Adding a New Security Rule
- Create JSON rule in
./rules/default/ - Create guidance markdown in
./guidance/with rule ID - Test rule with DevSkim CLI
- Update tests if applicable
- Update Changelog.md
Updating Dependencies
- For .NET: Use
dotnet add packageor edit.csprojfiles - For npm: Use
npm installor editpackage.json - Document in Changelog.md under
### Dependencies
Debugging
- VS Code plugin: Use F5 in VS Code to launch Extension Development Host
- .NET projects: Use Visual Studio or
dotnet run - Language Server: Attach debugger to running process
Git Workflow
- Changes are made on feature branches
- PRs target the
mainbranch - PRs require:
- Changelog.md update
- Passing CI/CD checks
- Code review approval
- Merges use squash merge strategy
Additional Resources
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.

