agents-config 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -4
- package/README.md +6 -23
- package/adapters/claude.template.md +0 -1
- package/adapters/codex.template.md +0 -1
- package/adapters/copilot.template.md +0 -1
- package/adapters/cursor.template.md +0 -1
- package/adapters/windsurf.template.md +0 -1
- package/bin/agents-init.js +13 -0
- package/instructions/development-standards.instructions.md +2 -2
- package/package.json +1 -1
- package/prompts/create-pr.prompt.md +8 -13
- package/prompts/scaffold-component.prompt.md +33 -36
- package/rules/gemini.md +1 -1
package/AGENTS.md
CHANGED
|
@@ -188,10 +188,9 @@ Include: retry logic, rate limit handling, proper attribution
|
|
|
188
188
|
### 4. Performance Optimization Agent
|
|
189
189
|
**Purpose**: Analyze and optimize React component performance
|
|
190
190
|
|
|
191
|
-
**
|
|
191
|
+
**Rule**: [web-performance](./rules/web-performance.md)
|
|
192
192
|
|
|
193
193
|
**Capabilities**:
|
|
194
|
-
- Applies Vercel React Best Practices (45 rules across 8 categories)
|
|
195
194
|
- Analyzes bundle size and tree-shaking opportunities
|
|
196
195
|
- Identifies re-render issues and optimization opportunities
|
|
197
196
|
- Implements memoization patterns (`React.memo`, `useMemo`, `useCallback`)
|
|
@@ -225,7 +224,7 @@ Priority: Apply bundle optimization and re-render prevention patterns
|
|
|
225
224
|
- Creates or updates component spec before refactoring
|
|
226
225
|
- Updates components to latest framework patterns
|
|
227
226
|
- Applies TypeScript best practices
|
|
228
|
-
- Applies
|
|
227
|
+
- Applies performance optimization patterns
|
|
229
228
|
- Improves accessibility (ARIA labels, keyboard navigation)
|
|
230
229
|
- Optimizes performance (memoization, lazy loading)
|
|
231
230
|
- Maintains backward compatibility where possible
|
|
@@ -419,7 +418,6 @@ Include: accessibility section, code examples, interactive controls
|
|
|
419
418
|
| `skills/accessibility-audit/` | Accessibility verification checklist | Accessibility Audit |
|
|
420
419
|
| `skills/scaffold-component/` | Component scaffolding workflow | Component Scaffolding |
|
|
421
420
|
| `skills/integrate-gemini/` | AI integration patterns | AI Integration |
|
|
422
|
-
| `skills/vercel-react-best-practices/` | Performance optimization rules (45 rules, 8 categories) | Performance Optimization |
|
|
423
421
|
| `skills/workflows/` | Development workflows (SDD, setup) | All agents following SDD |
|
|
424
422
|
|
|
425
423
|
---
|
package/README.md
CHANGED
|
@@ -148,27 +148,10 @@ Implement Google Gemini API integration with:
|
|
|
148
148
|
- Loading and streaming UI states
|
|
149
149
|
- Attribution and safety requirements
|
|
150
150
|
|
|
151
|
-
#### **`
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
- Server-side performance
|
|
156
|
-
- Client-side data fetching
|
|
157
|
-
- Rendering optimization
|
|
158
|
-
- Re-render prevention
|
|
159
|
-
- Event handling and refs
|
|
160
|
-
- JavaScript optimization
|
|
161
|
-
|
|
162
|
-
**Installation:**
|
|
163
|
-
```bash
|
|
164
|
-
npx add-skill vercel-labs/agent-skills
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Includes subdirectories:
|
|
168
|
-
- **`rules/`** - Individual rule documents (45+ files organized by category)
|
|
169
|
-
- **`workflows/`** - Task-specific workflows:
|
|
170
|
-
- `sdd-workflow.md` - Spec-driven development workflow
|
|
171
|
-
- `setup-orchestration.md` - Project setup orchestration
|
|
151
|
+
#### **`workflows/`**
|
|
152
|
+
Task-specific development workflows:
|
|
153
|
+
- **`sdd-workflow.md`** - Spec-driven development workflow
|
|
154
|
+
- **`setup-orchestration.md`** - Project setup orchestration
|
|
172
155
|
|
|
173
156
|
## Key Principles
|
|
174
157
|
|
|
@@ -186,7 +169,7 @@ Reference the appropriate skill or rule based on the development task:
|
|
|
186
169
|
- Use `accessibility-audit` before marking features complete
|
|
187
170
|
- Use `scaffold-component` when creating new components
|
|
188
171
|
- Use `integrate-gemini` for AI feature implementation
|
|
189
|
-
-
|
|
172
|
+
- Reference `web-performance` rules for optimization guidance
|
|
190
173
|
|
|
191
174
|
### For Developers
|
|
192
175
|
- Start with [AGENTS.md](AGENTS.md) for core principles
|
|
@@ -260,4 +243,4 @@ MIT © Eric Thayer
|
|
|
260
243
|
|
|
261
244
|
---
|
|
262
245
|
|
|
263
|
-
**Last Updated:** January 31,
|
|
246
|
+
**Last Updated:** January 31, 2026
|
|
@@ -25,7 +25,6 @@ For complex tasks, use these specialized skill workflows:
|
|
|
25
25
|
- `.agents/skills/accessibility-audit/SKILL.md` - Comprehensive accessibility testing
|
|
26
26
|
- `.agents/skills/scaffold-component/SKILL.md` - Component scaffolding with specs
|
|
27
27
|
- `.agents/skills/integrate-gemini/SKILL.md` - AI integration patterns (if enabled)
|
|
28
|
-
- `.agents/skills/vercel-react-best-practices/SKILL.md` - Performance patterns
|
|
29
28
|
|
|
30
29
|
### Instructions (in .agents/instructions/)
|
|
31
30
|
|
|
@@ -21,7 +21,6 @@ This project follows shared agentic configuration:
|
|
|
21
21
|
- `.agents/skills/accessibility-audit/SKILL.md` - Accessibility compliance checking
|
|
22
22
|
- `.agents/skills/scaffold-component/SKILL.md` - Component scaffolding workflow
|
|
23
23
|
- `.agents/skills/integrate-gemini/SKILL.md` - AI integration patterns
|
|
24
|
-
- `.agents/skills/vercel-react-best-practices/SKILL.md` - Performance optimization
|
|
25
24
|
|
|
26
25
|
## Agent Configuration
|
|
27
26
|
|
|
@@ -21,7 +21,6 @@ This project follows shared agentic configuration guidelines. All rules, skills,
|
|
|
21
21
|
- **accessibility-audit/SKILL.md** - WCAG 2.2 AA compliance auditing
|
|
22
22
|
- **scaffold-component/SKILL.md** - Component scaffolding with accessibility built-in
|
|
23
23
|
- **integrate-gemini/SKILL.md** - AI feature integration patterns (if Gemini enabled)
|
|
24
|
-
- **vercel-react-best-practices/SKILL.md** - Performance optimization patterns
|
|
25
24
|
|
|
26
25
|
### Instructions (in .agents/instructions/)
|
|
27
26
|
|
|
@@ -21,7 +21,6 @@ This project follows shared agentic configuration rules:
|
|
|
21
21
|
- `.agents/skills/accessibility-audit/SKILL.md` - WCAG compliance checking
|
|
22
22
|
- `.agents/skills/scaffold-component/SKILL.md` - Component generation
|
|
23
23
|
- `.agents/skills/integrate-gemini/SKILL.md` - AI feature patterns
|
|
24
|
-
- `.agents/skills/vercel-react-best-practices/SKILL.md` - Performance optimization
|
|
25
24
|
|
|
26
25
|
## Code Generation Rules
|
|
27
26
|
|
|
@@ -23,7 +23,6 @@ This project uses shared agentic configuration:
|
|
|
23
23
|
- `.agents/skills/accessibility-audit/SKILL.md` - WCAG 2.2 AA compliance
|
|
24
24
|
- `.agents/skills/scaffold-component/SKILL.md` - Component generation workflow
|
|
25
25
|
- `.agents/skills/integrate-gemini/SKILL.md` - AI integration patterns
|
|
26
|
-
- `.agents/skills/vercel-react-best-practices/SKILL.md` - Performance optimization
|
|
27
26
|
|
|
28
27
|
## Code Generation Standards
|
|
29
28
|
|
package/bin/agents-init.js
CHANGED
|
@@ -129,6 +129,7 @@ ${colors.bright}Description:${colors.reset}
|
|
|
129
129
|
|
|
130
130
|
${colors.bright}What gets copied to .agents/:${colors.reset}
|
|
131
131
|
- AGENTS.md (core guidelines)
|
|
132
|
+
- prompts/ (reusable AI workflow templates)
|
|
132
133
|
- rules/ (coding standards based on your stack)
|
|
133
134
|
- skills/ (specialized workflows)
|
|
134
135
|
- instructions/ (process guidelines)
|
|
@@ -382,6 +383,18 @@ function copyAgentsFolder(projectDir, config, filesToCreate) {
|
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
385
|
|
|
386
|
+
// Prompts (reusable AI agent workflows)
|
|
387
|
+
const promptsDir = path.join(PACKAGE_ROOT, 'prompts');
|
|
388
|
+
const promptsDest = path.join(agentsDir, 'prompts');
|
|
389
|
+
if (fs.existsSync(promptsDir)) {
|
|
390
|
+
filesToCreate.push({
|
|
391
|
+
src: promptsDir,
|
|
392
|
+
dest: promptsDest,
|
|
393
|
+
relativePath: '.agents/prompts/',
|
|
394
|
+
type: 'folder',
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
385
398
|
// Rules
|
|
386
399
|
for (const rule of rules) {
|
|
387
400
|
const src = path.join(PACKAGE_ROOT, 'rules', `${rule}.md`);
|
|
@@ -5,8 +5,8 @@ applyTo: '**'
|
|
|
5
5
|
|
|
6
6
|
This document outlines the standards and best practices for Application Development which uses React, TypeScript, Material UI, and follows the [Airbnb style guide](https://airbnb.io/javascript/) page.
|
|
7
7
|
|
|
8
|
-
## Web Interface Guidelines
|
|
9
|
-
ALWAYS refer to the
|
|
8
|
+
## Web Interface Guidelines
|
|
9
|
+
ALWAYS refer to the [Web Interface Guidelines](./web-interface-guidelines.instructions.md) for detailed explicit guidelines when building _any_ web interface.
|
|
10
10
|
|
|
11
11
|
## React
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A comprehensive knowledge base and skill library for building production-grade React applications with AI-powered tools and best practices.",
|
|
5
5
|
"author": "Eric Thayer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,11 +10,10 @@ Analyze the last git commit and create a comprehensive PR description.
|
|
|
10
10
|
## Instructions
|
|
11
11
|
|
|
12
12
|
1. **Get the latest commit details:**
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- include_diff: `true`
|
|
13
|
+
- Get repository info from `git remote get-url origin`
|
|
14
|
+
- Parse owner and repo from the URL
|
|
15
|
+
- Get commit SHA from `git log -1 --pretty=format:"%H"`
|
|
16
|
+
- Use the commit data to analyze changes
|
|
18
17
|
|
|
19
18
|
2. **Analyze the commit data:**
|
|
20
19
|
- Extract commit message (title and body)
|
|
@@ -55,21 +54,17 @@ Analyze the last git commit and create a comprehensive PR description.
|
|
|
55
54
|
# Get current branch
|
|
56
55
|
BRANCH=$(git branch --show-current)
|
|
57
56
|
|
|
58
|
-
# Create PR with
|
|
57
|
+
# Create PR with generated description
|
|
59
58
|
gh pr create \
|
|
60
59
|
--title "$(git log -1 --pretty=format:'%s')" \
|
|
61
|
-
--body
|
|
60
|
+
--body-file /tmp/pr-body.md \
|
|
62
61
|
--base main \
|
|
63
62
|
--head $BRANCH
|
|
64
63
|
```
|
|
65
64
|
|
|
66
|
-
See `.github/GITHUB_AUTH_SETUP.md` for authentication setup.
|
|
67
|
-
|
|
68
65
|
## Context
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
- See `.github/pr-template-commits.md` for reusable PR description template
|
|
72
|
-
- See `.github/GITHUB_AUTH_SETUP.md` for GitHub authentication guide
|
|
66
|
+
- Default base branch: `main` (or detect from `git remote show origin | grep 'HEAD branch'`)
|
|
67
|
+
- Repository info detected dynamically from git remote
|
|
73
68
|
|
|
74
69
|
## Success Criteria
|
|
75
70
|
✅ PR created with descriptive title
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
agent: agent
|
|
3
|
-
description: Create a React component
|
|
3
|
+
description: Create a React component following project conventions and accessibility standards.
|
|
4
4
|
---
|
|
5
|
-
#
|
|
6
|
-
**Read Instructions** from `./instructions/development-standards.instructions.md` before proceeding to see if there is anything specific to this prompt and helpful context when building React components.
|
|
5
|
+
# Scaffold Component
|
|
7
6
|
|
|
8
|
-
**
|
|
9
|
-
|
|
7
|
+
**Read Instructions** from [Development Standards](../instructions/development-standards.instructions.md) before proceeding for helpful context when building React components.
|
|
8
|
+
|
|
9
|
+
**Development Process**: Follow [Spec-Driven Development](../skills/workflows/sdd-workflow.md)
|
|
10
|
+
- Create component spec FIRST before generating code
|
|
10
11
|
- Spec location: `src/components/${category}/${componentName}/${componentName}.spec.md`
|
|
11
12
|
- Update spec changelog for any changes during development
|
|
12
13
|
|
|
@@ -19,39 +20,35 @@ description: Create a React component named [ComponentName] that accepts props d
|
|
|
19
20
|
|
|
20
21
|
## Required Inputs
|
|
21
22
|
Don't assume, always ask for the following inputs before generating code:
|
|
22
|
-
1. **Component Name** (
|
|
23
|
-
2. **
|
|
24
|
-
3. **Category** (
|
|
23
|
+
1. **Component Name** (PascalCase, e.g., "Button", "DataGrid", "UserCard")
|
|
24
|
+
2. **Base Component** (what to extend if any, e.g., MUI Button, native button)
|
|
25
|
+
3. **Category** (e.g., ui, layout, forms, feedback, navigation)
|
|
25
26
|
|
|
26
27
|
## Generation Rules
|
|
27
|
-
- Create
|
|
28
|
+
- Create files in `./src/components/${category}/${componentName}/`:
|
|
28
29
|
- `${componentName}.tsx` - Main component
|
|
29
|
-
- `${componentName}.
|
|
30
|
-
- `${componentName}.
|
|
30
|
+
- `${componentName}.test.tsx` - Unit tests
|
|
31
|
+
- `${componentName}.stories.tsx` - Storybook stories (if Storybook is used)
|
|
31
32
|
- `index.ts` - Exports
|
|
32
33
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div>
|
|
55
|
-
</CSSTransition>
|
|
56
|
-
</Unstyled>
|
|
57
|
-
```
|
|
34
|
+
## Component Structure
|
|
35
|
+
```tsx
|
|
36
|
+
// ${componentName}.tsx
|
|
37
|
+
import type { ComponentProps } from 'react';
|
|
38
|
+
|
|
39
|
+
export interface ${componentName}Props {
|
|
40
|
+
// Define props with JSDoc comments
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ${componentName}({ ...props }: ${componentName}Props) {
|
|
44
|
+
return (
|
|
45
|
+
// Semantic HTML with accessibility
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Accessibility Requirements
|
|
51
|
+
- Use semantic HTML elements
|
|
52
|
+
- Include ARIA labels where needed
|
|
53
|
+
- Ensure keyboard navigation works
|
|
54
|
+
- Test with screen reader
|
package/rules/gemini.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Purpose**: Architectural constraints, security requirements, and UX patterns for integrating Google Gemini API into React applications.
|
|
4
4
|
|
|
5
|
-
**Related Skill**: [
|
|
5
|
+
**Related Skill**: [integrate-gemini](../skills/integrate-gemini/SKILL.md)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|