Skip to content

feat: add dotnet recommendation support#135

Open
FrozenPhoenix92 wants to merge 5 commits into
rohitg00:mainfrom
FrozenPhoenix92:feat/dotnet-recommendations
Open

feat: add dotnet recommendation support#135
FrozenPhoenix92 wants to merge 5 commits into
rohitg00:mainfrom
FrozenPhoenix92:feat/dotnet-recommendations

Conversation

@FrozenPhoenix92

@FrozenPhoenix92 FrozenPhoenix92 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • Add lightweight .NET project detection for solutions, project files, SDK/global.json, ASP.NET Core, Blazor, MAUI, test frameworks, MSBuild, and NuGet.
  • Include custom taps in skillkit recommend --update.
  • Add focused tests and docs for recommendation behavior.

Validation

  • pnpm test
  • pnpm lint
  • pnpm build

Summary by CodeRabbit

  • New Features
    • Added support for detecting .NET projects and recommendations signals, including ASP.NET Core, Blazor, MAUI, common test frameworks, and related build tooling.
    • Improved skillkit recommend --update to refresh the recommendation index from built-in sources plus configured GitHub taps, with automatic deduplication.
  • Bug Fixes
    • Invalid tap entries are now reported as warnings (and skipped) without failing the update.
  • Documentation
    • Expanded documentation for project context detection with .NET markers and signals.
    • Documented the skillkit recommend --update behavior and refresh expectations.

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@FrozenPhoenix92 is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 804a9e9b-07d8-46b2-8fc6-cca9b8a48813

📥 Commits

Reviewing files that changed from the base of the PR and between fdcb1b4 and 5f88713.

📒 Files selected for processing (5)
  • packages/cli/src/__tests__/recommend-sources.test.ts
  • packages/cli/src/commands/recommend.ts
  • packages/cli/src/recommend-sources.ts
  • packages/core/src/context/__tests__/detector.test.ts
  • packages/core/src/context/detector.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/src/tests/recommend-sources.test.ts
  • packages/cli/src/commands/recommend.ts

📝 Walkthrough

Walkthrough

Adds .NET project detection to ProjectDetector via recursive directory scanning and new language/runtime/framework/testing/tooling helpers, and introduces a buildRecommendationSources helper in the CLI that merges built-in skill repos with validated, deduplicated GitHub tap entries when updating the recommendation index.

Changes

.NET ProjectDetector Extension

Layer / File(s) Summary
.NET marker config, recursive scanner, and file helpers
packages/core/src/context/detector.ts
Adds .NET marker filename/extension lists, SKIPPED_SCAN_DIRS, replaces the shallow root scan with a depth-bounded recursive scanDirectory, and adds helper methods to locate .NET files, parse global.json SDK version, and build a searchable .NET text blob.
.NET language, runtime, framework, testing, and tooling detectors
packages/core/src/context/detector.ts
Implements detectDotNetLanguages (F#/VB/C#), detectDotNetRuntime (global.json SDK), detectDotNetFrameworks (ASP.NET Core/Blazor/MAUI), detectDotNetTesting (xUnit/NUnit/MSTest), detectDotNetTools (msbuild/nuget), and mergeDetections.
Wiring .NET detections into analyze(), detectLanguages(), detectRuntime()
packages/core/src/context/detector.ts
Updates analyze() to merge pattern-based detections with .NET-derived frameworks/testing/tools; extends detectLanguages() and detectRuntime() to append dotnet results.
.NET detector tests and core README docs
packages/core/src/context/__tests__/detector.test.ts, packages/core/src/recommend/__tests__/engine.test.ts, packages/core/README.md
Adds four detector tests (C# solution, F#-only project, F# solution scenario, nested global.json), a recommendation engine test asserting dotnet-aspnetcore ranks first, and core README documentation for .NET markers and stale context refresh.

Tap-Based Recommendation Sources

Layer / File(s) Summary
SkillRepoSource type contract and fetcher typing
packages/core/src/recommend/types.ts, packages/core/src/recommend/fetcher.ts
Adds the exported SkillRepoSource interface, constrains KNOWN_SKILL_REPOS with satisfies readonly SkillRepoSource[], and widens the buildSkillIndex repos parameter to readonly SkillRepoSource[].
buildRecommendationSources helper and type contract
packages/cli/src/recommend-sources.ts
Defines RecommendationSourcesResult and implements buildRecommendationSources: merges built-in sources, validates/deduplicates tap owner/repo strings via regex, converts valid taps to SkillRepoSource objects, and records warnings for invalid taps.
recommend command updateIndex() wiring and CLI README
packages/cli/src/commands/recommend.ts, packages/cli/README.md
Imports loadTaps and buildRecommendationSources, updates updateIndex() to pass sourceResult.sources to buildSkillIndex and aggregate warnings from both sources; documents --update flag and tap behavior.
buildRecommendationSources tests
packages/cli/src/__tests__/recommend-sources.test.ts
Adds Vitest cases asserting source inclusion, owner/repo deduplication including case-insensitive matching, and invalid tap skipping with warning emission.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐇 Hop hop, the dotnet path is found,
Through .csproj fields and solution ground.
My taps now validated, deduped with care,
No invalid repos shall sneak in there.
The index refreshed, the warnings logged bright—
This rabbit ships clean recommendations tonight! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add dotnet recommendation support' directly and clearly describes the main objective of adding .NET project detection and recommendation capabilities to skillkit.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
packages/cli/src/recommend-sources.ts (1)

5-9: ⚡ Quick win

Use the shared core SkillRepoSource type instead of redefining it.

Line 5 duplicates the contract already exported from core; importing the shared type avoids drift between CLI and core over time.

Suggested diff
 import type { TapEntry } from './helpers.js';
+import type { SkillRepoSource } from '`@skillkit/core`';

 const GITHUB_REPO_PATTERN = /^([\w.-]+)\/([\w.-]+)$/;

-export interface SkillRepoSource {
-  owner: string;
-  repo: string;
-  description?: string;
-}
-
 export interface RecommendationSourcesResult {
   sources: SkillRepoSource[];
   warnings: string[];
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/recommend-sources.ts` around lines 5 - 9, The
SkillRepoSource interface defined in packages/cli/src/recommend-sources.ts is
duplicating an existing type from the shared core package. Remove the local
interface definition (lines 5-9) and instead import SkillRepoSource from the
core package to maintain a single source of truth and prevent type drift between
the CLI and core implementations.
packages/cli/src/__tests__/recommend-sources.test.ts (1)

35-48: ⚡ Quick win

Add a mixed-case dedupe assertion for owner/repo.

This test currently validates exact-case duplicates only; add one Some-Org/Some-Skills variant to lock in the case-insensitive dedupe contract.

Suggested diff
   it('should dedupe duplicate owner/repo sources', () => {
     const builtIn = knownSkillRepos[0];
     const taps: TapEntry[] = [
       { source: `${builtIn.owner}/${builtIn.repo}`, addedAt: '2026-06-14T00:00:00.000Z' },
       { source: 'some-org/some-skills', addedAt: '2026-06-14T00:00:00.000Z' },
+      { source: 'Some-Org/Some-Skills', addedAt: '2026-06-14T00:00:00.000Z' },
       { source: 'some-org/some-skills', addedAt: '2026-06-14T00:00:00.000Z' },
     ];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/__tests__/recommend-sources.test.ts` around lines 35 - 48,
The test in the should dedupe duplicate owner/repo sources block currently only
validates exact-case duplicate deduplication. Add a mixed-case variant of an
existing source (such as Some-Org/Some-Skills alongside some-org/some-skills) to
the taps array to test case-insensitive deduplication, and then add an assertion
using the same pattern as the existing expects to verify that the mixed-case
variant is also deduplicated to a length of 1, ensuring the deduplication logic
handles case-insensitive owner/repo matching.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/commands/recommend.ts`:
- Line 693: The console.log() call at line 693 that prints the resolved sources
always executes and does not respect the --quiet or --json command-line flags,
causing unwanted output to leak in those modes. Add a conditional check before
this console.log() statement to only print the sources when neither quiet nor
json mode is enabled. Determine how quiet and json flags are tracked in this
command (they may be part of the options/config object passed to the command)
and wrap the sources output with a condition that skips printing when either
flag is active.

In `@packages/core/src/context/detector.ts`:
- Around line 823-830: The current implementation of hasFile('global.json') only
checks for the file at the repository root, missing nested global.json files
commonly found in monorepos. Modify the logic in the getDotNetVersion method
(around lines 823-830 and the referenced lines 955-961) to search for
global.json across scanned paths and subdirectories, not just the root level.
Update the source determination in the return statement to reflect whether the
detected version comes from a root-level or nested global.json file by changing
how hasFile('global.json') is invoked or by creating a method that searches
through all scanned path directories for the presence of global.json.
- Around line 808-816: The issue is in the C# language detection logic where the
condition uses OR to check both for `.csproj` files and solution files. This
incorrectly classifies F#-only or VB-only solutions as C#. Remove the call to
this.hasDotNetSolution() from the condition so that C# is only inferred when
`.csproj` files are actually present. Update the source assignment to use only
the result from this.firstDotNetFile('.csproj') since the solution file check is
being removed.

---

Nitpick comments:
In `@packages/cli/src/__tests__/recommend-sources.test.ts`:
- Around line 35-48: The test in the should dedupe duplicate owner/repo sources
block currently only validates exact-case duplicate deduplication. Add a
mixed-case variant of an existing source (such as Some-Org/Some-Skills alongside
some-org/some-skills) to the taps array to test case-insensitive deduplication,
and then add an assertion using the same pattern as the existing expects to
verify that the mixed-case variant is also deduplicated to a length of 1,
ensuring the deduplication logic handles case-insensitive owner/repo matching.

In `@packages/cli/src/recommend-sources.ts`:
- Around line 5-9: The SkillRepoSource interface defined in
packages/cli/src/recommend-sources.ts is duplicating an existing type from the
shared core package. Remove the local interface definition (lines 5-9) and
instead import SkillRepoSource from the core package to maintain a single source
of truth and prevent type drift between the CLI and core implementations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6e8c35b-23d8-4429-8b08-8652d91cbdbf

📥 Commits

Reviewing files that changed from the base of the PR and between d2e5c34 and fdcb1b4.

📒 Files selected for processing (10)
  • packages/cli/README.md
  • packages/cli/src/__tests__/recommend-sources.test.ts
  • packages/cli/src/commands/recommend.ts
  • packages/cli/src/recommend-sources.ts
  • packages/core/README.md
  • packages/core/src/context/__tests__/detector.test.ts
  • packages/core/src/context/detector.ts
  • packages/core/src/recommend/__tests__/engine.test.ts
  • packages/core/src/recommend/fetcher.ts
  • packages/core/src/recommend/types.ts

Comment thread packages/cli/src/commands/recommend.ts Outdated
Comment thread packages/core/src/context/detector.ts
Comment thread packages/core/src/context/detector.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant