Skip to content

feat: add skills and subagents configuration support#370

Merged
Shironex merged 7 commits intov0.9.0rcfrom
feat/subagents-skills
Jan 8, 2026
Merged

feat: add skills and subagents configuration support#370
Shironex merged 7 commits intov0.9.0rcfrom
feat/subagents-skills

Conversation

@Shironex
Copy link
Copy Markdown
Collaborator

@Shironex Shironex commented Jan 6, 2026

  • Updated .gitignore to include skills directory.
  • Introduced agent discovery functionality to scan for AGENT.md files in user and project directories.
  • Added new API endpoint for discovering filesystem agents.
  • Implemented UI components for managing skills and viewing custom subagents.
  • Enhanced settings helpers to retrieve skills configuration and custom subagents.
  • Updated agent service to incorporate skills and subagents in task delegation.

Resolve

TODO

  • Fix syncing of enable / load of skills in setting view
  • Adress pr comments from gemini
  • Remove code left from custom sub agents that is left in types to keep this implementation simple for now

Preview

image image

- Updated .gitignore to include skills directory.
- Introduced agent discovery functionality to scan for AGENT.md files in user and project directories.
- Added new API endpoint for discovering filesystem agents.
- Implemented UI components for managing skills and viewing custom subagents.
- Enhanced settings helpers to retrieve skills configuration and custom subagents.
- Updated agent service to incorporate skills and subagents in task delegation.

These changes enhance the capabilities of the system by allowing users to define and manage skills and custom subagents effectively.
@Shironex Shironex self-assigned this Jan 6, 2026
@Shironex Shironex added Enhancement Improvements to existing functionality or UI. Testers-Requested Request for others to test an enhancement or bug fix/etc. Do Not Merge Use this label if something should not be merged. labels Jan 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 6, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Shironex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the agent's capabilities by introducing robust support for 'Skills' and 'Custom Subagents'. It enables users to define specialized agents and capabilities through markdown files in designated directories, which are then discovered, configured via settings, and integrated into the agent's task delegation process. The changes span across backend logic for discovery and integration, new API endpoints, and frontend UI for configuration and visualization, providing a more extensible and customizable agent experience.

Highlights

  • Skills Configuration: Introduced new settings to enable/disable 'Skills' functionality and configure their loading sources (user-level ~/.claude/skills/ and project-level .claude/skills/).
  • Subagent Discovery & Management: Implemented a new agent discovery mechanism to scan for AGENT.md files in user and project directories, allowing for filesystem-based custom subagents. These subagents can define their own descriptions, prompts, tools, and models.
  • API Endpoint for Agent Discovery: Added a new API endpoint (POST /api/settings/agents/discover) to facilitate the discovery of filesystem-based subagents.
  • Enhanced Agent Service: The core agent service now incorporates the newly configured skills and custom subagents, dynamically adding 'Skill' and 'Task' tools to the allowed toolset based on their availability and configuration.
  • UI for Skills and Subagents: Integrated new UI components into the settings view, providing a dedicated section for managing skills (enabling/disabling, source selection) and a read-only view for discovered custom subagents, including their details and system prompts.
  • Git Ignore Update: Updated the .gitignore file to include the skills/ directory, preventing skill definition files from being unintentionally committed.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant new functionality by adding support for Skills and custom Subagents. The changes are comprehensive, covering backend discovery logic, API endpoints, type definitions, and new UI components for configuration. The implementation is solid, with new services for agent discovery and helpers for retrieving settings. The UI additions in the settings view look well-designed and provide a good user experience for managing these new features.

I've identified a few areas for improvement, primarily focused on enhancing code maintainability and robustness. These include refactoring duplicated code in the agent discovery service, adding validation for parsed data, simplifying some logic for better readability, and ensuring UI loading states are handled correctly. Addressing these points will make the new functionality even more solid and easier to build upon in the future.

Comment thread apps/server/src/lib/agent-discovery.ts Outdated
Comment on lines +95 to +206
async function scanAgentsDirectory(
baseDir: string,
source: 'user' | 'project'
): Promise<FilesystemAgent[]> {
const agents: FilesystemAgent[] = [];
const isSystemPath = source === 'user'; // User directories use systemPaths

try {
// Check if directory exists
const exists = isSystemPath
? await systemPaths.systemPathExists(baseDir)
: await secureFs
.access(baseDir)
.then(() => true)
.catch(() => false);

if (!exists) {
logger.debug(`Directory does not exist: ${baseDir}`);
return agents;
}

// Read all entries in the directory
if (isSystemPath) {
// For system paths (user directory)
const entryNames = await systemPaths.systemPathReaddir(baseDir);
for (const entryName of entryNames) {
const entryPath = path.join(baseDir, entryName);
const stat = await systemPaths.systemPathStat(entryPath);

// Check for flat .md file format (agent-name.md)
if (stat.isFile() && entryName.endsWith('.md')) {
const agentName = entryName.slice(0, -3); // Remove .md extension
const definition = await parseAgentFile(entryPath, true);
if (definition) {
agents.push({
name: agentName,
definition,
source,
filePath: entryPath,
});
logger.debug(`Discovered ${source} agent (flat): ${agentName}`);
}
}
// Check for subdirectory format (agent-name/AGENT.md)
else if (stat.isDirectory()) {
const agentFilePath = path.join(entryPath, 'AGENT.md');
const agentFileExists = await systemPaths.systemPathExists(agentFilePath);

if (agentFileExists) {
const definition = await parseAgentFile(agentFilePath, true);
if (definition) {
agents.push({
name: entryName,
definition,
source,
filePath: agentFilePath,
});
logger.debug(`Discovered ${source} agent (subdirectory): ${entryName}`);
}
}
}
}
} else {
// For project paths (use secureFs)
const entries = await secureFs.readdir(baseDir, { withFileTypes: true });
for (const entry of entries) {
// Check for flat .md file format (agent-name.md)
if (entry.isFile() && entry.name.endsWith('.md')) {
const agentName = entry.name.slice(0, -3); // Remove .md extension
const agentFilePath = path.join(baseDir, entry.name);
const definition = await parseAgentFile(agentFilePath, false);
if (definition) {
agents.push({
name: agentName,
definition,
source,
filePath: agentFilePath,
});
logger.debug(`Discovered ${source} agent (flat): ${agentName}`);
}
}
// Check for subdirectory format (agent-name/AGENT.md)
else if (entry.isDirectory()) {
const agentDir = path.join(baseDir, entry.name);
const agentFilePath = path.join(agentDir, 'AGENT.md');

const agentFileExists = await secureFs
.access(agentFilePath)
.then(() => true)
.catch(() => false);

if (agentFileExists) {
const definition = await parseAgentFile(agentFilePath, false);
if (definition) {
agents.push({
name: entry.name,
definition,
source,
filePath: agentFilePath,
});
logger.debug(`Discovered ${source} agent (subdirectory): ${entry.name}`);
}
}
}
}
}
} catch (error) {
logger.error(`Failed to scan agents directory: ${baseDir}`, error);
}

return agents;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This function has a lot of duplicated code for handling isSystemPath and non-isSystemPath cases. The logic inside the if (isSystemPath) and else blocks is almost identical, which makes the code harder to maintain.

Consider refactoring this to reduce duplication. One approach would be to create a small adapter for systemPaths and secureFs that provides a common interface for reading directories and checking file existence, and then have a single loop that uses this adapter.

For example:

const fsAdapter = isSystemPath 
  ? {
      readdir: //... implementation using systemPaths
      exists: //... implementation using systemPaths
      // ... other needed functions
    }
  : {
      readdir: //... implementation using secureFs
      exists: //... implementation using secureFs
      // ... other needed functions
    };

// Then use a single loop with fsAdapter

This would make the agent scanning logic much cleaner and easier to modify in the future.

Comment thread apps/server/src/services/agent-service.ts Outdated
@Shironex Shironex added the Work-In-Progress Currently being addressed. label Jan 6, 2026
@Mahlogonolo21
Copy link
Copy Markdown

changes have been made

Shironex and others added 6 commits January 6, 2026 23:43
- Updated useSkillsSettings and useSubagents hooks to improve state management and error handling.
- Added new settings API methods for skills configuration and agent discovery.
- Refactored app-store to include enableSkills and skillsSources state management.
- Enhanced settings migration to sync skills configuration with the server.

These changes streamline the management of skills and subagents, ensuring better integration and user experience.
…uplication

- Enhanced model parsing in agent discovery to validate against allowed values and log warnings for invalid models.
- Refactored settingSources construction in AgentService to utilize Set for automatic deduplication, simplifying the merging of user and project settings with skills sources.
- Updated tests to reflect changes in allowedTools for improved functionality.

These changes enhance the robustness of agent configuration and streamline settings management.
- Added a new function to retrieve subagents configuration from settings, allowing users to enable/disable subagents and select sources for loading them.
- Updated the AgentService to incorporate subagents configuration, dynamically adding tools based on the settings.
- Enhanced the UI components to manage subagents, including a settings section for enabling/disabling and selecting sources.
- Introduced a new hook for managing subagents settings state and interactions.

These changes improve the flexibility and usability of subagents within the application, enhancing user experience and configuration options.
Resolved conflict in agent-service.ts by keeping both:
- agents parameter for custom subagents (from our branch)
- thinkingLevel and reasoningEffort parameters (from v0.9.0rc)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Addresses PR feedback to reduce duplicated code in scanAgentsDirectory
by introducing an FsAdapter interface that abstracts the differences
between systemPaths (user directory) and secureFs (project directory).

Changes:
- Extract parseAgentContent helper for parsing agent file content
- Add FsAdapter interface with exists, readdir, and readFile methods
- Create createSystemPathAdapter for user-level paths
- Create createSecureFsAdapter for project-level paths
- Refactor scanAgentsDirectory to use a single loop with the adapter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Shironex Shironex force-pushed the feat/subagents-skills branch from 0baf06a to e649c4c Compare January 8, 2026 22:20
@Shironex Shironex merged commit ae22f78 into v0.9.0rc Jan 8, 2026
9 of 11 checks passed
@Shironex Shironex deleted the feat/subagents-skills branch January 8, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Merge Use this label if something should not be merged. Enhancement Improvements to existing functionality or UI. Testers-Requested Request for others to test an enhancement or bug fix/etc. Work-In-Progress Currently being addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants