GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Nonanti/CodeContext.NET: Analyzes C# codebases to detect patterns and generate context for AI tools

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
src
src
 
 
tests/CodeContext.Tests
tests/CodeContext.Tests
 
 
.gitignore
.gitignore
 
 
CodeContext.sln
CodeContext.sln
 
 
Directory.Build.props
Directory.Build.props
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

CodeContext.NET

CI .NET License

Ever spent hours explaining your codebase patterns to ChatGPT? Or wished GitHub Copilot understood your team's coding style? CodeContext.NET solves that.

What It Does

This tool scans your C# project and creates a context file that tells AI assistants how your code works. No more explaining your patterns over and over.

New: Now detects and maps all your API endpoints automatically.

codecontext --path ./MyProject

That's it. You get a context file ready to paste into any AI chat.

Real Example

Let's say you have this in your codebase:

private readonly IUserService _userService;

public async Task<Result<User>> GetUserAsync(int id)
{
    // your implementation
}

CodeContext detects:

  • You use underscore for private fields
  • Your async methods end with "Async"
  • You prefer Result over exceptions
  • All your API endpoints with routes and auth info

Next time you ask AI for help, it writes code YOUR way, not some generic tutorial style.

Quick Start

Install it:

dotnet tool install --global CodeContext.CLI

Run it:

codecontext

You'll get something like:

✓ Found 5 patterns
✓ Found 12 packages
✓ Context saved to: codebase-context.md

The Output

Here's what you actually get:

Private fields start with underscore (_)
Async methods end with 'Async' suffix
Use Result<T> pattern for error handling
Dependencies injected through constructor

API Endpoints:
- GET    /api/users          → GetAllUsers() [Authorize]
- POST   /api/users          → CreateUser(UserDto dto) [Admin]
- DELETE /api/users/{id}     → DeleteUser(int id) [Authorize]

Just copy this into ChatGPT/Claude/Copilot before asking for code.

Options

Keep it simple:

codecontext                    # scan current folder
codecontext -p ../other-project  # scan different folder
codecontext -f json             # want JSON instead
codecontext -v                  # see what it's doing

Why I Built This

Got tired of ChatGPT writing Java-style C# code. Wanted it to match my style without a 10-paragraph prompt every time.


Built by @Nonanti

Yeah, I totally outsourced the README to our robot overlords. Thanks for Gemini

About

Analyzes C# codebases to detect patterns and generate context for AI tools

Topics

aichatgptclicode-analysiscsharpdeveloper-toolsdotnetdotnet-toolgithub-copilotnugetpattern-detectionroslyn

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.