首页 全部提示词 Agent Skill

技能大师

skill-master

技能 @barisatalay 37,754 字符 在 prompts.chat 查看 译文有问题?

中文译文

Skill Master

概述

分析代码库以发现模式,并在 .claude/skills/ 中生成/更新 SKILL 文件。支持具有特定技术栈模式检测的多平台项目。

能力:

  • 扫描代码库以发现架构模式(ViewModel、Repository、Room 等)
  • 将检测到的模式与现有技能进行比较
  • 使用真实代码示例自动生成 SKILL 文件
  • 版本跟踪与智能更新

AI 如何发现并使用此技能

此技能在用户出现以下情况时触发:

  • 要求分析项目中缺失的技能
  • 请求根据代码库模式生成技能
  • 希望同步或更新现有技能
  • 提及 "skill discovery"、"generate skills" 或 "skill-sync"

检测信号:

  • .claude/skills/ 目录存在
  • 项目结构与已知模式匹配
  • 表明平台的构建/配置文件(见参考资料)

模式

发现模式

分析代码库并报告缺失的技能。

步骤:

  1. 通过构建/配置文件检测平台(见参考资料)
  2. 扫描源码根目录以查找模式指示符
  3. 将检测到的模式与现有 .claude/skills/ 进行比较
  4. 输出差距分析报告

输出格式:

Detected Patterns: {count}
| Pattern | Files Found | Example Location |
|---------|-------------|------------------|
| {name}  | {count}     | {path}           |

Existing Skills: {count}
Missing Skills: {count}
- {skill-name}: {pattern}, {file-count} files found

生成模式

从检测到的模式创建 SKILL 文件。

步骤:

  1. 运行发现流程以识别缺失的技能
  2. 对每个缺失的技能:
    • 找到 2-3 个具有代表性的源文件
    • 提取:导入、注解、类结构、约定
    • 如果存在 .ruler/*.md,则从中提取规则
  3. 使用模板结构生成 SKILL.md
  4. 添加版本和来源标记

生成的 SKILL 结构:

---
name: {pattern-name}
description: {Generated description with trigger keywords}
version: 1.0.0
---

# {Title}

## Overview
{Brief description from pattern analysis}

## File Structure
{Extracted from codebase}

## Implementation Pattern
{Real code examples - anonymized}

## Rules
### Do
{From .ruler/*.md + codebase conventions}

### Don't
{Anti-patterns found}

## File Location
{Actual paths from codebase}

创建策略

当目标 SKILL 文件不存在时:

  1. 使用模板生成新文件
  2. 在 frontmatter 中设置 version: 1.0.0
  3. 包含所有必填章节
  4. 在末尾添加来源标记(见标记格式)

更新策略

标记检查: 在文件末尾查找 <!-- Generated by skill-master command。

如果标记存在(后续运行):

  • 智能合并:保留自定义内容,添加缺失的章节
  • 递增版本号:主版本(破坏性变更)/ 次版本(新功能)/ 修订号(修复)
  • 更新标记中的来源列表

如果标记不存在(对现有文件的首次运行):

  • 备份:SKILL.md → SKILL.md.bak
  • 使用备份作为来源,提取相关内容
  • 生成带标记的新文件
  • 设置 version: 1.0.0

标记格式

放置在生成的 SKILL.md 的末尾:

<!-- Generated by skill-master command
Version: {version}
Sources:
- path/to/source1.kt
- path/to/source2.md
- .ruler/rule-file.md
Last updated: {YYYY-MM-DD}
-->

平台参考

检测到平台时,阅读相关参考:

平台 检测文件 参考
Android/Gradle build.gradle, settings.gradle references/android.md
iOS/Xcode *.xcodeproj, Package.swift references/ios.md
React (web) package.json + react references/react-web.md
React Native package.json + react-native references/react-native.md
Flutter/Dart pubspec.yaml references/flutter.md
Node.js package.json references/node.md
Python pyproject.toml, requirements.txt references/python.md
Java/JVM pom.xml, build.gradle references/java.md
.NET/C# *.csproj, *.sln references/dotnet.md
Go go.mod references/go.md
Rust Cargo.toml references/rust.md
PHP composer.json references/php.md
Ruby Gemfile references/ruby.md
Elixir mix.exs references/elixir.md
C/C++ CMakeLists.txt, Makefile references/cpp.md
未知 - references/generic.md

如果检测到多个平台,则阅读多个参考。

规则

应当

  • 只提取在代码库中验证过的模式
  • 使用真实代码示例(对业务逻辑进行匿名化处理)
  • 在描述中包含触发关键词
  • 保持 SKILL.md 在 500 行以内
  • 引用外部文件以获取详细内容
  • 更新期间保留自定义部分
  • 首次修改前始终备份

不应

  • 包含密钥、令牌或凭据
  • 包含业务特定的逻辑细节
  • 生成没有真实内容的占位符
  • 未经备份就覆盖用户自定义内容
  • 创建深层引用链(最多 1 层)
  • 写入 .claude/skills/ 之外

内容提取规则

从代码库中:

  • 提取:类结构、注解、导入模式、文件位置、命名约定
  • 绝不:硬编码值、密钥、API 密钥、PII

从 .ruler/*.md(如果存在):

  • 提取:应当/不应规则、架构约束、依赖规则

输出报告

生成后,打印:

SKILL GENERATION REPORT

Skills Generated: {count}

{skill-name} [CREATED | UPDATED | BACKED_UP+CREATED]
├── Analyzed: {file-count} source files
├── Sources: {list of source files}
├── Rules from: {.ruler files if any}
└── Output: .claude/skills/{skill-name}/SKILL.md ({line-count} lines)

Validation:
✓ YAML frontmatter valid
✓ Description includes trigger keywords
✓ Content under 500 lines
✓ Has required sections

安全约束

  • 绝不写入 .claude/skills/ 之外的任何位置
  • 绝不在没有备份的情况下删除内容
  • 首次修改前必须备份
  • 保留用户自定义内容
  • 确定性:相同输入 → 相同输出 FILE:references/android.md

Android (Gradle/Kotlin)

检测信号

  • settings.gradle 或 settings.gradle.kts
  • build.gradle 或 build.gradle.kts
  • gradle.properties、gradle/libs.versions.toml
  • gradlew、gradle/wrapper/gradle-wrapper.properties
  • app/src/main/AndroidManifest.xml

多模块信号

  • settings.gradle* 中有多个 include(...)
  • 多个目录包含 build.gradle* + src/
  • 常见根目录:feature/、core/、library/、domain/、data/

生成前来源

  • settings.gradle*(模块列表)
  • build.gradle*(根 + 模块)
  • gradle/libs.versions.toml(依赖)
  • config/detekt/detekt.yml(如果存在)
  • **/AndroidManifest.xml

代码库扫描模式

源码根目录

  • */src/main/java/、*/src/main/kotlin/

层/文件夹模式(如果存在则记录)

features/、core/、common/、data/、domain/、presentation/、ui/、di/、navigation/、network/

模式指示器

模式 检测标准 技能名称
ViewModel @HiltViewModel、ViewModel()、MVI< viewmodel-mvi
Repository *Repository、*RepositoryImpl data-repository
UseCase operator fun invoke、*UseCase domain-usecase
Room Entity @Entity、@PrimaryKey、@ColumnInfo room-entity
Room DAO @Dao、@Query、@Insert、@Update room-dao
Migration Migration(、@Database(version= room-migration
Type Converter @TypeConverter、@TypeConverters type-converter
DTO @SerializedName、*Request、*Response network-dto
Compose Screen @Composable、NavGraphBuilder. compose-screen
Bottom Sheet ModalBottomSheet、*BottomSheet( bottomsheet-screen
Navigation @Route、NavGraphBuilder.、composable( navigation-route
Hilt Module @Module、@Provides、@Binds、@InstallIn hilt-module
Worker @HiltWorker、CoroutineWorker、WorkManager worker-task
DataStore DataStore<Preferences>、preferencesDataStore datastore-preference
Retrofit API @GET、@POST、@PUT、@DELETE retrofit-api
Mapper *.toModel()、*.toEntity()、*.toDto() data-mapper
Interceptor Interceptor、intercept() network-interceptor
Paging PagingSource、Pager(、PagingData paging-source
Broadcast Receiver BroadcastReceiver、onReceive( broadcast-receiver
Android Service : Service()、ForegroundService android-service
Notification NotificationCompat、NotificationChannel notification-builder
Analytics FirebaseAnalytics、logEvent analytics-event
Feature Flag RemoteConfig、FeatureFlag feature-flag
App Widget AppWidgetProvider、GlanceAppWidget app-widget
Unit Test @Test、MockK、mockk(、every { unit-test

强制输出章节

如检测到则包含(列出实际发现的名称):

  • 功能清单:feature/ 下的目录
  • 核心模块:core/、library/ 下的目录
  • 导航图:*Graph.kt、*Navigator*.kt
  • Hilt 模块:@Module 类、di/ 内容
  • Retrofit API:*Api.kt 接口
  • Room 数据库:@Database 类
  • Worker:@HiltWorker 类
  • Proguard:proguard-rules.pro(如存在)

命令来源

  • 调用 ./gradlew 的 README/文档
  • 含 Gradle 命令的 CI 工作流
  • 常见:./gradlew assemble、./gradlew test、./gradlew lint
  • 仅包含仓库中存在的命令

关键路径

  • app/src/main/、app/src/main/res/
  • app/src/main/java/、app/src/main/kotlin/
  • app/src/test/、app/src/androidTest/
  • library/database/migration/(Room 迁移) FILE:README.md

FILE:references/cpp.md

C/C++

检测信号

  • CMakeLists.txt
  • Makefile、makefile
  • *.cpp、*.c、*.h、*.hpp
  • conanfile.txt、conanfile.py(Conan)
  • vcpkg.json(vcpkg)

多模块信号

  • 多个含 add_subdirectory 的 CMakeLists.txt
  • 子目录中的多个 Makefile
  • lib/、src/、modules/ 目录

预生成来源

  • CMakeLists.txt(依赖、目标)
  • conanfile.*(依赖)
  • vcpkg.json(依赖)
  • Makefile(构建目标)

代码库扫描模式

源码根目录

  • src/、lib/、include/

层/文件夹模式(如存在则记录)

core/、utils/、network/、storage/、ui/、tests/

模式指示器

模式 检测标准 技能名称
Class class *、public:、private: cpp-class
Header *.h、*.hpp、#pragma once header-file
Template template<、typename T cpp-template
Smart Pointer std::unique_ptr、std::shared_ptr smart-pointer
RAII 析构函数模式、~*() raii-pattern
Singleton static *& instance() singleton
Factory create*()、make*() factory-pattern
Observer subscribe、notify、回调模式 observer-pattern
Thread std::thread、std::async、pthread threading
Mutex std::mutex、std::lock_guard synchronization
Network socket、asio::、boost::asio network-cpp
Serialization nlohmann::json、protobuf serialization
Unit Test TEST(、TEST_F(、gtest gtest
Catch2 Test TEST_CASE(、REQUIRE( catch2-test

必须输出的章节

若检测到则包含:

  • 核心模块:主要功能
  • 库:内部库
  • 头文件:公共 API
  • 测试:测试组织
  • 构建目标:可执行文件、库

命令来源

  • CMakeLists.txt 自定义目标
  • Makefile 目标
  • README/文档、CI
  • 常见:cmake、make、ctest
  • 仅包含仓库中存在的命令

关键路径

  • src/、include/
  • lib/、libs/
  • tests/、test/
  • build/(源外构建) FILE:references/dotnet.md

.NET (C#/F#)

检测信号

  • *.csproj、*.fsproj
  • *.sln
  • global.json
  • appsettings.json
  • Program.cs、Startup.cs

多模块信号

  • 多个 *.csproj 文件
  • 包含多个项目的解决方案
  • 含项目的 src/、tests/ 目录

预生成来源

  • *.csproj(依赖项、SDK)
  • *.sln(项目结构)
  • appsettings.json(配置)
  • global.json(SDK 版本)

代码库扫描模式

源根目录

  • src/、*/(每个项目)

层/文件夹模式(若存在则记录)

Controllers/、Services/、Repositories/、Models/、Entities/、DTOs/、Middleware/、Extensions/

模式指示器

模式 检测标准 技能名称
Controller [ApiController]、ControllerBase、[HttpGet] aspnet-controller
Service I*Service、class *Service dotnet-service
Repository I*Repository、class *Repository dotnet-repository
Entity class *Entity、[Table]、[Key] ef-entity
DTO class *Dto、class *Request、class *Response dto-pattern
DbContext : DbContext、DbSet< ef-dbcontext
Middleware IMiddleware、RequestDelegate aspnet-middleware
Background Service BackgroundService、IHostedService background-service
MediatR Handler IRequestHandler<、INotificationHandler< mediatr-handler
SignalR Hub : Hub、[HubName] signalr-hub
Minimal API app.MapGet(、app.MapPost( minimal-api
gRPC Service *.proto、: *Base grpc-service
EF Migration Migrations/、AddMigration ef-migration
Unit Test [Fact]、[Theory]、xUnit xunit-test
Integration Test WebApplicationFactory、IClassFixture integration-test

强制输出章节

如检测到则包含:

  • Controllers:API 端点
  • Services:业务逻辑
  • Repositories:数据访问(EF Core)
  • Entities/DTOs:数据模型
  • Middleware:请求管道
  • Background services:托管服务

命令来源

  • *.csproj 目标
  • README/文档、CI
  • 常见:dotnet build、dotnet test、dotnet run
  • 仅包含仓库中存在的命令

关键路径

  • src/*/、项目目录
  • tests/
  • Migrations/
  • Properties/ FILE:references/elixir.md

Elixir/Erlang

检测信号

  • mix.exs
  • mix.lock
  • config/config.exs
  • lib/、test/ 目录

多模块信号

  • Umbrella 应用(apps/ 目录)
  • 子目录中存在多个 mix.exs
  • rel/ 用于发布

预生成来源

  • mix.exs(依赖、配置)
  • config/*.exs(配置)
  • rel/config.exs(发布)

代码库扫描模式

源码根目录

  • lib/、apps/*/lib/

层/文件夹模式(如存在则记录)

controllers/、views/、channels/、contexts/、schemas/、workers/

模式指示器

模式 检测标准 技能名称
Phoenix Controller use *Web, :controller、def index phoenix-controller
Phoenix LiveView use *Web, :live_view、mount/3 phoenix-liveview
Phoenix Channel use *Web, :channel、join/3 phoenix-channel
Ecto Schema use Ecto.Schema、schema " ecto-schema
Ecto Migration use Ecto.Migration、create table ecto-migration
Ecto Changeset cast/4、validate_required ecto-changeset
Context defmodule *Context、def list_* phoenix-context
GenServer use GenServer、handle_call genserver
Supervisor use Supervisor、start_link supervisor
Task Task.async、Task.Supervisor elixir-task
Oban Worker use Oban.Worker、perform/1 oban-worker
Absinthe use Absinthe.Schema、field : graphql-schema
ExUnit Test use ExUnit.Case、test " exunit-test

必须包含的输出章节

若检测到则包含:

  • Controllers/LiveViews:HTTP/WebSocket 处理器
  • Contexts:业务逻辑
  • Schemas:Ecto 模型
  • Channels:实时处理器
  • Workers:后台任务

命令来源

  • mix.exs 别名
  • README/文档、CI
  • 常见命令:mix deps.get、mix test、mix phx.server
  • 仅包含仓库中存在的命令

关键路径

  • lib/*/、lib/*_web/
  • priv/repo/migrations/
  • test/
  • config/ FILE:references/flutter.md

Flutter/Dart

检测信号

  • pubspec.yaml
  • lib/main.dart
  • android/、ios/、web/ 目录
  • .dart_tool/
  • analysis_options.yaml

多模块信号

  • melos.yaml(monorepo)
  • 子目录中存在多个 pubspec.yaml
  • packages/ 目录

生成前来源

  • pubspec.yaml(依赖)
  • analysis_options.yaml
  • build.yaml(若使用 build_runner)
  • lib/main.dart(入口点)

代码库扫描模式

源码根目录

  • lib/、test/

层级/文件夹模式(若存在则记录)

screens/、widgets/、models/、services/、providers/、repositories/、utils/、constants/、bloc/、cubit/

模式指示器

模式 检测标准 技能名称
Screen/Page *Screen、*Page、extends StatefulWidget flutter-screen
Widget extends StatelessWidget、extends StatefulWidget flutter-widget
BLoC extends Bloc<、extends Cubit< bloc-pattern
Provider ChangeNotifier、Provider.of<、context.read< provider-pattern
Riverpod @riverpod、ref.watch、ConsumerWidget riverpod-provider
GetX GetxController、Get.put、Obx( getx-controller
Repository *Repository、abstract class *Repository data-repository
Service *Service service-layer
Model fromJson、toJson、@JsonSerializable json-model
Freezed @freezed、part '*.freezed.dart' freezed-model
API Client Dio、http.Client、Retrofit api-client
Navigation Navigator、GoRouter、auto_route flutter-navigation
Localization AppLocalizations、l10n、intl flutter-l10n
Testing testWidgets、WidgetTester、flutter_test widget-test
Integration Test integration_test、IntegrationTestWidgetsFlutterBinding integration-test

强制输出章节

若检测到则包含:

  • 页面清单:screens/、pages/ 下的目录
  • 状态管理:BLoC、Provider、Riverpod、GetX
  • 导航设置:GoRouter、auto_route、Navigator
  • 依赖注入方式:get_it、injectable、手动
  • API 层:Dio、http、Retrofit
  • 模型:Freezed、json_serializable

命令来源

  • pubspec.yaml 脚本(若使用 melos)
  • README/文档
  • 常见命令:flutter run、flutter test、flutter build
  • 仅包含仓库中存在的命令

关键路径

  • lib/、test/
  • lib/screens/、lib/widgets/
  • lib/bloc/、lib/providers/
  • assets/ FILE:references/generic.md

通用/未知技术栈

当未检测到特定平台时的回退参考。

检测信号

  • 未找到特定的构建/配置文件
  • 混合技术栈
  • 仅文档仓库

多模块信号

  • 多个具有独立职责的目录
  • packages/、modules/、libs/ 目录
  • 无特定工具链的 monorepo 结构

预生成来源

  • README.md(项目概览)
  • docs/*(文档)
  • .env.example(环境变量)
  • docker-compose.yml(服务)
  • CI 文件(.github/workflows/ 等)

代码库扫描模式

源码根目录

  • src/、lib/、app/

层/文件夹模式(若存在则记录)

api/、core/、utils/、services/、models/、config/、scripts/

通用模式指示器

模式 检测标准 技能名称
入口点 main.*、index.*、app.* entry-point
配置 config.*、settings.* config-file
API 客户端 api/、client/、HTTP 调用 api-client
模型 model/、types/、数据结构 data-model
服务 service/、业务逻辑 service-layer
工具 utils/、helpers/、common/ utility-module
测试 test/、tests/、*_test.*、*.test.* test-file
脚本 scripts/、bin/ script-file
文档 docs/、*.md documentation

必须输出的章节

如检测到则包含:

  • 项目结构:主要目录
  • 入口点:主要文件
  • 配置:配置文件
  • 依赖:任何包管理器
  • 构建/运行命令:来自 README/scripts

命令来源

  • README.md(查找代码块)
  • Makefile、Taskfile.yml
  • scripts/ 目录
  • CI 工作流
  • 仅包含仓库中存在的命令

关键路径

  • src/、lib/
  • docs/
  • scripts/
  • config/

备注

使用此通用参考时:

  1. 扫描任何可识别的模式
  2. 记录实际发现的项目结构
  3. 如可用,从 README 中提取命令
  4. 记录文档中提到的任何技术
  5. 保持输出简洁且基于事实 FILE:references/go.md

Go

检测信号

  • go.mod
  • go.sum
  • main.go
  • cmd/、internal/、pkg/ 目录

多模块信号

  • go.work(工作区)
  • 多个 go.mod 文件
  • cmd/*/main.go(多个二进制文件)

预生成来源

  • go.mod(依赖)
  • Makefile(构建命令)
  • config/*.yaml 或 *.toml

代码库扫描模式

源码根目录

  • cmd/、internal/、pkg/

层/文件夹模式(如存在则记录)

handler/、service/、repository/、model/、middleware/、config/、util/

模式指示器

模式 检测标准 技能名称
HTTP Handler http.Handler、http.HandlerFunc、gin.Context http-handler
Gin Route gin.Engine、r.GET(、r.POST( gin-route
Echo Route echo.Echo、e.GET(、e.POST( echo-route
Fiber Route fiber.App、app.Get(、app.Post( fiber-route
gRPC Service *.proto、pb.*Server grpc-service
Repository type *Repository interface、*Repository data-repository
Service type *Service interface、*Service service-layer
GORM Model gorm.Model、*gorm.DB gorm-model
sqlx sqlx.DB、sqlx.NamedExec sqlx-usage
Migration goose、golang-migrate db-migration
Middleware func(*Context)、middleware.* go-middleware
Worker go func()、sync.WaitGroup、errgroup worker-goroutine
Config viper、envconfig、cleanenv config-loader
Unit Test *_test.go、func Test*(t *testing.T) go-test
Mock mockgen、*_mock.go go-mock

必须输出的章节

检测到则包含:

  • HTTP 处理器:API 端点
  • 服务:业务逻辑
  • 仓储:数据访问
  • 模型:数据结构
  • 中间件:请求拦截器
  • 迁移:数据库迁移

命令来源

  • Makefile 目标
  • README/文档、CI
  • 常见:go build、go test、go run
  • 仅包含仓库中存在的命令

关键路径

  • cmd/、internal/、pkg/
  • api/、handler/
  • migrations/
  • config/ FILE:references/ios.md

iOS (Xcode/Swift)

检测信号

  • *.xcodeproj、*.xcworkspace
  • Package.swift (SPM)
  • Podfile、Podfile.lock (CocoaPods)
  • Cartfile (Carthage)
  • *.pbxproj
  • Info.plist

多模块信号

  • *.xcodeproj 中的多个 target
  • 多个 Package.swift 文件
  • 包含多个项目的 workspace
  • Modules/、Packages/、Features/ 目录

生成前来源

  • *.xcodeproj/project.pbxproj(target 列表)
  • Package.swift(依赖、target)
  • Podfile(依赖)
  • *.xcconfig(构建配置)
  • Info.plist 文件

代码库扫描模式

源码根目录

  • */Sources/、*/Source/
  • */App/、*/Core/、*/Features/

层级/文件夹模式(存在则记录)

Models/、Views/、ViewModels/、Services/、Networking/、Utilities/、Extensions/、Coordinators/

模式指示器

模式 检测标准 技能名称
SwiftUI View struct *: View、var body: some View swiftui-view
UIKit VC UIViewController、viewDidLoad() uikit-viewcontroller
ViewModel @Observable、ObservableObject、@Published viewmodel-observable
Coordinator Coordinator、*Coordinator coordinator-pattern
Repository *Repository、protocol *Repository data-repository
Service *Service、protocol *Service service-layer
Core Data NSManagedObject、@NSManaged、.xcdatamodeld coredata-entity
Realm Object、@Persisted realm-model
Network URLSession、Alamofire、Moya network-client
Dependency @Inject、Container、Swinject di-container
Navigation NavigationStack、NavigationPath navigation-swiftui
Combine Publisher、AnyPublisher、sink combine-publisher
Async/Await async、await、Task { async-await
Unit Test XCTestCase、func test*() xctest
UI Test XCUIApplication、XCUIElement xcuitest

强制输出章节

如检测到则包含:

  • 目标清单:从 pbxproj 列出
  • 模块/包:SPM 包、Pods
  • 视图架构:SwiftUI 对比 UIKit
  • 状态管理:Combine、Observable 等
  • 网络层:URLSession、Alamofire 等
  • 持久化:Core Data、Realm、UserDefaults
  • 依赖注入设置:Swinject、手动注入

命令来源

  • 含 xcodebuild 命令的 README/文档
  • fastlane/Fastfile lane
  • CI 工作流(.github/workflows/、.gitlab-ci.yml)
  • 常见:xcodebuild test、fastlane test
  • 仅包含仓库中存在的命令

关键路径

  • */Sources/、*/Tests/
  • *.xcodeproj/、*.xcworkspace/
  • Pods/(若使用 CocoaPods)
  • Packages/(若使用 SPM 本地包) FILE:references/java.md

Java/JVM(Spring 等)

检测信号

  • pom.xml(Maven)
  • build.gradle、build.gradle.kts(Gradle)
  • settings.gradle(多模块)
  • src/main/java/、src/main/kotlin/
  • application.properties、application.yml

多模块信号

  • 多个含 <modules> 的 pom.xml
  • 多个含 include() 的 build.gradle
  • modules/、services/ 目录

预生成来源

  • pom.xml 或 build.gradle*(依赖)
  • application.properties/yml(配置)
  • settings.gradle(模块)
  • docker-compose.yml(服务)

代码库扫描模式

源码根目录

  • src/main/java/、src/main/kotlin/
  • src/test/java/、src/test/kotlin/

层/文件夹模式(如存在则记录)

controller/、service/、repository/、model/、entity/、dto/、config/、exception/、util/

模式指示器

模式 检测标准 技能名称
REST Controller @RestController、@GetMapping、@PostMapping spring-controller
Service @Service、class *Service spring-service
Repository @Repository、JpaRepository、CrudRepository spring-repository
Entity @Entity、@Table、@Id jpa-entity
DTO class *DTO、class *Request、class *Response dto-pattern
Config @Configuration、@Bean spring-config
Component @Component、@Autowired spring-component
Security @EnableWebSecurity、SecurityFilterChain spring-security
Validation @Valid、@NotNull、@Size validation-pattern
Exception Handler @ControllerAdvice、@ExceptionHandler exception-handler
Scheduler @Scheduled、@EnableScheduling scheduled-task
Event ApplicationEvent、@EventListener event-listener
Flyway Migration V*__*.sql、flyway flyway-migration
Liquibase changelog*.xml、liquibase liquibase-migration
Unit Test @Test、@SpringBootTest、MockMvc spring-test
Integration Test @DataJpaTest、@WebMvcTest integration-test

强制输出章节

如检测到则包含:

  • Controllers:REST 端点
  • Services:业务逻辑
  • Repositories:数据访问(JPA、JDBC)
  • Entities/DTOs:数据模型
  • Configuration:Spring beans、profiles
  • Security:认证配置

命令来源

  • pom.xml 插件、build.gradle 任务
  • README/文档、CI
  • 常见:./mvnw、./gradlew、mvn test、gradle test
  • 仅包含仓库中存在的命令

关键路径

  • src/main/java/、src/main/kotlin/
  • src/main/resources/
  • src/test/
  • db/migration/(Flyway) FILE:references/node.md

Node.js

检测信号

  • package.json(不含 react/react-native)
  • tsconfig.json
  • node_modules/
  • *.js、*.ts、*.mjs、*.cjs 入口文件

多模块信号

  • pnpm-workspace.yaml、lerna.json
  • nx.json、turbo.json
  • 子目录中存在多个 package.json
  • packages/、apps/ 目录

预生成来源

  • package.json(依赖、脚本)
  • tsconfig.json(路径、编译器选项)
  • .env.example(环境变量)
  • docker-compose.yml(服务)

代码库扫描模式

源码根目录

  • src/、lib/、app/

层/文件夹模式(如存在则记录)

controllers/、services/、models/、routes/、middleware/、utils/、config/、types/、repositories/

模式指示器

模式 检测标准 技能名称
Express Route app.get(、app.post(、Router() express-route
Express Middleware (req, res, next)、app.use( express-middleware
NestJS Controller @Controller、@Get、@Post nestjs-controller
NestJS Service @Injectable、@Service nestjs-service
NestJS Module @Module、imports:、providers: nestjs-module
Fastify Route fastify.get(、fastify.post( fastify-route
GraphQL Resolver @Resolver、@Query、@Mutation graphql-resolver
TypeORM Entity @Entity、@Column、@PrimaryGeneratedColumn typeorm-entity
Prisma Model prisma.*.create、prisma.*.findMany prisma-usage
Mongoose Model mongoose.Schema、mongoose.model( mongoose-model
Sequelize Model Model.init、DataTypes sequelize-model
Queue Worker Bull、BullMQ、process( queue-worker
Cron Job @Cron、node-cron、cron.schedule cron-job
WebSocket ws、socket.io、io.on( websocket-handler
Unit Test describe(、it(、expect(、jest jest-test
E2E Test supertest、request(app) e2e-test

强制输出章节

若检测到则包含:

  • 路由/控制器:API 端点
  • 服务层:业务逻辑
  • 数据库:ORM/ODM 用法(TypeORM、Prisma、Mongoose)
  • 中间件:认证、校验、错误处理
  • 后台任务:队列、定时任务
  • WebSocket 处理器:实时功能

命令来源

  • package.json 的 scripts 部分
  • README/文档
  • CI 工作流
  • 常见:npm run dev、npm run build、npm test
  • 仅包含仓库中存在的命令

关键路径

  • src/、lib/
  • src/routes/、src/controllers/
  • src/services/、src/models/
  • prisma/、migrations/ FILE:references/php.md

PHP

检测信号

  • composer.json、composer.lock
  • public/index.php
  • artisan(Laravel)
  • spark(CodeIgniter 4)
  • bin/console(Symfony)
  • app/Config/App.php(CodeIgniter 4)
  • composer.json 中的 ext-phalcon(Phalcon)
  • phalcon/devtools(Phalcon)

多模块信号

  • packages/ 目录
  • Laravel 模块(app/Modules/)
  • CodeIgniter 模块(app/Modules/、modules/)
  • Phalcon 多应用(apps/*/)
  • 子目录中存在多个 composer.json

预生成来源

  • composer.json(依赖)
  • .env.example(环境变量)
  • config/*.php(Laravel/Symfony)
  • routes/*.php(Laravel)
  • app/Config/*(CodeIgniter 4)
  • apps/*/config/(Phalcon)

代码库扫描模式

源码根目录

  • app/、src/、apps/

层/文件夹模式(若存在则记录)

Controllers/、Services/、Repositories/、Models/、Entities/、Http/、Providers/、Console/

框架特定结构

Laravel(若存在则记录):

  • app/Http/Controllers、app/Models、database/migrations
  • routes/*.php、resources/views

Symfony(若存在则记录):

  • src/Controller、src/Entity、config/packages、templates CodeIgniter 4(若存在则记录):
  • app/Controllers、app/Models、app/Views
  • app/Config/Routes.php、app/Database/Migrations

Phalcon(若存在则记录):

  • apps/*/controllers/、apps/*/Module.php
  • models/、views/

模式指示器

模式 检测标准 技能名称
Laravel 控制器 extends Controller、public function index laravel-controller
Laravel 模型 extends Model、protected $fillable laravel-model
Laravel 迁移 extends Migration、Schema::create laravel-migration
Laravel 服务 class *Service、app/Services/ laravel-service
Laravel 仓储 *Repository、interface *Repository laravel-repository
Laravel 任务 implements ShouldQueue、dispatch( laravel-job
Laravel 事件 extends Event、event( laravel-event
Symfony 控制器 #[Route]、AbstractController symfony-controller
Symfony 服务 #[AsService]、services.yaml symfony-service
Doctrine 实体 #[ORM\Entity]、#[ORM\Column] doctrine-entity
Doctrine 迁移 AbstractMigration、$this->addSql doctrine-migration
CI4 控制器 extends BaseController、app/Controllers/ ci4-controller
CI4 模型 extends Model、protected $table ci4-model
CI4 迁移 extends Migration、$this->forge-> ci4-migration
CI4 实体 extends Entity、app/Entities/ ci4-entity
Phalcon 控制器 extends Controller、Phalcon\Mvc\Controller phalcon-controller
Phalcon 模型 extends Model、Phalcon\Mvc\Model phalcon-model
Phalcon 迁移 Phalcon\Migrations、morphTable phalcon-migration
API 资源 extends JsonResource、toArray api-resource
表单请求 extends FormRequest、rules() form-request
中间件 implements Middleware、handle( php-middleware
单元测试 extends TestCase、test*()、PHPUnit phpunit-test
功能测试 extends TestCase、$this->get(、$this->post( feature-test

强制输出章节

如检测到则包含:

  • Controllers:HTTP 端点
  • Models/Entities:数据层
  • Services:业务逻辑
  • Repositories:数据访问
  • Migrations:数据库变更
  • Jobs/Events:异步处理
  • Business modules:按大小排序的顶层模块

命令来源

  • composer.json 脚本
  • php artisan(Laravel)
  • php spark(CodeIgniter 4)
  • bin/console(Symfony)
  • phalcon devtools 命令
  • README/文档、CI
  • 仅包含仓库中存在的命令

关键路径

Laravel:

  • app/、routes/、database/migrations/
  • resources/views/、tests/

Symfony:

  • src/、config/、templates/
  • migrations/、tests/

CodeIgniter 4:

  • app/Controllers/、app/Models/、app/Views/
  • app/Database/Migrations/、tests/

Phalcon:

  • apps/*/controllers/、apps/*/models/
  • apps/*/views/、migrations/ FILE:references/python.md

Python

检测信号

  • pyproject.toml
  • requirements.txt、requirements-dev.txt
  • Pipfile、poetry.lock
  • setup.py、setup.cfg
  • manage.py(Django)

多模块信号

  • 子目录中存在多个 pyproject.toml
  • packages/、apps/ 目录
  • Django 风格的 apps/,含 apps.py

预生成来源

  • pyproject.toml 或 setup.py
  • requirements*.txt、Pipfile
  • tox.ini、pytest.ini
  • manage.py、settings.py(Django)

代码库扫描模式

源码根目录

  • src/、app/、packages/、tests/

层/文件夹模式(如存在则记录)

api/、routers/、views/、services/、repositories/、models/、schemas/、utils/、config/

模式指示器

模式 检测标准 技能名称
FastAPI Router APIRouter、@router.get、@router.post fastapi-router
FastAPI Dependency Depends(、def get_*(): fastapi-dependency
Django View View、APIView、def get(self, request) django-view
Django Model models.Model、class Meta: django-model
Django Serializer serializers.Serializer、ModelSerializer drf-serializer
Flask Route @app.route、Blueprint flask-route
Pydantic Model BaseModel、Field(、model_validator pydantic-model
SQLAlchemy Model Base、Column(、relationship( sqlalchemy-model
Alembic Migration alembic/versions/、op.create_table alembic-migration
Repository *Repository、class *Repository data-repository
Service *Service、class *Service service-layer
Celery Task @celery.task、@shared_task celery-task
CLI Command @click.command、typer.Typer cli-command
Unit Test pytest、def test_*():、unittest pytest-test
Fixture @pytest.fixture、conftest.py pytest-fixture

必须输出的章节

若检测到则包含:

  • 路由/视图:API 端点
  • 模型/schema:数据模型(Pydantic、SQLAlchemy、Django)
  • 服务:业务逻辑层
  • 仓库:数据访问层
  • 迁移:Alembic、Django migrations
  • 任务:Celery、后台作业

命令来源

  • pyproject.toml 工具配置段
  • README/文档、CI
  • 常见:python manage.py、pytest、uvicorn、flask run
  • 仅包含仓库中存在的命令

关键路径

  • src/、app/
  • tests/
  • alembic/、migrations/
  • templates/、static/(若为 Web)

文件:references/react-native.md

React Native

检测信号

  • 含 react-native 的 package.json
  • metro.config.js
  • app.json 或 app.config.js(Expo)
  • android/、ios/ 目录
  • 含 metro preset 的 babel.config.js

多模块信号

  • 含 packages/ 的 monorepo
  • 多个 app.json 文件
  • 使用 React Native 的 Nx 工作区

生成前来源

  • package.json(依赖、脚本)
  • app.json 或 app.config.js
  • metro.config.js
  • babel.config.js
  • tsconfig.json

代码库扫描模式

源码根目录

  • src/、app/

层/文件夹模式(若存在则记录)

screens/、components/、navigation/、services/、hooks/、store/、api/、utils/、assets/

模式指示器

模式 检测标准 技能名称
Screen *Screen、export function *Screen rn-screen
Component export function *()、StyleSheet.create rn-component
Navigation createNativeStackNavigator、NavigationContainer rn-navigation
Hook use*、export function use*() rn-hook
Redux createSlice、configureStore redux-slice
Zustand create(、useStore zustand-store
React Query useQuery、useMutation react-query
Native Module NativeModules、TurboModule native-module
Async Storage AsyncStorage、@react-native-async-storage async-storage
SQLite expo-sqlite、react-native-sqlite-storage sqlite-storage
Push Notification @react-native-firebase/messaging、expo-notifications push-notification
Deep Link Linking、useURL、expo-linking deep-link
Animation Animated、react-native-reanimated rn-animation
Gesture react-native-gesture-handler、Gesture rn-gesture
Testing @testing-library/react-native、render rntl-test

强制输出章节

若检测到则包含:

  • 屏幕清单:screens/ 下的目录
  • 导航结构:堆栈、标签页、抽屉导航器
  • 状态管理:Redux、Zustand、Context
  • 原生模块:自定义原生代码
  • 存储层:AsyncStorage、SQLite、MMKV
  • 平台特定:*.android.tsx、*.ios.tsx

命令来源

  • package.json 脚本
  • README/文档
  • 常见:npm run android、npm run ios、npx expo start
  • 仅包含仓库中存在的命令

关键路径

  • src/screens/、src/components/
  • src/navigation/、src/store/
  • android/app/、ios/*/
  • assets/ FILE:references/react-web.md

React(Web)

检测信号

  • 含 react、react-dom 的 package.json
  • vite.config.ts、next.config.js、craco.config.js
  • tsconfig.json 或 jsconfig.json
  • src/App.tsx 或 src/App.jsx
  • public/index.html(CRA)

多模块信号

  • pnpm-workspace.yaml、lerna.json
  • 子目录中有多个 package.json
  • packages/、apps/ 目录
  • Nx 工作区(nx.json)

预生成来源

  • package.json(依赖、脚本)
  • tsconfig.json(路径、编译器选项)
  • vite.config.*、next.config.*、webpack.config.*
  • .env.example(环境变量)

代码库扫描模式

源码根目录

  • src/、app/、pages/

层/文件夹模式(若存在则记录)

components/、hooks/、services/、utils/、store/、api/、types/、contexts/、features/、layouts/

模式指示器

模式 检测标准 技能名称
组件 export function *()、带 JSX 的 export const * = react-component
Hook use*、export function use*() custom-hook
Context createContext、useContext、*Provider react-context
Redux createSlice、configureStore、useSelector redux-slice
Zustand create(、useStore zustand-store
React Query useQuery、useMutation、QueryClient react-query
表单 useForm、react-hook-form、Formik form-handling
路由 createBrowserRouter、Route、useNavigate react-router
API 客户端 axios、fetch、ky api-client
测试 @testing-library/react、render、screen rtl-test
Storybook *.stories.tsx、Meta、StoryObj storybook
样式化 styled-components、@emotion、styled( styled-component
Tailwind className="*"、tailwind.config.js tailwind-usage
i18n useTranslation、i18next、t() i18n-usage
认证 useAuth、AuthProvider、PrivateRoute auth-pattern

强制输出章节

检测到则包含:

  • 组件清单:components/ 下的目录
  • 功能/页面:features/、pages/ 下的目录
  • 状态管理:Redux、Zustand、Context
  • 路由设置:React Router、Next.js pages
  • API 层:axios 实例、fetch 封装
  • 样式方案:CSS modules、Tailwind、styled-components
  • 表单处理:react-hook-form、Formik

命令来源

  • package.json 的 scripts 部分
  • README/文档
  • CI 工作流
  • 常见:npm run dev、npm run build、npm test
  • 仅包含仓库中存在的命令

关键路径

  • src/components/、src/hooks/
  • src/pages/、src/features/
  • src/store/、src/api/
  • public/、dist/、build/ FILE:references/ruby.md

Ruby/Rails

检测信号

  • Gemfile
  • Gemfile.lock
  • config.ru
  • Rakefile
  • config/application.rb(Rails)

多模块信号

  • 子目录中有多个 Gemfile
  • engines/ 目录(Rails engines)
  • gems/ 目录(monorepo)

预生成来源

  • Gemfile(依赖)
  • config/database.yml
  • config/routes.rb(Rails)
  • .env.example

代码库扫描模式

源码根目录

  • app/、lib/

层/文件夹模式(存在则记录)

controllers/、models/、services/、jobs/、mailers/、channels/、helpers/、concerns/

模式指示器

模式 检测标准 技能名称
Rails Controller < ApplicationController、def index rails-controller
Rails Model < ApplicationRecord、has_many、belongs_to rails-model
Rails Migration < ActiveRecord::Migration、create_table rails-migration
Service Object class *Service、def call service-object
Rails Job < ApplicationJob、perform_later rails-job
Mailer < ApplicationMailer、mail( rails-mailer
Channel < ApplicationCable::Channel action-cable
Serializer < ActiveModel::Serializer、attributes serializer
Concern extend ActiveSupport::Concern rails-concern
Sidekiq Worker include Sidekiq::Worker、perform_async sidekiq-worker
Grape API Grape::API、resource : grape-api
RSpec Test RSpec.describe、it " rspec-test
Factory FactoryBot.define、factory : factory-bot
Rake Task task :、namespace : rake-task

必须输出的章节

若检测到则包含:

  • Controllers:HTTP 端点
  • Models:ActiveRecord 关联
  • Services:业务逻辑
  • Jobs:后台处理
  • Migrations:数据库 schema

命令来源

  • Gemfile 脚本
  • Rakefile 任务
  • bin/rails、bin/rake
  • README/文档、CI
  • 仅包含仓库中存在的命令

关键路径

  • app/controllers/、app/models/
  • app/services/、app/jobs/
  • db/migrate/
  • spec/、test/
  • lib/ FILE:references/rust.md

Rust

检测信号

  • Cargo.toml
  • Cargo.lock
  • src/main.rs 或 src/lib.rs
  • target/ 目录

多模块信号

  • Cargo.toml 中的 [workspace]
  • 子目录中有多个 Cargo.toml
  • crates/、packages/ 目录

预生成来源

  • Cargo.toml(依赖、特性)
  • build.rs(构建脚本)
  • rust-toolchain.toml(工具链)

代码库扫描模式

源码根目录

  • src/、crates/*/src/

分层/文件夹模式(若存在则记录)

handlers/、services/、models/、db/、api/、utils/、error/、config/

模式指示器

模式 检测标准 技能名称
Axum Handler axum::、Router、async fn handler axum-handler
Actix Route actix_web::、#[get]、#[post] actix-route
Rocket Route rocket::、#[get]、#[post] rocket-route
Service impl *Service、pub struct *Service rust-service
Repository *Repository、trait *Repository rust-repository
Diesel Model diesel::、Queryable、Insertable diesel-model
SQLx sqlx::、FromRow、query_as! sqlx-model
SeaORM sea_orm::、Entity、ActiveModel seaorm-entity
Error Type thiserror、anyhow、#[derive(Error)] error-type
CLI clap、#[derive(Parser)] cli-app
Async Task tokio::spawn、async fn async-task
Trait pub trait *、impl * for rust-trait
Unit Test #[cfg(test)]、#[test] rust-test
Integration Test tests/、#[tokio::test] integration-test

强制输出章节

若检测到则包含:

  • 处理器/路由:API 端点
  • 服务:业务逻辑
  • 模型/实体:数据结构
  • 错误类型:自定义错误
  • 迁移:diesel/sqlx 迁移

命令来源

  • Cargo.toml 脚本/别名
  • Makefile、README/文档
  • 常见:cargo build、cargo test、cargo run
  • 仅包含仓库中存在的命令

关键路径

  • src/、crates/
  • tests/
  • migrations/
  • examples/

English original

Skill Master

Overview

Analyze codebase to discover patterns and generate/update SKILL files in .claude/skills/. Supports multi-platform projects with stack-specific pattern detection.

Capabilities:

  • Scan codebase for architectural patterns (ViewModel, Repository, Room, etc.)
  • Compare detected patterns with existing skills
  • Auto-generate SKILL files with real code examples
  • Version tracking and smart updates

How the AI discovers and uses this skill

This skill triggers when user:

  • Asks to analyze project for missing skills
  • Requests skill generation from codebase patterns
  • Wants to sync or update existing skills
  • Mentions "skill discovery", "generate skills", or "skill-sync"

Detection signals:

  • .claude/skills/ directory presence
  • Project structure matching known patterns
  • Build/config files indicating platform (see references)

Modes

Discover Mode

Analyze codebase and report missing skills.

Steps:

  1. Detect platform via build/config files (see references)
  2. Scan source roots for pattern indicators
  3. Compare detected patterns with existing .claude/skills/
  4. Output gap analysis report

Output format:

Detected Patterns: {count}
| Pattern | Files Found | Example Location |
|---------|-------------|------------------|
| {name}  | {count}     | {path}           |

Existing Skills: {count}
Missing Skills: {count}
- {skill-name}: {pattern}, {file-count} files found

Generate Mode

Create SKILL files from detected patterns.

Steps:

  1. Run discovery to identify missing skills
  2. For each missing skill:
    • Find 2-3 representative source files
    • Extract: imports, annotations, class structure, conventions
    • Extract rules from .ruler/*.md if present
  3. Generate SKILL.md using template structure
  4. Add version and source marker

Generated SKILL structure:

---
name: {pattern-name}
description: {Generated description with trigger keywords}
version: 1.0.0
---

# {Title}

## Overview
{Brief description from pattern analysis}

## File Structure
{Extracted from codebase}

## Implementation Pattern
{Real code examples - anonymized}

## Rules
### Do
{From .ruler/*.md + codebase conventions}

### Don't
{Anti-patterns found}

## File Location
{Actual paths from codebase}

Create Strategy

When target SKILL file does not exist:

  1. Generate new file using template
  2. Set version: 1.0.0 in frontmatter
  3. Include all mandatory sections
  4. Add source marker at end (see Marker Format)

Update Strategy

Marker check: Look for <!-- Generated by skill-master command at file end.

If marker present (subsequent run):

  • Smart merge: preserve custom content, add missing sections
  • Increment version: major (breaking) / minor (feature) / patch (fix)
  • Update source list in marker

If marker absent (first run on existing file):

  • Backup: SKILL.md → SKILL.md.bak
  • Use backup as source, extract relevant content
  • Generate fresh file with marker
  • Set version: 1.0.0

Marker Format

Place at END of generated SKILL.md:

<!-- Generated by skill-master command
Version: {version}
Sources:
- path/to/source1.kt
- path/to/source2.md
- .ruler/rule-file.md
Last updated: {YYYY-MM-DD}
-->

Platform References

Read relevant reference when platform detected:

Platform Detection Files Reference
Android/Gradle build.gradle, settings.gradle references/android.md
iOS/Xcode *.xcodeproj, Package.swift references/ios.md
React (web) package.json + react references/react-web.md
React Native package.json + react-native references/react-native.md
Flutter/Dart pubspec.yaml references/flutter.md
Node.js package.json references/node.md
Python pyproject.toml, requirements.txt references/python.md
Java/JVM pom.xml, build.gradle references/java.md
.NET/C# *.csproj, *.sln references/dotnet.md
Go go.mod references/go.md
Rust Cargo.toml references/rust.md
PHP composer.json references/php.md
Ruby Gemfile references/ruby.md
Elixir mix.exs references/elixir.md
C/C++ CMakeLists.txt, Makefile references/cpp.md
Unknown - references/generic.md

If multiple platforms detected, read multiple references.

Rules

Do

  • Only extract patterns verified in codebase
  • Use real code examples (anonymize business logic)
  • Include trigger keywords in description
  • Keep SKILL.md under 500 lines
  • Reference external files for detailed content
  • Preserve custom sections during updates
  • Always backup before first modification

Don't

  • Include secrets, tokens, or credentials
  • Include business-specific logic details
  • Generate placeholders without real content
  • Overwrite user customizations without backup
  • Create deep reference chains (max 1 level)
  • Write outside .claude/skills/

Content Extraction Rules

From codebase:

  • Extract: class structures, annotations, import patterns, file locations, naming conventions
  • Never: hardcoded values, secrets, API keys, PII

From .ruler/*.md (if present):

  • Extract: Do/Don't rules, architecture constraints, dependency rules

Output Report

After generation, print:

SKILL GENERATION REPORT

Skills Generated: {count}

{skill-name} [CREATED | UPDATED | BACKED_UP+CREATED]
├── Analyzed: {file-count} source files
├── Sources: {list of source files}
├── Rules from: {.ruler files if any}
└── Output: .claude/skills/{skill-name}/SKILL.md ({line-count} lines)

Validation:
✓ YAML frontmatter valid
✓ Description includes trigger keywords
✓ Content under 500 lines
✓ Has required sections

Safety Constraints

  • Never write outside .claude/skills/
  • Never delete content without backup
  • Always backup before first-time modification
  • Preserve user customizations
  • Deterministic: same input → same output FILE:references/android.md

Android (Gradle/Kotlin)

Detection signals

  • settings.gradle or settings.gradle.kts
  • build.gradle or build.gradle.kts
  • gradle.properties, gradle/libs.versions.toml
  • gradlew, gradle/wrapper/gradle-wrapper.properties
  • app/src/main/AndroidManifest.xml

Multi-module signals

  • Multiple include(...) in settings.gradle*
  • Multiple dirs with build.gradle* + src/
  • Common roots: feature/, core/, library/, domain/, data/

Pre-generation sources

  • settings.gradle* (module list)
  • build.gradle* (root + modules)
  • gradle/libs.versions.toml (dependencies)
  • config/detekt/detekt.yml (if present)
  • **/AndroidManifest.xml

Codebase scan patterns

Source roots

  • */src/main/java/, */src/main/kotlin/

Layer/folder patterns (record if present)

features/, core/, common/, data/, domain/, presentation/, ui/, di/, navigation/, network/

Pattern indicators

Pattern Detection Criteria Skill Name
ViewModel @HiltViewModel, ViewModel(), MVI< viewmodel-mvi
Repository *Repository, *RepositoryImpl data-repository
UseCase operator fun invoke, *UseCase domain-usecase
Room Entity @Entity, @PrimaryKey, @ColumnInfo room-entity
Room DAO @Dao, @Query, @Insert, @Update room-dao
Migration Migration(, @Database(version= room-migration
Type Converter @TypeConverter, @TypeConverters type-converter
DTO @SerializedName, *Request, *Response network-dto
Compose Screen @Composable, NavGraphBuilder. compose-screen
Bottom Sheet ModalBottomSheet, *BottomSheet( bottomsheet-screen
Navigation @Route, NavGraphBuilder., composable( navigation-route
Hilt Module @Module, @Provides, @Binds, @InstallIn hilt-module
Worker @HiltWorker, CoroutineWorker, WorkManager worker-task
DataStore DataStore<Preferences>, preferencesDataStore datastore-preference
Retrofit API @GET, @POST, @PUT, @DELETE retrofit-api
Mapper *.toModel(), *.toEntity(), *.toDto() data-mapper
Interceptor Interceptor, intercept() network-interceptor
Paging PagingSource, Pager(, PagingData paging-source
Broadcast Receiver BroadcastReceiver, onReceive( broadcast-receiver
Android Service : Service(), ForegroundService android-service
Notification NotificationCompat, NotificationChannel notification-builder
Analytics FirebaseAnalytics, logEvent analytics-event
Feature Flag RemoteConfig, FeatureFlag feature-flag
App Widget AppWidgetProvider, GlanceAppWidget app-widget
Unit Test @Test, MockK, mockk(, every { unit-test

Mandatory output sections

Include if detected (list actual names found):

  • Features inventory: dirs under feature/
  • Core modules: dirs under core/, library/
  • Navigation graphs: *Graph.kt, *Navigator*.kt
  • Hilt modules: @Module classes, di/ contents
  • Retrofit APIs: *Api.kt interfaces
  • Room databases: @Database classes
  • Workers: @HiltWorker classes
  • Proguard: proguard-rules.pro if present

Command sources

  • README/docs invoking ./gradlew
  • CI workflows with Gradle commands
  • Common: ./gradlew assemble, ./gradlew test, ./gradlew lint
  • Only include commands present in repo

Key paths

  • app/src/main/, app/src/main/res/
  • app/src/main/java/, app/src/main/kotlin/
  • app/src/test/, app/src/androidTest/
  • library/database/migration/ (Room migrations) FILE:README.md

FILE:references/cpp.md

C/C++

Detection signals

  • CMakeLists.txt
  • Makefile, makefile
  • *.cpp, *.c, *.h, *.hpp
  • conanfile.txt, conanfile.py (Conan)
  • vcpkg.json (vcpkg)

Multi-module signals

  • Multiple CMakeLists.txt with add_subdirectory
  • Multiple Makefile in subdirs
  • lib/, src/, modules/ directories

Pre-generation sources

  • CMakeLists.txt (dependencies, targets)
  • conanfile.* (dependencies)
  • vcpkg.json (dependencies)
  • Makefile (build targets)

Codebase scan patterns

Source roots

  • src/, lib/, include/

Layer/folder patterns (record if present)

core/, utils/, network/, storage/, ui/, tests/

Pattern indicators

Pattern Detection Criteria Skill Name
Class class *, public:, private: cpp-class
Header *.h, *.hpp, #pragma once header-file
Template template<, typename T cpp-template
Smart Pointer std::unique_ptr, std::shared_ptr smart-pointer
RAII destructor pattern, ~*() raii-pattern
Singleton static *& instance() singleton
Factory create*(), make*() factory-pattern
Observer subscribe, notify, callback pattern observer-pattern
Thread std::thread, std::async, pthread threading
Mutex std::mutex, std::lock_guard synchronization
Network socket, asio::, boost::asio network-cpp
Serialization nlohmann::json, protobuf serialization
Unit Test TEST(, TEST_F(, gtest gtest
Catch2 Test TEST_CASE(, REQUIRE( catch2-test

Mandatory output sections

Include if detected:

  • Core modules: main functionality
  • Libraries: internal libraries
  • Headers: public API
  • Tests: test organization
  • Build targets: executables, libraries

Command sources

  • CMakeLists.txt custom targets
  • Makefile targets
  • README/docs, CI
  • Common: cmake, make, ctest
  • Only include commands present in repo

Key paths

  • src/, include/
  • lib/, libs/
  • tests/, test/
  • build/ (out-of-source) FILE:references/dotnet.md

.NET (C#/F#)

Detection signals

  • *.csproj, *.fsproj
  • *.sln
  • global.json
  • appsettings.json
  • Program.cs, Startup.cs

Multi-module signals

  • Multiple *.csproj files
  • Solution with multiple projects
  • src/, tests/ directories with projects

Pre-generation sources

  • *.csproj (dependencies, SDK)
  • *.sln (project structure)
  • appsettings.json (config)
  • global.json (SDK version)

Codebase scan patterns

Source roots

  • src/, */ (per project)

Layer/folder patterns (record if present)

Controllers/, Services/, Repositories/, Models/, Entities/, DTOs/, Middleware/, Extensions/

Pattern indicators

Pattern Detection Criteria Skill Name
Controller [ApiController], ControllerBase, [HttpGet] aspnet-controller
Service I*Service, class *Service dotnet-service
Repository I*Repository, class *Repository dotnet-repository
Entity class *Entity, [Table], [Key] ef-entity
DTO class *Dto, class *Request, class *Response dto-pattern
DbContext : DbContext, DbSet< ef-dbcontext
Middleware IMiddleware, RequestDelegate aspnet-middleware
Background Service BackgroundService, IHostedService background-service
MediatR Handler IRequestHandler<, INotificationHandler< mediatr-handler
SignalR Hub : Hub, [HubName] signalr-hub
Minimal API app.MapGet(, app.MapPost( minimal-api
gRPC Service *.proto, : *Base grpc-service
EF Migration Migrations/, AddMigration ef-migration
Unit Test [Fact], [Theory], xUnit xunit-test
Integration Test WebApplicationFactory, IClassFixture integration-test

Mandatory output sections

Include if detected:

  • Controllers: API endpoints
  • Services: business logic
  • Repositories: data access (EF Core)
  • Entities/DTOs: data models
  • Middleware: request pipeline
  • Background services: hosted services

Command sources

  • *.csproj targets
  • README/docs, CI
  • Common: dotnet build, dotnet test, dotnet run
  • Only include commands present in repo

Key paths

  • src/*/, project directories
  • tests/
  • Migrations/
  • Properties/ FILE:references/elixir.md

Elixir/Erlang

Detection signals

  • mix.exs
  • mix.lock
  • config/config.exs
  • lib/, test/ directories

Multi-module signals

  • Umbrella app (apps/ directory)
  • Multiple mix.exs in subdirs
  • rel/ for releases

Pre-generation sources

  • mix.exs (dependencies, config)
  • config/*.exs (configuration)
  • rel/config.exs (releases)

Codebase scan patterns

Source roots

  • lib/, apps/*/lib/

Layer/folder patterns (record if present)

controllers/, views/, channels/, contexts/, schemas/, workers/

Pattern indicators

Pattern Detection Criteria Skill Name
Phoenix Controller use *Web, :controller, def index phoenix-controller
Phoenix LiveView use *Web, :live_view, mount/3 phoenix-liveview
Phoenix Channel use *Web, :channel, join/3 phoenix-channel
Ecto Schema use Ecto.Schema, schema " ecto-schema
Ecto Migration use Ecto.Migration, create table ecto-migration
Ecto Changeset cast/4, validate_required ecto-changeset
Context defmodule *Context, def list_* phoenix-context
GenServer use GenServer, handle_call genserver
Supervisor use Supervisor, start_link supervisor
Task Task.async, Task.Supervisor elixir-task
Oban Worker use Oban.Worker, perform/1 oban-worker
Absinthe use Absinthe.Schema, field : graphql-schema
ExUnit Test use ExUnit.Case, test " exunit-test

Mandatory output sections

Include if detected:

  • Controllers/LiveViews: HTTP/WebSocket handlers
  • Contexts: business logic
  • Schemas: Ecto models
  • Channels: real-time handlers
  • Workers: background jobs

Command sources

  • mix.exs aliases
  • README/docs, CI
  • Common: mix deps.get, mix test, mix phx.server
  • Only include commands present in repo

Key paths

  • lib/*/, lib/*_web/
  • priv/repo/migrations/
  • test/
  • config/ FILE:references/flutter.md

Flutter/Dart

Detection signals

  • pubspec.yaml
  • lib/main.dart
  • android/, ios/, web/ directories
  • .dart_tool/
  • analysis_options.yaml

Multi-module signals

  • melos.yaml (monorepo)
  • Multiple pubspec.yaml in subdirs
  • packages/ directory

Pre-generation sources

  • pubspec.yaml (dependencies)
  • analysis_options.yaml
  • build.yaml (if using build_runner)
  • lib/main.dart (entry point)

Codebase scan patterns

Source roots

  • lib/, test/

Layer/folder patterns (record if present)

screens/, widgets/, models/, services/, providers/, repositories/, utils/, constants/, bloc/, cubit/

Pattern indicators

Pattern Detection Criteria Skill Name
Screen/Page *Screen, *Page, extends StatefulWidget flutter-screen
Widget extends StatelessWidget, extends StatefulWidget flutter-widget
BLoC extends Bloc<, extends Cubit< bloc-pattern
Provider ChangeNotifier, Provider.of<, context.read< provider-pattern
Riverpod @riverpod, ref.watch, ConsumerWidget riverpod-provider
GetX GetxController, Get.put, Obx( getx-controller
Repository *Repository, abstract class *Repository data-repository
Service *Service service-layer
Model fromJson, toJson, @JsonSerializable json-model
Freezed @freezed, part '*.freezed.dart' freezed-model
API Client Dio, http.Client, Retrofit api-client
Navigation Navigator, GoRouter, auto_route flutter-navigation
Localization AppLocalizations, l10n, intl flutter-l10n
Testing testWidgets, WidgetTester, flutter_test widget-test
Integration Test integration_test, IntegrationTestWidgetsFlutterBinding integration-test

Mandatory output sections

Include if detected:

  • Screens inventory: dirs under screens/, pages/
  • State management: BLoC, Provider, Riverpod, GetX
  • Navigation setup: GoRouter, auto_route, Navigator
  • DI approach: get_it, injectable, manual
  • API layer: Dio, http, Retrofit
  • Models: Freezed, json_serializable

Command sources

  • pubspec.yaml scripts (if using melos)
  • README/docs
  • Common: flutter run, flutter test, flutter build
  • Only include commands present in repo

Key paths

  • lib/, test/
  • lib/screens/, lib/widgets/
  • lib/bloc/, lib/providers/
  • assets/ FILE:references/generic.md

Generic/Unknown Stack

Fallback reference when no specific platform is detected.

Detection signals

  • No specific build/config files found
  • Mixed technology stack
  • Documentation-only repository

Multi-module signals

  • Multiple directories with separate concerns
  • packages/, modules/, libs/ directories
  • Monorepo structure without specific tooling

Pre-generation sources

  • README.md (project overview)
  • docs/* (documentation)
  • .env.example (environment vars)
  • docker-compose.yml (services)
  • CI files (.github/workflows/, etc.)

Codebase scan patterns

Source roots

  • src/, lib/, app/

Layer/folder patterns (record if present)

api/, core/, utils/, services/, models/, config/, scripts/

Generic pattern indicators

Pattern Detection Criteria Skill Name
Entry Point main.*, index.*, app.* entry-point
Config config.*, settings.* config-file
API Client api/, client/, HTTP calls api-client
Model model/, types/, data structures data-model
Service service/, business logic service-layer
Utility utils/, helpers/, common/ utility-module
Test test/, tests/, *_test.*, *.test.* test-file
Script scripts/, bin/ script-file
Documentation docs/, *.md documentation

Mandatory output sections

Include if detected:

  • Project structure: main directories
  • Entry points: main files
  • Configuration: config files
  • Dependencies: any package manager
  • Build/Run commands: from README/scripts

Command sources

  • README.md (look for code blocks)
  • Makefile, Taskfile.yml
  • scripts/ directory
  • CI workflows
  • Only include commands present in repo

Key paths

  • src/, lib/
  • docs/
  • scripts/
  • config/

Notes

When using this generic reference:

  1. Scan for any recognizable patterns
  2. Document actual project structure found
  3. Extract commands from README if available
  4. Note any technologies mentioned in docs
  5. Keep output minimal and factual FILE:references/go.md

Go

Detection signals

  • go.mod
  • go.sum
  • main.go
  • cmd/, internal/, pkg/ directories

Multi-module signals

  • go.work (workspace)
  • Multiple go.mod files
  • cmd/*/main.go (multiple binaries)

Pre-generation sources

  • go.mod (dependencies)
  • Makefile (build commands)
  • config/*.yaml or *.toml

Codebase scan patterns

Source roots

  • cmd/, internal/, pkg/

Layer/folder patterns (record if present)

handler/, service/, repository/, model/, middleware/, config/, util/

Pattern indicators

Pattern Detection Criteria Skill Name
HTTP Handler http.Handler, http.HandlerFunc, gin.Context http-handler
Gin Route gin.Engine, r.GET(, r.POST( gin-route
Echo Route echo.Echo, e.GET(, e.POST( echo-route
Fiber Route fiber.App, app.Get(, app.Post( fiber-route
gRPC Service *.proto, pb.*Server grpc-service
Repository type *Repository interface, *Repository data-repository
Service type *Service interface, *Service service-layer
GORM Model gorm.Model, *gorm.DB gorm-model
sqlx sqlx.DB, sqlx.NamedExec sqlx-usage
Migration goose, golang-migrate db-migration
Middleware func(*Context), middleware.* go-middleware
Worker go func(), sync.WaitGroup, errgroup worker-goroutine
Config viper, envconfig, cleanenv config-loader
Unit Test *_test.go, func Test*(t *testing.T) go-test
Mock mockgen, *_mock.go go-mock

Mandatory output sections

Include if detected:

  • HTTP handlers: API endpoints
  • Services: business logic
  • Repositories: data access
  • Models: data structures
  • Middleware: request interceptors
  • Migrations: database migrations

Command sources

  • Makefile targets
  • README/docs, CI
  • Common: go build, go test, go run
  • Only include commands present in repo

Key paths

  • cmd/, internal/, pkg/
  • api/, handler/
  • migrations/
  • config/ FILE:references/ios.md

iOS (Xcode/Swift)

Detection signals

  • *.xcodeproj, *.xcworkspace
  • Package.swift (SPM)
  • Podfile, Podfile.lock (CocoaPods)
  • Cartfile (Carthage)
  • *.pbxproj
  • Info.plist

Multi-module signals

  • Multiple targets in *.xcodeproj
  • Multiple Package.swift files
  • Workspace with multiple projects
  • Modules/, Packages/, Features/ directories

Pre-generation sources

  • *.xcodeproj/project.pbxproj (target list)
  • Package.swift (dependencies, targets)
  • Podfile (dependencies)
  • *.xcconfig (build configs)
  • Info.plist files

Codebase scan patterns

Source roots

  • */Sources/, */Source/
  • */App/, */Core/, */Features/

Layer/folder patterns (record if present)

Models/, Views/, ViewModels/, Services/, Networking/, Utilities/, Extensions/, Coordinators/

Pattern indicators

Pattern Detection Criteria Skill Name
SwiftUI View struct *: View, var body: some View swiftui-view
UIKit VC UIViewController, viewDidLoad() uikit-viewcontroller
ViewModel @Observable, ObservableObject, @Published viewmodel-observable
Coordinator Coordinator, *Coordinator coordinator-pattern
Repository *Repository, protocol *Repository data-repository
Service *Service, protocol *Service service-layer
Core Data NSManagedObject, @NSManaged, .xcdatamodeld coredata-entity
Realm Object, @Persisted realm-model
Network URLSession, Alamofire, Moya network-client
Dependency @Inject, Container, Swinject di-container
Navigation NavigationStack, NavigationPath navigation-swiftui
Combine Publisher, AnyPublisher, sink combine-publisher
Async/Await async, await, Task { async-await
Unit Test XCTestCase, func test*() xctest
UI Test XCUIApplication, XCUIElement xcuitest

Mandatory output sections

Include if detected:

  • Targets inventory: list from pbxproj
  • Modules/Packages: SPM packages, Pods
  • View architecture: SwiftUI vs UIKit
  • State management: Combine, Observable, etc.
  • Networking layer: URLSession, Alamofire, etc.
  • Persistence: Core Data, Realm, UserDefaults
  • DI setup: Swinject, manual injection

Command sources

  • README/docs with xcodebuild commands
  • fastlane/Fastfile lanes
  • CI workflows (.github/workflows/, .gitlab-ci.yml)
  • Common: xcodebuild test, fastlane test
  • Only include commands present in repo

Key paths

  • */Sources/, */Tests/
  • *.xcodeproj/, *.xcworkspace/
  • Pods/ (if CocoaPods)
  • Packages/ (if SPM local packages) FILE:references/java.md

Java/JVM (Spring, etc.)

Detection signals

  • pom.xml (Maven)
  • build.gradle, build.gradle.kts (Gradle)
  • settings.gradle (multi-module)
  • src/main/java/, src/main/kotlin/
  • application.properties, application.yml

Multi-module signals

  • Multiple pom.xml with <modules>
  • Multiple build.gradle with include()
  • modules/, services/ directories

Pre-generation sources

  • pom.xml or build.gradle* (dependencies)
  • application.properties/yml (config)
  • settings.gradle (modules)
  • docker-compose.yml (services)

Codebase scan patterns

Source roots

  • src/main/java/, src/main/kotlin/
  • src/test/java/, src/test/kotlin/

Layer/folder patterns (record if present)

controller/, service/, repository/, model/, entity/, dto/, config/, exception/, util/

Pattern indicators

Pattern Detection Criteria Skill Name
REST Controller @RestController, @GetMapping, @PostMapping spring-controller
Service @Service, class *Service spring-service
Repository @Repository, JpaRepository, CrudRepository spring-repository
Entity @Entity, @Table, @Id jpa-entity
DTO class *DTO, class *Request, class *Response dto-pattern
Config @Configuration, @Bean spring-config
Component @Component, @Autowired spring-component
Security @EnableWebSecurity, SecurityFilterChain spring-security
Validation @Valid, @NotNull, @Size validation-pattern
Exception Handler @ControllerAdvice, @ExceptionHandler exception-handler
Scheduler @Scheduled, @EnableScheduling scheduled-task
Event ApplicationEvent, @EventListener event-listener
Flyway Migration V*__*.sql, flyway flyway-migration
Liquibase changelog*.xml, liquibase liquibase-migration
Unit Test @Test, @SpringBootTest, MockMvc spring-test
Integration Test @DataJpaTest, @WebMvcTest integration-test

Mandatory output sections

Include if detected:

  • Controllers: REST endpoints
  • Services: business logic
  • Repositories: data access (JPA, JDBC)
  • Entities/DTOs: data models
  • Configuration: Spring beans, profiles
  • Security: auth config

Command sources

  • pom.xml plugins, build.gradle tasks
  • README/docs, CI
  • Common: ./mvnw, ./gradlew, mvn test, gradle test
  • Only include commands present in repo

Key paths

  • src/main/java/, src/main/kotlin/
  • src/main/resources/
  • src/test/
  • db/migration/ (Flyway) FILE:references/node.md

Node.js

Detection signals

  • package.json (without react/react-native)
  • tsconfig.json
  • node_modules/
  • *.js, *.ts, *.mjs, *.cjs entry files

Multi-module signals

  • pnpm-workspace.yaml, lerna.json
  • nx.json, turbo.json
  • Multiple package.json in subdirs
  • packages/, apps/ directories

Pre-generation sources

  • package.json (dependencies, scripts)
  • tsconfig.json (paths, compiler options)
  • .env.example (env vars)
  • docker-compose.yml (services)

Codebase scan patterns

Source roots

  • src/, lib/, app/

Layer/folder patterns (record if present)

controllers/, services/, models/, routes/, middleware/, utils/, config/, types/, repositories/

Pattern indicators

Pattern Detection Criteria Skill Name
Express Route app.get(, app.post(, Router() express-route
Express Middleware (req, res, next), app.use( express-middleware
NestJS Controller @Controller, @Get, @Post nestjs-controller
NestJS Service @Injectable, @Service nestjs-service
NestJS Module @Module, imports:, providers: nestjs-module
Fastify Route fastify.get(, fastify.post( fastify-route
GraphQL Resolver @Resolver, @Query, @Mutation graphql-resolver
TypeORM Entity @Entity, @Column, @PrimaryGeneratedColumn typeorm-entity
Prisma Model prisma.*.create, prisma.*.findMany prisma-usage
Mongoose Model mongoose.Schema, mongoose.model( mongoose-model
Sequelize Model Model.init, DataTypes sequelize-model
Queue Worker Bull, BullMQ, process( queue-worker
Cron Job @Cron, node-cron, cron.schedule cron-job
WebSocket ws, socket.io, io.on( websocket-handler
Unit Test describe(, it(, expect(, jest jest-test
E2E Test supertest, request(app) e2e-test

Mandatory output sections

Include if detected:

  • Routes/controllers: API endpoints
  • Services layer: business logic
  • Database: ORM/ODM usage (TypeORM, Prisma, Mongoose)
  • Middleware: auth, validation, error handling
  • Background jobs: queues, cron jobs
  • WebSocket handlers: real-time features

Command sources

  • package.json scripts section
  • README/docs
  • CI workflows
  • Common: npm run dev, npm run build, npm test
  • Only include commands present in repo

Key paths

  • src/, lib/
  • src/routes/, src/controllers/
  • src/services/, src/models/
  • prisma/, migrations/ FILE:references/php.md

PHP

Detection signals

  • composer.json, composer.lock
  • public/index.php
  • artisan (Laravel)
  • spark (CodeIgniter 4)
  • bin/console (Symfony)
  • app/Config/App.php (CodeIgniter 4)
  • ext-phalcon in composer.json (Phalcon)
  • phalcon/devtools (Phalcon)

Multi-module signals

  • packages/ directory
  • Laravel modules (app/Modules/)
  • CodeIgniter modules (app/Modules/, modules/)
  • Phalcon multi-app (apps/*/)
  • Multiple composer.json in subdirs

Pre-generation sources

  • composer.json (dependencies)
  • .env.example (env vars)
  • config/*.php (Laravel/Symfony)
  • routes/*.php (Laravel)
  • app/Config/* (CodeIgniter 4)
  • apps/*/config/ (Phalcon)

Codebase scan patterns

Source roots

  • app/, src/, apps/

Layer/folder patterns (record if present)

Controllers/, Services/, Repositories/, Models/, Entities/, Http/, Providers/, Console/

Framework-specific structures

Laravel (record if present):

  • app/Http/Controllers, app/Models, database/migrations
  • routes/*.php, resources/views

Symfony (record if present):

  • src/Controller, src/Entity, config/packages, templates

CodeIgniter 4 (record if present):

  • app/Controllers, app/Models, app/Views
  • app/Config/Routes.php, app/Database/Migrations

Phalcon (record if present):

  • apps/*/controllers/, apps/*/Module.php
  • models/, views/

Pattern indicators

Pattern Detection Criteria Skill Name
Laravel Controller extends Controller, public function index laravel-controller
Laravel Model extends Model, protected $fillable laravel-model
Laravel Migration extends Migration, Schema::create laravel-migration
Laravel Service class *Service, app/Services/ laravel-service
Laravel Repository *Repository, interface *Repository laravel-repository
Laravel Job implements ShouldQueue, dispatch( laravel-job
Laravel Event extends Event, event( laravel-event
Symfony Controller #[Route], AbstractController symfony-controller
Symfony Service #[AsService], services.yaml symfony-service
Doctrine Entity #[ORM\Entity], #[ORM\Column] doctrine-entity
Doctrine Migration AbstractMigration, $this->addSql doctrine-migration
CI4 Controller extends BaseController, app/Controllers/ ci4-controller
CI4 Model extends Model, protected $table ci4-model
CI4 Migration extends Migration, $this->forge-> ci4-migration
CI4 Entity extends Entity, app/Entities/ ci4-entity
Phalcon Controller extends Controller, Phalcon\Mvc\Controller phalcon-controller
Phalcon Model extends Model, Phalcon\Mvc\Model phalcon-model
Phalcon Migration Phalcon\Migrations, morphTable phalcon-migration
API Resource extends JsonResource, toArray api-resource
Form Request extends FormRequest, rules() form-request
Middleware implements Middleware, handle( php-middleware
Unit Test extends TestCase, test*(), PHPUnit phpunit-test
Feature Test extends TestCase, $this->get(, $this->post( feature-test

Mandatory output sections

Include if detected:

  • Controllers: HTTP endpoints
  • Models/Entities: data layer
  • Services: business logic
  • Repositories: data access
  • Migrations: database changes
  • Jobs/Events: async processing
  • Business modules: top modules by size

Command sources

  • composer.json scripts
  • php artisan (Laravel)
  • php spark (CodeIgniter 4)
  • bin/console (Symfony)
  • phalcon devtools commands
  • README/docs, CI
  • Only include commands present in repo

Key paths

Laravel:

  • app/, routes/, database/migrations/
  • resources/views/, tests/

Symfony:

  • src/, config/, templates/
  • migrations/, tests/

CodeIgniter 4:

  • app/Controllers/, app/Models/, app/Views/
  • app/Database/Migrations/, tests/

Phalcon:

  • apps/*/controllers/, apps/*/models/
  • apps/*/views/, migrations/ FILE:references/python.md

Python

Detection signals

  • pyproject.toml
  • requirements.txt, requirements-dev.txt
  • Pipfile, poetry.lock
  • setup.py, setup.cfg
  • manage.py (Django)

Multi-module signals

  • Multiple pyproject.toml in subdirs
  • packages/, apps/ directories
  • Django-style apps/ with apps.py

Pre-generation sources

  • pyproject.toml or setup.py
  • requirements*.txt, Pipfile
  • tox.ini, pytest.ini
  • manage.py, settings.py (Django)

Codebase scan patterns

Source roots

  • src/, app/, packages/, tests/

Layer/folder patterns (record if present)

api/, routers/, views/, services/, repositories/, models/, schemas/, utils/, config/

Pattern indicators

Pattern Detection Criteria Skill Name
FastAPI Router APIRouter, @router.get, @router.post fastapi-router
FastAPI Dependency Depends(, def get_*(): fastapi-dependency
Django View View, APIView, def get(self, request) django-view
Django Model models.Model, class Meta: django-model
Django Serializer serializers.Serializer, ModelSerializer drf-serializer
Flask Route @app.route, Blueprint flask-route
Pydantic Model BaseModel, Field(, model_validator pydantic-model
SQLAlchemy Model Base, Column(, relationship( sqlalchemy-model
Alembic Migration alembic/versions/, op.create_table alembic-migration
Repository *Repository, class *Repository data-repository
Service *Service, class *Service service-layer
Celery Task @celery.task, @shared_task celery-task
CLI Command @click.command, typer.Typer cli-command
Unit Test pytest, def test_*():, unittest pytest-test
Fixture @pytest.fixture, conftest.py pytest-fixture

Mandatory output sections

Include if detected:

  • Routers/views: API endpoints
  • Models/schemas: data models (Pydantic, SQLAlchemy, Django)
  • Services: business logic layer
  • Repositories: data access layer
  • Migrations: Alembic, Django migrations
  • Tasks: Celery, background jobs

Command sources

  • pyproject.toml tool sections
  • README/docs, CI
  • Common: python manage.py, pytest, uvicorn, flask run
  • Only include commands present in repo

Key paths

  • src/, app/
  • tests/
  • alembic/, migrations/
  • templates/, static/ (if web) FILE:references/react-native.md

React Native

Detection signals

  • package.json with react-native
  • metro.config.js
  • app.json or app.config.js (Expo)
  • android/, ios/ directories
  • babel.config.js with metro preset

Multi-module signals

  • Monorepo with packages/
  • Multiple app.json files
  • Nx workspace with React Native

Pre-generation sources

  • package.json (dependencies, scripts)
  • app.json or app.config.js
  • metro.config.js
  • babel.config.js
  • tsconfig.json

Codebase scan patterns

Source roots

  • src/, app/

Layer/folder patterns (record if present)

screens/, components/, navigation/, services/, hooks/, store/, api/, utils/, assets/

Pattern indicators

Pattern Detection Criteria Skill Name
Screen *Screen, export function *Screen rn-screen
Component export function *(), StyleSheet.create rn-component
Navigation createNativeStackNavigator, NavigationContainer rn-navigation
Hook use*, export function use*() rn-hook
Redux createSlice, configureStore redux-slice
Zustand create(, useStore zustand-store
React Query useQuery, useMutation react-query
Native Module NativeModules, TurboModule native-module
Async Storage AsyncStorage, @react-native-async-storage async-storage
SQLite expo-sqlite, react-native-sqlite-storage sqlite-storage
Push Notification @react-native-firebase/messaging, expo-notifications push-notification
Deep Link Linking, useURL, expo-linking deep-link
Animation Animated, react-native-reanimated rn-animation
Gesture react-native-gesture-handler, Gesture rn-gesture
Testing @testing-library/react-native, render rntl-test

Mandatory output sections

Include if detected:

  • Screens inventory: dirs under screens/
  • Navigation structure: stack, tab, drawer navigators
  • State management: Redux, Zustand, Context
  • Native modules: custom native code
  • Storage layer: AsyncStorage, SQLite, MMKV
  • Platform-specific: *.android.tsx, *.ios.tsx

Command sources

  • package.json scripts
  • README/docs
  • Common: npm run android, npm run ios, npx expo start
  • Only include commands present in repo

Key paths

  • src/screens/, src/components/
  • src/navigation/, src/store/
  • android/app/, ios/*/
  • assets/ FILE:references/react-web.md

React (Web)

Detection signals

  • package.json with react, react-dom
  • vite.config.ts, next.config.js, craco.config.js
  • tsconfig.json or jsconfig.json
  • src/App.tsx or src/App.jsx
  • public/index.html (CRA)

Multi-module signals

  • pnpm-workspace.yaml, lerna.json
  • Multiple package.json in subdirs
  • packages/, apps/ directories
  • Nx workspace (nx.json)

Pre-generation sources

  • package.json (dependencies, scripts)
  • tsconfig.json (paths, compiler options)
  • vite.config.*, next.config.*, webpack.config.*
  • .env.example (env vars)

Codebase scan patterns

Source roots

  • src/, app/, pages/

Layer/folder patterns (record if present)

components/, hooks/, services/, utils/, store/, api/, types/, contexts/, features/, layouts/

Pattern indicators

Pattern Detection Criteria Skill Name
Component export function *(), export const * = with JSX react-component
Hook use*, export function use*() custom-hook
Context createContext, useContext, *Provider react-context
Redux createSlice, configureStore, useSelector redux-slice
Zustand create(, useStore zustand-store
React Query useQuery, useMutation, QueryClient react-query
Form useForm, react-hook-form, Formik form-handling
Router createBrowserRouter, Route, useNavigate react-router
API Client axios, fetch, ky api-client
Testing @testing-library/react, render, screen rtl-test
Storybook *.stories.tsx, Meta, StoryObj storybook
Styled styled-components, @emotion, styled( styled-component
Tailwind className="*", tailwind.config.js tailwind-usage
i18n useTranslation, i18next, t() i18n-usage
Auth useAuth, AuthProvider, PrivateRoute auth-pattern

Mandatory output sections

Include if detected:

  • Components inventory: dirs under components/
  • Features/pages: dirs under features/, pages/
  • State management: Redux, Zustand, Context
  • Routing setup: React Router, Next.js pages
  • API layer: axios instances, fetch wrappers
  • Styling approach: CSS modules, Tailwind, styled-components
  • Form handling: react-hook-form, Formik

Command sources

  • package.json scripts section
  • README/docs
  • CI workflows
  • Common: npm run dev, npm run build, npm test
  • Only include commands present in repo

Key paths

  • src/components/, src/hooks/
  • src/pages/, src/features/
  • src/store/, src/api/
  • public/, dist/, build/ FILE:references/ruby.md

Ruby/Rails

Detection signals

  • Gemfile
  • Gemfile.lock
  • config.ru
  • Rakefile
  • config/application.rb (Rails)

Multi-module signals

  • Multiple Gemfile in subdirs
  • engines/ directory (Rails engines)
  • gems/ directory (monorepo)

Pre-generation sources

  • Gemfile (dependencies)
  • config/database.yml
  • config/routes.rb (Rails)
  • .env.example

Codebase scan patterns

Source roots

  • app/, lib/

Layer/folder patterns (record if present)

controllers/, models/, services/, jobs/, mailers/, channels/, helpers/, concerns/

Pattern indicators

Pattern Detection Criteria Skill Name
Rails Controller < ApplicationController, def index rails-controller
Rails Model < ApplicationRecord, has_many, belongs_to rails-model
Rails Migration < ActiveRecord::Migration, create_table rails-migration
Service Object class *Service, def call service-object
Rails Job < ApplicationJob, perform_later rails-job
Mailer < ApplicationMailer, mail( rails-mailer
Channel < ApplicationCable::Channel action-cable
Serializer < ActiveModel::Serializer, attributes serializer
Concern extend ActiveSupport::Concern rails-concern
Sidekiq Worker include Sidekiq::Worker, perform_async sidekiq-worker
Grape API Grape::API, resource : grape-api
RSpec Test RSpec.describe, it " rspec-test
Factory FactoryBot.define, factory : factory-bot
Rake Task task :, namespace : rake-task

Mandatory output sections

Include if detected:

  • Controllers: HTTP endpoints
  • Models: ActiveRecord associations
  • Services: business logic
  • Jobs: background processing
  • Migrations: database schema

Command sources

  • Gemfile scripts
  • Rakefile tasks
  • bin/rails, bin/rake
  • README/docs, CI
  • Only include commands present in repo

Key paths

  • app/controllers/, app/models/
  • app/services/, app/jobs/
  • db/migrate/
  • spec/, test/
  • lib/ FILE:references/rust.md

Rust

Detection signals

  • Cargo.toml
  • Cargo.lock
  • src/main.rs or src/lib.rs
  • target/ directory

Multi-module signals

  • [workspace] in Cargo.toml
  • Multiple Cargo.toml in subdirs
  • crates/, packages/ directories

Pre-generation sources

  • Cargo.toml (dependencies, features)
  • build.rs (build script)
  • rust-toolchain.toml (toolchain)

Codebase scan patterns

Source roots

  • src/, crates/*/src/

Layer/folder patterns (record if present)

handlers/, services/, models/, db/, api/, utils/, error/, config/

Pattern indicators

Pattern Detection Criteria Skill Name
Axum Handler axum::, Router, async fn handler axum-handler
Actix Route actix_web::, #[get], #[post] actix-route
Rocket Route rocket::, #[get], #[post] rocket-route
Service impl *Service, pub struct *Service rust-service
Repository *Repository, trait *Repository rust-repository
Diesel Model diesel::, Queryable, Insertable diesel-model
SQLx sqlx::, FromRow, query_as! sqlx-model
SeaORM sea_orm::, Entity, ActiveModel seaorm-entity
Error Type thiserror, anyhow, #[derive(Error)] error-type
CLI clap, #[derive(Parser)] cli-app
Async Task tokio::spawn, async fn async-task
Trait pub trait *, impl * for rust-trait
Unit Test #[cfg(test)], #[test] rust-test
Integration Test tests/, #[tokio::test] integration-test

Mandatory output sections

Include if detected:

  • Handlers/routes: API endpoints
  • Services: business logic
  • Models/entities: data structures
  • Error types: custom errors
  • Migrations: diesel/sqlx migrations

Command sources

  • Cargo.toml scripts/aliases
  • Makefile, README/docs
  • Common: cargo build, cargo test, cargo run
  • Only include commands present in repo

Key paths

  • src/, crates/
  • tests/
  • migrations/
  • examples/