Agent Check Skill
Purpose: Analyze audit targets and map them to the appropriate domain or config agents needed.
Input: targets (string[]) - File paths or target repositories from scope-check
Output: agents: string[] - List of agent names needed (e.g., ["eslint-agent", "typescript-agent", "react-component-agent"])
How to Execute
This is a FILE CLASSIFICATION task - analyze target files and determine which agents are needed:
- Scan each target file/directory for file patterns and content indicators
- Match patterns to agent mapping tables below
- Collect all matching agents into array
- Remove duplicates
- Return ONLY:
agents: [...]
- Complete in under 300 tokens
Expected output format:
agents: ["eslint-agent", "prettier-agent", "typescript-agent"]
File Pattern Matching
Step 1: Detect File Types
Scan target files for these patterns and map to agents:
| File Pattern |
Agent |
Category |
eslint.config.js, .eslintrc*, eslint.json |
eslint-agent |
Config |
prettier.config.*, .prettierrc*, .prettierignore |
prettier-agent |
Config |
tsconfig.json, tsconfig.*.json |
typescript-agent |
Config |
vitest.config.*, vitest.workspace.* |
vitest-agent |
Config |
vite.config.* |
vite-agent |
Config |
turbo.json |
turbo-config-agent |
Config |
tailwind.config.* |
tailwind-agent |
Config |
docker-compose.yml, docker-compose.yaml |
docker-compose-agent |
Config |
Dockerfile, .dockerignore |
dockerignore-agent |
Config |
.editorconfig |
editorconfig-agent |
Config |
commitlint.config.* |
commitlint-agent |
Config |
.gitignore, .gitattributes |
gitignore-agent, gitattributes-agent |
Config |
.github/workflows/*.yml, .github/workflows/*.yaml |
github-workflow-agent |
Config |
.husky/, husky.config.* |
husky-agent |
Config |
nodemon.json, nodemon.config.* |
nodemon-agent |
Config |
.npmrc.template, .npmrc |
npmrc-template-agent |
Config |
.nvmrc |
nvmrc-agent |
Config |
CLAUDE.md, .claude/ |
claude-md-agent |
Config |
.repomixignore, repomix.json |
repomix-config-agent |
Config |
package.json (root) |
root-package-json-agent |
Config |
README.md (root) |
readme-agent |
Config |
pnpm-workspace.yaml |
pnpm-workspace-agent |
Config |
.vscode/, vscode.json |
vscode-agent |
Config |
Step 2: Detect Code Content
For code files (.ts, .tsx, .js, .jsx), scan content patterns:
| Pattern |
Agent |
Trigger |
React hooks, JSX, .tsx files |
react-component-agent |
useState, useEffect, JSX, export const Component |
| Service files, API routes |
data-service-agent |
Service, Repository, @POST, @GET, route, handler |
| Prisma schema references |
prisma-database-agent |
import.*Prisma, prisma., schema.prisma |
| Test files |
unit-test-agent |
.test.ts, .test.js, describe, it(, test( |
| Integration test patterns |
integration-test-agent |
integration.test.ts, db.test.ts, api.test.ts |
| E2E test patterns |
e2e-test-agent |
e2e.test.ts, cypress, playwright, browser, page. |
Step 3: Detect Domain Context
Analyze repository structure and content for domain indicators:
| Context |
Agent |
Detection |
| Monorepo workspace setup |
monorepo-setup-agent |
pnpm-workspace.yaml presence + multiple packages |
| React app structure |
react-app-agent |
pages/, components/, App.tsx, app router patterns |
| API service setup |
data-service-agent |
controllers/, services/, repositories/, API decorators |
| Database setup |
prisma-database-agent |
prisma/schema.prisma, migrations/ directory |
Agent Mapping Reference
Config Agents (28 total)
Build Tools (8):
docker-compose-agent, dockerignore-agent, pnpm-workspace-agent
postcss-agent, tailwind-agent, turbo-config-agent, vite-agent, vitest-agent
Code Quality (3):
editorconfig-agent, eslint-agent, prettier-agent
Version Control (5):
commitlint-agent, gitattributes-agent, github-workflow-agent
gitignore-agent, husky-agent
Workspace (12):
claude-md-agent, env-example-agent, monorepo-root-structure-agent
nodemon-agent, npmrc-template-agent, nvmrc-agent, readme-agent
repomix-config-agent, root-package-json-agent, scripts-agent
typescript-agent, vscode-agent
Domain Agents (12 total)
Backend (2):
data-service-agent, integration-service-agent
Database (1):
Frontend (5):
react-app-agent, react-component-agent, mfe-host-agent
mfe-remote-agent, shadcn-component-agent
Testing (3):
unit-test-agent, integration-test-agent, e2e-test-agent
Monorepo (1):
Selection Algorithm
agents = []
FOR each target file/directory:
1. Check file patterns (Step 1) -> add matching agents
2. If code file: check content patterns (Step 2) -> add matching agents
3. Check domain context (Step 3) -> add matching agents
REMOVE duplicates from agents array
RETURN agents
Examples
Example 1: ESLint Config File
Target: /home/user/code/metasaver-com/eslint.config.js
Analysis:
- File pattern: "eslint.config.js" -> eslint-agent
- Content: ESLint config -> code-quality context
Output: ["eslint-agent"]
Example 2: React Component Files
Target: /home/user/code/metasaver-com/src/components/
Analysis:
- Files: *.tsx files with JSX/React hooks
- Content patterns: useState, useEffect, export const Component
- Domain: React component library
Output: ["react-component-agent", "typescript-agent", "eslint-agent"]
Example 3: Full Package Audit
Target: /home/user/code/multi-mono/packages/utils/
Analysis:
- tsconfig.json -> typescript-agent
- eslint.config.js -> eslint-agent
- *.test.ts files -> unit-test-agent
- package.json -> root-package-json-agent
- pnpm-workspace.yaml (parent) -> pnpm-workspace-agent
Output: ["typescript-agent", "eslint-agent", "unit-test-agent", "root-package-json-agent", "pnpm-workspace-agent"]
Example 4: Prisma Database Setup
Target: /home/user/code/metasaver-com/prisma/
Analysis:
- schema.prisma -> prisma-database-agent
- migrations/ directory -> prisma-database-agent
- Database service files -> data-service-agent
Output: ["prisma-database-agent", "data-service-agent"]
Example 5: Multi-Domain Repository
Target: /home/user/code/metasaver-com/ (full repo)
Analysis:
- Root configs: eslint.config.js, tsconfig.json, prettier.config.js
- App structure: React components in src/components
- API routes: src/app/api/
- Database: prisma/schema.prisma
- Tests: src/**/*.test.ts
Output: [
"eslint-agent", "typescript-agent", "prettier-agent",
"react-component-agent", "data-service-agent",
"prisma-database-agent", "unit-test-agent"
]
Special Cases
| Case |
Logic |
| Root package.json |
Always include root-package-json-agent (not consumed by workspace agents) |
| Monorepo workspace |
Include pnpm-workspace-agent for workspace configuration |
| Config-only target |
Return only config agents (ESLint, Prettier, TypeScript, etc.) |
| Code-only target |
Include code-domain agents + code-quality agents (ESLint, TypeScript) |
| Mixed target |
Include ALL matching agents (config + domain) |
| Empty/no matches |
Return empty array [] |
Integration
This skill is referenced by:
agent-check-agent - Intelligent routing to appropriate agents for audit workflow
/audit command - Phase 2 (agent selection) uses this skill output
/build command - Feature/component building phase uses this skill
The output agents[] is used to spawn multiple agents in parallel for comprehensive audit coverage.
1---2name: agent-check3description: Use when mapping audit targets to appropriate config or domain agents. Analyzes file types, patterns, and content to determine which agents should audit each file/target. Returns agents[] needed for audit workflow.4---5
6# Agent Check Skill
7
8**Purpose:** Analyze audit targets and map them to the appropriate domain or config agents needed.
9
10**Input:** `targets` (string[]) - File paths or target repositories from scope-check
11
12**Output:** `agents: string[]` - List of agent names needed (e.g., `["eslint-agent", "typescript-agent", "react-component-agent"]`)
13
14---
15
16## How to Execute
17
18This is a FILE CLASSIFICATION task - analyze target files and determine which agents are needed:
19
201. Scan each target file/directory for file patterns and content indicators
212. Match patterns to agent mapping tables below
223. Collect all matching agents into array
234. Remove duplicates
245. Return ONLY: `agents: [...]`
256. Complete in under 300 tokens
26
27**Expected output format:**
28
29```
30agents: ["eslint-agent", "prettier-agent", "typescript-agent"]
31```
32
33---
34
35## File Pattern Matching
36
37### Step 1: Detect File Types
38
39Scan target files for these patterns and map to agents:
40
41| File Pattern | Agent | Category |
42| ------------ | ----- | -------- |
43| `eslint.config.js`, `.eslintrc*`, `eslint.json` | `eslint-agent` | Config |
44| `prettier.config.*`, `.prettierrc*`, `.prettierignore` | `prettier-agent` | Config |
45| `tsconfig.json`, `tsconfig.*.json` | `typescript-agent` | Config |
46| `vitest.config.*`, `vitest.workspace.*` | `vitest-agent` | Config |
47| `vite.config.*` | `vite-agent` | Config |
48| `turbo.json` | `turbo-config-agent` | Config |
49| `tailwind.config.*` | `tailwind-agent` | Config |
50| `docker-compose.yml`, `docker-compose.yaml` | `docker-compose-agent` | Config |
51| `Dockerfile`, `.dockerignore` | `dockerignore-agent` | Config |
52| `.editorconfig` | `editorconfig-agent` | Config |
53| `commitlint.config.*` | `commitlint-agent` | Config |
54| `.gitignore`, `.gitattributes` | `gitignore-agent`, `gitattributes-agent` | Config |
55| `.github/workflows/*.yml`, `.github/workflows/*.yaml` | `github-workflow-agent` | Config |
56| `.husky/`, `husky.config.*` | `husky-agent` | Config |
57| `nodemon.json`, `nodemon.config.*` | `nodemon-agent` | Config |
58| `.npmrc.template`, `.npmrc` | `npmrc-template-agent` | Config |
59| `.nvmrc` | `nvmrc-agent` | Config |
60| `CLAUDE.md`, `.claude/` | `claude-md-agent` | Config |
61| `.repomixignore`, `repomix.json` | `repomix-config-agent` | Config |
62| `package.json` (root) | `root-package-json-agent` | Config |
63| `README.md` (root) | `readme-agent` | Config |
64| `pnpm-workspace.yaml` | `pnpm-workspace-agent` | Config |
65| `.vscode/`, `vscode.json` | `vscode-agent` | Config |
66
67---
68
69### Step 2: Detect Code Content
70
71For code files (`.ts`, `.tsx`, `.js`, `.jsx`), scan content patterns:
72
73| Pattern | Agent | Trigger |
74| ------- | ----- | ------- |
75| React hooks, JSX, `.tsx` files | `react-component-agent` | `useState`, `useEffect`, `JSX`, `export const Component` |
76| Service files, API routes | `data-service-agent` | `Service`, `Repository`, `@POST`, `@GET`, `route`, `handler` |
77| Prisma schema references | `prisma-database-agent` | `import.*Prisma`, `prisma.`, `schema.prisma` |
78| Test files | `unit-test-agent` | `.test.ts`, `.test.js`, `describe`, `it(`, `test(` |
79| Integration test patterns | `integration-test-agent` | `integration.test.ts`, `db.test.ts`, `api.test.ts` |
80| E2E test patterns | `e2e-test-agent` | `e2e.test.ts`, `cypress`, `playwright`, `browser`, `page.` |
81
82---
83
84### Step 3: Detect Domain Context
85
86Analyze repository structure and content for domain indicators:
87
88| Context | Agent | Detection |
89| ------- | ----- | --------- |
90| Monorepo workspace setup | `monorepo-setup-agent` | `pnpm-workspace.yaml` presence + multiple packages |
91| React app structure | `react-app-agent` | `pages/`, `components/`, `App.tsx`, app router patterns |
92| API service setup | `data-service-agent` | `controllers/`, `services/`, `repositories/`, API decorators |
93| Database setup | `prisma-database-agent` | `prisma/schema.prisma`, `migrations/` directory |
94
95---
96
97## Agent Mapping Reference
98
99### Config Agents (28 total)
100
101**Build Tools (8):**
102- `docker-compose-agent`, `dockerignore-agent`, `pnpm-workspace-agent`
103- `postcss-agent`, `tailwind-agent`, `turbo-config-agent`, `vite-agent`, `vitest-agent`
104
105**Code Quality (3):**
106- `editorconfig-agent`, `eslint-agent`, `prettier-agent`
107
108**Version Control (5):**
109- `commitlint-agent`, `gitattributes-agent`, `github-workflow-agent`
110- `gitignore-agent`, `husky-agent`
111
112**Workspace (12):**
113- `claude-md-agent`, `env-example-agent`, `monorepo-root-structure-agent`
114- `nodemon-agent`, `npmrc-template-agent`, `nvmrc-agent`, `readme-agent`
115- `repomix-config-agent`, `root-package-json-agent`, `scripts-agent`
116- `typescript-agent`, `vscode-agent`
117
118### Domain Agents (12 total)
119
120**Backend (2):**
121- `data-service-agent`, `integration-service-agent`
122
123**Database (1):**
124- `prisma-database-agent`
125
126**Frontend (5):**
127- `react-app-agent`, `react-component-agent`, `mfe-host-agent`
128- `mfe-remote-agent`, `shadcn-component-agent`
129
130**Testing (3):**
131- `unit-test-agent`, `integration-test-agent`, `e2e-test-agent`
132
133**Monorepo (1):**
134- `monorepo-setup-agent`
135
136---
137
138## Selection Algorithm
139
140```
141agents = []
142
143FOR each target file/directory:
144 1. Check file patterns (Step 1) -> add matching agents
145 2. If code file: check content patterns (Step 2) -> add matching agents
146 3. Check domain context (Step 3) -> add matching agents
147
148REMOVE duplicates from agents array
149RETURN agents
150```
151
152---
153
154## Examples
155
156### Example 1: ESLint Config File
157
158```
159Target: /home/user/code/metasaver-com/eslint.config.js
160
161Analysis:
162 - File pattern: "eslint.config.js" -> eslint-agent
163 - Content: ESLint config -> code-quality context
164
165Output: ["eslint-agent"]
166```
167
168### Example 2: React Component Files
169
170```
171Target: /home/user/code/metasaver-com/src/components/
172
173Analysis:
174 - Files: *.tsx files with JSX/React hooks
175 - Content patterns: useState, useEffect, export const Component
176 - Domain: React component library
177
178Output: ["react-component-agent", "typescript-agent", "eslint-agent"]
179```
180
181### Example 3: Full Package Audit
182
183```
184Target: /home/user/code/multi-mono/packages/utils/
185
186Analysis:
187 - tsconfig.json -> typescript-agent
188 - eslint.config.js -> eslint-agent
189 - *.test.ts files -> unit-test-agent
190 - package.json -> root-package-json-agent
191 - pnpm-workspace.yaml (parent) -> pnpm-workspace-agent
192
193Output: ["typescript-agent", "eslint-agent", "unit-test-agent", "root-package-json-agent", "pnpm-workspace-agent"]
194```
195
196### Example 4: Prisma Database Setup
197
198```
199Target: /home/user/code/metasaver-com/prisma/
200
201Analysis:
202 - schema.prisma -> prisma-database-agent
203 - migrations/ directory -> prisma-database-agent
204 - Database service files -> data-service-agent
205
206Output: ["prisma-database-agent", "data-service-agent"]
207```
208
209### Example 5: Multi-Domain Repository
210
211```
212Target: /home/user/code/metasaver-com/ (full repo)
213
214Analysis:
215 - Root configs: eslint.config.js, tsconfig.json, prettier.config.js
216 - App structure: React components in src/components
217 - API routes: src/app/api/
218 - Database: prisma/schema.prisma
219 - Tests: src/**/*.test.ts
220
221Output: [
222 "eslint-agent", "typescript-agent", "prettier-agent",
223 "react-component-agent", "data-service-agent",
224 "prisma-database-agent", "unit-test-agent"
225]
226```
227
228---
229
230## Special Cases
231
232| Case | Logic |
233| ---- | ----- |
234| Root package.json | Always include `root-package-json-agent` (not consumed by workspace agents) |
235| Monorepo workspace | Include `pnpm-workspace-agent` for workspace configuration |
236| Config-only target | Return only config agents (ESLint, Prettier, TypeScript, etc.) |
237| Code-only target | Include code-domain agents + code-quality agents (ESLint, TypeScript) |
238| Mixed target | Include ALL matching agents (config + domain) |
239| Empty/no matches | Return empty array `[]` |
240
241---
242
243## Integration
244
245This skill is referenced by:
246
247- `agent-check-agent` - Intelligent routing to appropriate agents for audit workflow
248- `/audit` command - Phase 2 (agent selection) uses this skill output
249- `/build` command - Feature/component building phase uses this skill
250
251The output `agents[]` is used to spawn multiple agents in parallel for comprehensive audit coverage.