@riligar/agents-kit 1.7.0 → 1.9.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/.agent/skills/riligar-business-startup-analyst/SKILL.md +2 -3
- package/.agent/skills/riligar-business-startup-financial/SKILL.md +2 -3
- package/.agent/skills/riligar-business-startup-market/SKILL.md +2 -3
- package/.agent/skills/riligar-design-system/SKILL.md +1 -1
- package/.agent/skills/riligar-dev-architecture/SKILL.md +1 -1
- package/.agent/skills/riligar-dev-auth-elysia/SKILL.md +80 -0
- package/.agent/skills/riligar-dev-auth-elysia/assets/server-snippets.ts +45 -0
- package/.agent/skills/riligar-dev-auth-elysia/references/context-and-user.md +26 -0
- package/.agent/skills/riligar-dev-auth-elysia/references/manual-verification.md +36 -0
- package/.agent/skills/riligar-dev-auth-elysia/references/route-protection.md +52 -0
- package/.agent/skills/riligar-dev-auth-react/SKILL.md +86 -0
- package/.agent/skills/riligar-dev-auth-react/assets/setup-snippets.js +52 -0
- package/.agent/skills/riligar-dev-auth-react/references/concepts.md +24 -0
- package/.agent/skills/riligar-dev-auth-react/references/hooks-and-components.md +39 -0
- package/.agent/skills/riligar-dev-auth-react/references/route-protection.md +63 -0
- package/.agent/skills/riligar-dev-autopilot/SKILL.md +2 -5
- package/.agent/skills/riligar-dev-backend/SKILL.md +3 -3
- package/.agent/skills/riligar-dev-clean-code/SKILL.md +2 -4
- package/.agent/skills/riligar-dev-code-review/SKILL.md +2 -2
- package/.agent/skills/riligar-dev-database/SKILL.md +2 -2
- package/.agent/skills/riligar-dev-frontend/SKILL.md +3 -3
- package/.agent/skills/riligar-dev-landing-page/SKILL.md +1 -1
- package/.agent/skills/riligar-dev-seo/SKILL.md +2 -2
- package/.agent/skills/riligar-dev-stripe/SKILL.md +152 -0
- package/.agent/skills/riligar-infrastructure/SKILL.md +1 -4
- package/.agent/skills/riligar-marketing-copy/SKILL.md +2 -2
- package/.agent/skills/riligar-marketing-email/SKILL.md +3 -2
- package/.agent/skills/riligar-marketing-seo/SKILL.md +2 -7
- package/.agent/skills/riligar-plan-writing/SKILL.md +1 -1
- package/.agent/skills/riligar-tech-stack/SKILL.md +1 -4
- package/.agent/skills/skill-creator/SKILL.md +37 -6
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-business-startup-analyst
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash WebSearch WebFetch
|
|
3
|
+
type: business
|
|
4
|
+
description: Generate comprehensive investor-ready business case document with market, solution, financials, and strategy. Use when creating business cases for fundraising or strategic planning.
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# Business Case Generator
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-business-startup-financial
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash WebSearch WebFetch
|
|
3
|
+
type: business
|
|
4
|
+
description: Create detailed 3-5 year financial model with revenue, costs, cash flow, and scenarios. Use when building financial projections for startups or fundraising.
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# Financial Projections
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-business-startup-market
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash WebSearch WebFetch
|
|
3
|
+
type: business
|
|
4
|
+
description: Generate comprehensive market opportunity analysis with TAM/SAM/SOM calculations. Use when analyzing market size and opportunity for startups.
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# Market Opportunity Analysis
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-design-system
|
|
3
|
+
type: design
|
|
3
4
|
description: Especialista no Sistema Visual da RiLiGar. Use para: (1) Criação de interfaces web e mobile (Light/Dark Mode), (2) Implementação de componentes UI (Mantine Only), (3) Garantir estética minimalista "Content-First", (4) Aplicar tokens de design via Mantine Theme.
|
|
4
|
-
license: Apache-2.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# RiLiGar Design System Expert
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-architecture
|
|
3
|
+
type: development
|
|
3
4
|
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
4
|
-
allowed-tools: Read, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Architecture Decision Framework
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: riligar-dev-auth-elysia
|
|
3
|
+
type: development
|
|
4
|
+
description: 'Comprehensive guide for integrating the Riligar Auth Elysia SDK into backend servers. Use when a user needs to: (1) Set up a backend auth plugin, (2) Configure Elysia with Riligar Secret Key, (3) Protect API routes or groups, (4) Access authenticated user data in handlers, (5) Perform manual JWT verification.'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Riligar Auth Elysia Skill
|
|
8
|
+
|
|
9
|
+
This skill provides a backend workflow for integrating authentication and permissions using the `@riligar/auth-elysia` SDK.
|
|
10
|
+
|
|
11
|
+
## Core Integration Workflow
|
|
12
|
+
|
|
13
|
+
### 1. Installation
|
|
14
|
+
|
|
15
|
+
Install the backend SDK:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @riligar/auth-elysia
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Environment Variables
|
|
22
|
+
|
|
23
|
+
Set up your Secret Key and URLs in your `.env` file.
|
|
24
|
+
|
|
25
|
+
> [!CAUTION]
|
|
26
|
+
> Backend integration requires the **Secret Key** (`sk_...`). Never share this key or include it in client-side code.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# .env
|
|
30
|
+
AUTH_API_URL=https://manager.myauth.click
|
|
31
|
+
AUTH_API_SECRET=sk_live_your_secret_key
|
|
32
|
+
AUTH_JWKS_URL=https://manager.myauth.click/.well-known/jwks.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. Plugin Registration
|
|
36
|
+
|
|
37
|
+
Add the `authPlugin` to your Elysia instance.
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { Elysia } from 'elysia'
|
|
41
|
+
import { authPlugin } from '@riligar/auth-elysia'
|
|
42
|
+
|
|
43
|
+
const app = new Elysia()
|
|
44
|
+
.use(
|
|
45
|
+
authPlugin({
|
|
46
|
+
apiUrl: process.env.AUTH_API_URL,
|
|
47
|
+
apiKey: process.env.AUTH_API_SECRET,
|
|
48
|
+
jwksUrl: process.env.AUTH_JWKS_URL,
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
.listen(3000)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For more patterns, see [server-snippets.ts](assets/server-snippets.ts).
|
|
55
|
+
|
|
56
|
+
## Specialized Guides
|
|
57
|
+
|
|
58
|
+
- **Context & User Data**: Documentation for `ctx.auth` and `ctx.user`. See [context-and-user.md](references/context-and-user.md).
|
|
59
|
+
- **Route Protection**: How to implement `requireAuth` middleware and guard route groups. See [route-protection.md](references/route-protection.md).
|
|
60
|
+
- **Manual Verification**: Using `verifyToken` for custom JWT handling. See [manual-verification.md](references/manual-verification.md).
|
|
61
|
+
|
|
62
|
+
## Common Tasks
|
|
63
|
+
|
|
64
|
+
### Protecting a Route Group
|
|
65
|
+
|
|
66
|
+
Use `onBeforeHandle` to secure multiple endpoints efficiently.
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
app.group('/api/v1', app => app.onBeforeHandle(requireAuth).get('/data', () => ({ ok: true })))
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Accessing User Profile
|
|
73
|
+
|
|
74
|
+
Access the decoded user data directly from the context.
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
app.get('/profile', ({ user }) => {
|
|
78
|
+
return { id: user.id, email: user.email }
|
|
79
|
+
})
|
|
80
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Server Snippets for Elysia
|
|
2
|
+
|
|
3
|
+
// 1. Core Server with Auth Plugin
|
|
4
|
+
export const fullServerSetup = `
|
|
5
|
+
import { Elysia } from 'elysia'
|
|
6
|
+
import { authPlugin } from '@riligar/auth-elysia'
|
|
7
|
+
|
|
8
|
+
const app = new Elysia()
|
|
9
|
+
.use(authPlugin({
|
|
10
|
+
apiUrl: process.env.AUTH_API_URL, // https://manager.myauth.click
|
|
11
|
+
apiKey: process.env.AUTH_API_SECRET, // sk_live_...
|
|
12
|
+
jwksUrl: process.env.AUTH_JWKS_URL, // .well-known/jwks.json
|
|
13
|
+
}))
|
|
14
|
+
.get('/public', () => 'Hello World')
|
|
15
|
+
.get('/private', ({ auth, user }) => {
|
|
16
|
+
if (!auth.isAuthenticated) return 'Unauthorized'
|
|
17
|
+
return \`Hello \${user.name}\`
|
|
18
|
+
})
|
|
19
|
+
.listen(3000)
|
|
20
|
+
`
|
|
21
|
+
|
|
22
|
+
// 2. Auth Middleware
|
|
23
|
+
export const middlewareSnippet = `
|
|
24
|
+
export const requireAuth = ({ auth, set }) => {
|
|
25
|
+
if (!auth.isAuthenticated) {
|
|
26
|
+
set.status = 401
|
|
27
|
+
return { error: 'Unauthorized' }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Usage: app.get('/protected', requireAuth, () => 'Secret Area')
|
|
32
|
+
`
|
|
33
|
+
|
|
34
|
+
// 3. User Data access
|
|
35
|
+
export const userAccessSnippet = `
|
|
36
|
+
app.get('/me', ({ auth, user }) => {
|
|
37
|
+
if (!auth.isAuthenticated) return { error: 'Not logged in' }
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
id: user.id,
|
|
41
|
+
email: user.email,
|
|
42
|
+
verified: user.emailVerified
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Auth Context and User Object
|
|
2
|
+
|
|
3
|
+
The `@riligar/auth-elysia` plugin decorates the Elysia context with `auth` and `user` objects.
|
|
4
|
+
|
|
5
|
+
## Auth Object (`ctx.auth`)
|
|
6
|
+
|
|
7
|
+
Provides metadata about the current request's authentication state.
|
|
8
|
+
|
|
9
|
+
| Property | Type | Description |
|
|
10
|
+
| :--------------------- | :----------------- | :----------------------------------------------- |
|
|
11
|
+
| `auth.isAuthenticated` | `boolean` | `true` if a valid JWT was found and verified. |
|
|
12
|
+
| `auth.token` | `string \| null` | The raw JWT token from the Authorization header. |
|
|
13
|
+
| `auth.error` | `string \| null` | Error message if verification failed. |
|
|
14
|
+
| `auth.verify()` | `Promise<boolean>` | Manually triggers token verification. |
|
|
15
|
+
|
|
16
|
+
## User Object (`ctx.user`)
|
|
17
|
+
|
|
18
|
+
Contains the decoded payload from the JWT. Only populated if `isAuthenticated` is `true`.
|
|
19
|
+
|
|
20
|
+
| Property | Type | Description |
|
|
21
|
+
| :------------------- | :-------- | :------------------------------------------------ |
|
|
22
|
+
| `user.id` | `string` | Unique identifier of the user (from `sub` claim). |
|
|
23
|
+
| `user.email` | `string` | User's email address. |
|
|
24
|
+
| `user.name` | `string` | User's display name. |
|
|
25
|
+
| `user.emailVerified` | `boolean` | Whether the user's email has been verified. |
|
|
26
|
+
| `user.metadata` | `object` | Custom metadata associated with the user account. |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Manual Token Verification
|
|
2
|
+
|
|
3
|
+
In some cases, you may need to verify a JWT manually outside of the standard `authPlugin` context (e.g., in a background job, cron, or a custom WebSocket handler).
|
|
4
|
+
|
|
5
|
+
## Using `verifyToken`
|
|
6
|
+
|
|
7
|
+
The SDK exports a `verifyToken` function that handles the full JWKS verification flow.
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { verifyToken } from '@riligar/auth-elysia'
|
|
11
|
+
|
|
12
|
+
async function customHandler(token: string) {
|
|
13
|
+
try {
|
|
14
|
+
const payload = await verifyToken(token, {
|
|
15
|
+
jwksUrl: process.env.AUTH_JWKS_URL,
|
|
16
|
+
// optional: issuer, audience verification
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
console.log('Valid user:', payload.sub)
|
|
20
|
+
return payload
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.error('Verification failed:', error.message)
|
|
23
|
+
throw new Error('Unauthorized')
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## JWKS Caching
|
|
29
|
+
|
|
30
|
+
The `verifyToken` function automatically caches the JWKS keys to avoid unnecessary network requests. If you need to force a refresh (e.g., after a key rotation), use `refreshJwks`:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { refreshJwks } from '@riligar/auth-elysia'
|
|
34
|
+
|
|
35
|
+
await refreshJwks(process.env.AUTH_JWKS_URL)
|
|
36
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Route Protection and Middleware
|
|
2
|
+
|
|
3
|
+
Effective patterns for securing your Elysia API routes.
|
|
4
|
+
|
|
5
|
+
## Recommended Middleware Pattern
|
|
6
|
+
|
|
7
|
+
Create a reusable `requireAuth` helper to enforce authentication on specific endpoints.
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
const requireAuth = ({ auth, set }) => {
|
|
11
|
+
if (!auth.isAuthenticated) {
|
|
12
|
+
set.status = 401
|
|
13
|
+
return { error: 'Unauthorized: Missing or invalid token' }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Applying Protection
|
|
19
|
+
|
|
20
|
+
### To a single route
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
app.get('/me', requireAuth, ({ user }) => {
|
|
24
|
+
return { name: user.name }
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### To a group of routes
|
|
29
|
+
|
|
30
|
+
Use `onBeforeHandle` to protect an entire API section.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
app.group('/api/admin', app =>
|
|
34
|
+
app
|
|
35
|
+
.onBeforeHandle(requireAuth)
|
|
36
|
+
.get('/dashboard', () => ({ stats: '...' }))
|
|
37
|
+
.post('/settings', () => ({ saved: true }))
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Permission-Based access (RBAC)
|
|
42
|
+
|
|
43
|
+
You can extend the middleware to check for specific roles or permissions.
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const requireAdmin = ({ auth, user, set }) => {
|
|
47
|
+
if (!auth.isAuthenticated || user.role !== 'admin') {
|
|
48
|
+
set.status = 403
|
|
49
|
+
return { error: 'Forbidden' }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: riligar-dev-auth-react
|
|
3
|
+
type: development
|
|
4
|
+
description: 'Comprehensive guide for integrating the Riligar Auth React SDK into web applications. Use when a user needs to: (1) Set up authentication from scratch, (2) Configure AuthProvider, (3) Implement route protection, (4) Use auth hooks or pre-built UI components, (5) Handle login/signup/profile/magic links in React.'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Riligar Auth React Skill
|
|
8
|
+
|
|
9
|
+
This skill provides a complete workflow for integrating authentication and permissions using the `@riligar/auth-react` SDK.
|
|
10
|
+
|
|
11
|
+
## Core Integration Workflow
|
|
12
|
+
|
|
13
|
+
### 1. Installation
|
|
14
|
+
|
|
15
|
+
Install the SDK using bun (preferred) or npm:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bun add @riligar/auth-react
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Environment Variables
|
|
22
|
+
|
|
23
|
+
Set up your Public Key in your `.env.local` file.
|
|
24
|
+
|
|
25
|
+
> [!IMPORTANT]
|
|
26
|
+
> Always use the **Public Key** (`pk_...`) in the frontend. Never expose your Secret Key.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# .env.local
|
|
30
|
+
VITE_AUTH_API_KEY=pk_live_your_public_key
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. AuthProvider Setup
|
|
34
|
+
|
|
35
|
+
Wrap your application (usually in `main.jsx` or `App.jsx`) with the `AuthProvider`.
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import { AuthProvider } from '@riligar/auth-react'
|
|
39
|
+
|
|
40
|
+
ReactDOM.createRoot(document.getElementById('root')).render(
|
|
41
|
+
<AuthProvider apiKey={import.meta.env.VITE_AUTH_API_KEY}>
|
|
42
|
+
<App />
|
|
43
|
+
</AuthProvider>
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For more setup patterns, see [setup-snippets.js](assets/setup-snippets.js).
|
|
48
|
+
|
|
49
|
+
## Specialized Guides
|
|
50
|
+
|
|
51
|
+
- **Hooks & UI Components**: Comprehensive list of `useAuth`, `useSignIn`, and pre-built Mantine components. See [hooks-and-components.md](references/hooks-and-components.md).
|
|
52
|
+
- **Route Protection**: How to use `<Protect />`, `<SignedIn>`, and active route guards. See [route-protection.md](references/route-protection.md).
|
|
53
|
+
- **Core Concepts**: Understanding B2C/B2B models and API key security. See [concepts.md](references/concepts.md).
|
|
54
|
+
|
|
55
|
+
## Common Tasks
|
|
56
|
+
|
|
57
|
+
### Checking Auth State
|
|
58
|
+
|
|
59
|
+
Use `useAuth()` to access user data and authentication status.
|
|
60
|
+
|
|
61
|
+
```jsx
|
|
62
|
+
const { user, isAuthenticated, loading } = useAuth()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Adding a Login Form
|
|
66
|
+
|
|
67
|
+
Simply drop the `<SignIn />` component. Use `variant="modal"` if you want it in a popup.
|
|
68
|
+
|
|
69
|
+
```jsx
|
|
70
|
+
<SignIn />
|
|
71
|
+
// or
|
|
72
|
+
<SignIn variant="modal" opened={isOpen} onClose={() => setIsOpen(false)} />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Protecting a Dashboard
|
|
76
|
+
|
|
77
|
+
Wrap your sub-routes with `<Protect />`.
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
<Route element={<Protect redirectTo="/login" />}>
|
|
81
|
+
<Route
|
|
82
|
+
path="/dashboard"
|
|
83
|
+
element={<Dashboard />}
|
|
84
|
+
/>
|
|
85
|
+
</Route>
|
|
86
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Setup Snippets
|
|
2
|
+
|
|
3
|
+
// 1. main.jsx / index.jsx setup
|
|
4
|
+
export const authProviderSetup = `
|
|
5
|
+
import { AuthProvider } from '@riligar/auth-react';
|
|
6
|
+
|
|
7
|
+
ReactDOM.createRoot(document.getElementById('root')).render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<AuthProvider apiKey={import.meta.env.VITE_AUTH_API_KEY}>
|
|
10
|
+
<App />
|
|
11
|
+
</AuthProvider>
|
|
12
|
+
</React.StrictMode>
|
|
13
|
+
);
|
|
14
|
+
`
|
|
15
|
+
|
|
16
|
+
// 2. Protected Routes setup
|
|
17
|
+
export const protectedRoutesSnippet = `
|
|
18
|
+
import { Protect, SignIn } from '@riligar/auth-react';
|
|
19
|
+
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
|
20
|
+
|
|
21
|
+
function AppRoutes() {
|
|
22
|
+
return (
|
|
23
|
+
<BrowserRouter>
|
|
24
|
+
<Routes>
|
|
25
|
+
<Route path="/signin" element={<SignIn />} />
|
|
26
|
+
|
|
27
|
+
<Route element={<Protect redirectTo="/signin" />}>
|
|
28
|
+
<Route path="/" element={<Dashboard />} />
|
|
29
|
+
<Route path="/profile" element={<Profile />} />
|
|
30
|
+
</Route>
|
|
31
|
+
</Routes>
|
|
32
|
+
</BrowserRouter>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
// 3. User State hook
|
|
38
|
+
export const useAuthExample = `
|
|
39
|
+
import { useAuth } from '@riligar/auth-react';
|
|
40
|
+
|
|
41
|
+
function UserButton() {
|
|
42
|
+
const { user, isAuthenticated, signOut } = useAuth();
|
|
43
|
+
|
|
44
|
+
if (!isAuthenticated) return null;
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<button onClick={signOut}>
|
|
48
|
+
Log out {user.name}
|
|
49
|
+
</button>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Concepts and Security
|
|
2
|
+
|
|
3
|
+
## Access Models
|
|
4
|
+
|
|
5
|
+
Riligar Auth supports two primary access models:
|
|
6
|
+
|
|
7
|
+
- **B2C (Business-to-Consumer)**: Individual users access the application directly. Ideal for public-facing apps, e-commerce, and courses.
|
|
8
|
+
- **B2B (Business-to-Business)**: Users belong to organizations or teams. Multi-tenancy is handled at the core level. Ideal for SaaS and team tools.
|
|
9
|
+
|
|
10
|
+
## API Keys
|
|
11
|
+
|
|
12
|
+
Security is based on key pairs:
|
|
13
|
+
|
|
14
|
+
| Key Type | Prefix | Environment | Note |
|
|
15
|
+
| :------------- | :------- | :---------- | :--------------------------------------------------- |
|
|
16
|
+
| **Public Key** | `pk_...` | Frontend | Safe to expose in the browser. |
|
|
17
|
+
| **Secret Key** | `sk_...` | Backend | **NEVER** expose in the browser or client-side code. |
|
|
18
|
+
|
|
19
|
+
## Security Features
|
|
20
|
+
|
|
21
|
+
- **JWT Tokens**: Signed and verifiable locally via JWKS.
|
|
22
|
+
- **Zero-Trust**: No credentials stored on your application server.
|
|
23
|
+
- **Protection**: Native rate-limiting and brute-force protection.
|
|
24
|
+
- **Offline Verification**: Public JWKS endpoint allows backend verification without calling the Auth API on every request.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Hooks and Components
|
|
2
|
+
|
|
3
|
+
## Hooks
|
|
4
|
+
|
|
5
|
+
All hooks provide access to authentication state and actions.
|
|
6
|
+
|
|
7
|
+
| Hook | Description |
|
|
8
|
+
| :------------------- | :------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `useAuth()` | Main state: `user`, `isAuthenticated`, `loading`, `error` |
|
|
10
|
+
| `useSignIn()` | Function: `signIn(email, password)` |
|
|
11
|
+
| `useSignUp()` | Function: `signUp(email, password, name)` |
|
|
12
|
+
| `useSignOut()` | Function: `signOut()` |
|
|
13
|
+
| `useMagicLink()` | Functions: `sendMagicLink(email)`, `verifyMagicLink(token)` |
|
|
14
|
+
| `usePasswordReset()` | Functions: `forgotPassword(email)`, `resetPassword(token, newPass)` |
|
|
15
|
+
| `useUser()` | Access to `user` object and update methods: `updateProfile()`, `changePassword()`, `changeEmail()` |
|
|
16
|
+
|
|
17
|
+
## UI Components
|
|
18
|
+
|
|
19
|
+
Pre-built components using the Riligar Design System (Mantine-based).
|
|
20
|
+
|
|
21
|
+
| Component | Description | Variants |
|
|
22
|
+
| :---------------------- | :-------------------------------------- | :-------------- |
|
|
23
|
+
| `<SignIn />` | Full login form | `card`, `modal` |
|
|
24
|
+
| `<SignUp />` | Registration form | `card`, `modal` |
|
|
25
|
+
| `<MagicLink />` | Magic link request form | `card`, `modal` |
|
|
26
|
+
| `<MagicLinkCallback />` | Verification handler (no UI) | - |
|
|
27
|
+
| `<ForgotPassword />` | Password reset request | `card`, `modal` |
|
|
28
|
+
| `<ResetPassword />` | New password setter | - |
|
|
29
|
+
| `<VerifyEmail />` | Email verification handler | - |
|
|
30
|
+
| `<UserProfile />` | Profile, password, and email management | `card`, `modal` |
|
|
31
|
+
|
|
32
|
+
### Variant Props (for Card/Modal)
|
|
33
|
+
|
|
34
|
+
| Prop | Type | Default | Description |
|
|
35
|
+
| :----------- | :------------------ | :------- | :-------------------------------------- |
|
|
36
|
+
| `variant` | `'card' \| 'modal'` | `'card'` | Rendering mode. |
|
|
37
|
+
| `opened` | `boolean` | - | Visibility for `modal` variant. |
|
|
38
|
+
| `onClose` | `function` | - | Callback when closing the modal. |
|
|
39
|
+
| `modalProps` | `object` | `{}` | Extra props for the underlying `Modal`. |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Route Protection
|
|
2
|
+
|
|
3
|
+
## Components
|
|
4
|
+
|
|
5
|
+
Use these components to control access to specific parts of your application.
|
|
6
|
+
|
|
7
|
+
| Component | Description |
|
|
8
|
+
| :-------------- | :--------------------------------------------------- |
|
|
9
|
+
| `<Protect />` | Route guard wrapper for React Router. |
|
|
10
|
+
| `<SignedIn>` | Renders children only if user is authenticated. |
|
|
11
|
+
| `<SignedOut>` | Renders children only if user is NOT authenticated. |
|
|
12
|
+
| `<AuthLoading>` | Renders children only while checking authentication. |
|
|
13
|
+
|
|
14
|
+
## Usage Patterns
|
|
15
|
+
|
|
16
|
+
### Protecting Routes (React Router)
|
|
17
|
+
|
|
18
|
+
```jsx
|
|
19
|
+
import { Protect, SignIn } from '@riligar/auth-react'
|
|
20
|
+
import { Routes, Route } from 'react-router-dom'
|
|
21
|
+
|
|
22
|
+
;<Routes>
|
|
23
|
+
<Route
|
|
24
|
+
path="/login"
|
|
25
|
+
element={<SignIn />}
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<Route element={<Protect redirectTo="/login" />}>
|
|
29
|
+
<Route
|
|
30
|
+
path="/dashboard"
|
|
31
|
+
element={<Dashboard />}
|
|
32
|
+
/>
|
|
33
|
+
<Route
|
|
34
|
+
path="/settings"
|
|
35
|
+
element={<Settings />}
|
|
36
|
+
/>
|
|
37
|
+
</Route>
|
|
38
|
+
</Routes>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Conditional UI Elements
|
|
42
|
+
|
|
43
|
+
```jsx
|
|
44
|
+
import { SignedIn, SignedOut, AuthLoading } from '@riligar/auth-react'
|
|
45
|
+
|
|
46
|
+
function Header() {
|
|
47
|
+
return (
|
|
48
|
+
<header>
|
|
49
|
+
<AuthLoading>
|
|
50
|
+
<Spinner />
|
|
51
|
+
</AuthLoading>
|
|
52
|
+
|
|
53
|
+
<SignedIn>
|
|
54
|
+
<UserMenu />
|
|
55
|
+
</SignedIn>
|
|
56
|
+
|
|
57
|
+
<SignedOut>
|
|
58
|
+
<LoginButton />
|
|
59
|
+
</SignedOut>
|
|
60
|
+
</header>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
```
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-autopilot
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
metadata:
|
|
6
|
-
author: riligar
|
|
7
|
-
version: '1.0'
|
|
3
|
+
type: development
|
|
4
|
+
description: Automação do ciclo de vida de desenvolvimento. Validação com Bun, Auto-correção, Commit Semântico e Deploy. Use para garantir código funcional e entregue em produção.
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# RiLiGar Dev-Autopilot Expert
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: riligar-dev-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
name: riligar-dev-backend
|
|
3
|
+
type: development
|
|
4
|
+
description: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination. Use when designing APIs or backend services.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# API Patterns
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-clean-code
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
version: 2.1
|
|
6
|
-
priority: CRITICAL
|
|
3
|
+
type: development
|
|
4
|
+
description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments. CRITICAL skill that defines RiLiGar coding standards. Use when writing or reviewing any code.
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
# Clean Code - Pragmatic AI Coding Standards (RiLiGar)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-code-review
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type: development
|
|
4
|
+
description: Code review guidelines covering code quality, security, and best practices. Use when reviewing code or creating review checklists.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Code Review Checklist
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-database
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type: development
|
|
4
|
+
description: Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases. Use when designing schemas or optimizing database performance.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Database Design
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: riligar-dev-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
name: riligar-dev-frontend
|
|
3
|
+
type: development
|
|
4
|
+
description: Modern React patterns and principles. Hooks, composition, performance, and JavaScript best practices. Use when building React components, managing state, or implementing UI patterns.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# React Patterns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-landing-page
|
|
3
|
+
type: development
|
|
3
4
|
description: Specialist in High-Conversion Landing Pages using RiLiGar Design System. Use for: (1) Creating marketing/sales pages, (2) Structuring conversion flows (AIDA/PAS), (3) Implementing high-trust components (Hero, Social Proof, Pricing), (4) Writing persuasive copy.
|
|
4
|
-
license: Apache-2.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# RiLiGar Landing Page Architect
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-dev-seo
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type: development
|
|
4
|
+
description: Implementação de infraestrutura de SEO técnico seguindo a stack RiLiGar (React, Vite, Bun, Elysia). Use para configurar sitemaps, robots.txt, meta tags, OpenGraph, dados estruturados (JSON-LD) e URLs canônicas.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# SEO Técnico (RiLiGar Tech Stack)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: riligar-dev-stripe
|
|
3
|
+
type: development
|
|
4
|
+
description: Stripe payment integration patterns. Use when implementing payments, subscriptions, webhooks, checkout flows, or billing in Elysia/Bun applications.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stripe Integration Patterns
|
|
8
|
+
|
|
9
|
+
> Patterns for integrating Stripe payments in RiLiGar applications.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Mandatory Guidelines
|
|
14
|
+
|
|
15
|
+
> [!IMPORTANT]
|
|
16
|
+
> All work in this skill MUST adhere to:
|
|
17
|
+
>
|
|
18
|
+
> - @[.agent/skills/riligar-dev-backend] (API Standards)
|
|
19
|
+
> - @[.agent/skills/riligar-dev-clean-code] (Clean Code Standards)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. Core Concepts
|
|
24
|
+
|
|
25
|
+
| Concept | Description |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| **Customer** | User identity in Stripe |
|
|
28
|
+
| **Product** | What you're selling |
|
|
29
|
+
| **Price** | How much and billing cycle |
|
|
30
|
+
| **Subscription** | Recurring payment |
|
|
31
|
+
| **PaymentIntent** | One-time payment |
|
|
32
|
+
| **Webhook** | Event notifications |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 2. Environment Setup
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# .env
|
|
40
|
+
STRIPE_SECRET_KEY=sk_live_...
|
|
41
|
+
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
42
|
+
STRIPE_PUBLISHABLE_KEY=pk_live_...
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> [!IMPORTANT]
|
|
46
|
+
> Never expose `STRIPE_SECRET_KEY` in frontend code.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. Server-Side Patterns (Elysia)
|
|
51
|
+
|
|
52
|
+
### Initialize Stripe
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
import Stripe from 'stripe'
|
|
56
|
+
|
|
57
|
+
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Create Checkout Session
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
const session = await stripe.checkout.sessions.create({
|
|
64
|
+
mode: 'subscription',
|
|
65
|
+
customer_email: user.email,
|
|
66
|
+
line_items: [{ price: priceId, quantity: 1 }],
|
|
67
|
+
success_url: `${baseUrl}/success?session_id={CHECKOUT_SESSION_ID}`,
|
|
68
|
+
cancel_url: `${baseUrl}/cancel`,
|
|
69
|
+
})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Webhook Handler
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
app.post('/webhook/stripe', async ({ request, set }) => {
|
|
76
|
+
const sig = request.headers.get('stripe-signature')
|
|
77
|
+
const body = await request.text()
|
|
78
|
+
|
|
79
|
+
const event = stripe.webhooks.constructEvent(
|
|
80
|
+
body,
|
|
81
|
+
sig,
|
|
82
|
+
process.env.STRIPE_WEBHOOK_SECRET
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
switch (event.type) {
|
|
86
|
+
case 'checkout.session.completed':
|
|
87
|
+
await handleCheckoutComplete(event.data.object)
|
|
88
|
+
break
|
|
89
|
+
case 'customer.subscription.updated':
|
|
90
|
+
await handleSubscriptionUpdate(event.data.object)
|
|
91
|
+
break
|
|
92
|
+
case 'customer.subscription.deleted':
|
|
93
|
+
await handleSubscriptionCancel(event.data.object)
|
|
94
|
+
break
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return { received: true }
|
|
98
|
+
})
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 4. Essential Webhooks
|
|
104
|
+
|
|
105
|
+
| Event | When to Handle |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `checkout.session.completed` | Provision access after payment |
|
|
108
|
+
| `customer.subscription.updated` | Plan changes, renewals |
|
|
109
|
+
| `customer.subscription.deleted` | Cancellation |
|
|
110
|
+
| `invoice.payment_failed` | Payment issues |
|
|
111
|
+
| `invoice.paid` | Successful recurring payment |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 5. Customer Portal
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
const portalSession = await stripe.billingPortal.sessions.create({
|
|
119
|
+
customer: customerId,
|
|
120
|
+
return_url: `${baseUrl}/account`,
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 6. Security Checklist
|
|
127
|
+
|
|
128
|
+
- [ ] Verify webhook signatures
|
|
129
|
+
- [ ] Use idempotency keys for retries
|
|
130
|
+
- [ ] Store customer ID in database
|
|
131
|
+
- [ ] Handle edge cases (expired cards, disputes)
|
|
132
|
+
- [ ] Test with Stripe CLI locally
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 7. Testing
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Install Stripe CLI
|
|
140
|
+
brew install stripe/stripe-cli/stripe
|
|
141
|
+
|
|
142
|
+
# Forward webhooks to local server
|
|
143
|
+
stripe listen --forward-to localhost:3000/webhook/stripe
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Related Skills
|
|
149
|
+
|
|
150
|
+
- @[.agent/skills/riligar-dev-backend]
|
|
151
|
+
- @[.agent/skills/riligar-dev-auth-elysia]
|
|
152
|
+
- @[.agent/skills/riligar-tech-stack]
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-infrastructure
|
|
3
|
+
type: infrastructure
|
|
3
4
|
description: Especialista em Infraestrutura da RiLiGar. Use para configurar deployments no Fly.io, DNS e proxying no Cloudflare, e garantir padrões de infraestrutura e deployment.
|
|
4
|
-
license: Apache-2.0
|
|
5
|
-
metadata:
|
|
6
|
-
author: riligar
|
|
7
|
-
version: '1.0'
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# RiLiGar Infrastructure Expert
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-marketing-copy
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type: marketing
|
|
4
|
+
description: Generate compelling marketing copy using the Elevated Direct Response framework. Use when creating landing pages, headlines, email campaigns, ad copy, CTAs, value propositions, or any persuasive marketing content.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Elevated Direct Response Copywriter
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: email
|
|
3
|
-
|
|
2
|
+
name: riligar-marketing-email
|
|
3
|
+
type: marketing
|
|
4
|
+
description: Email sequence design and optimization. Use when creating drip campaigns, automated flows, nurture sequences, onboarding emails, welcome sequences, re-engagement emails, or lifecycle email programs.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Email Sequence Design
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-marketing-seo
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
at scale using templates and structured data. Use when the user mentions
|
|
6
|
-
programmatic SEO, pages at scale, template pages, directory pages, location pages,
|
|
7
|
-
comparison pages, integration pages, or keyword-pattern page generation.
|
|
8
|
-
This skill focuses on feasibility, strategy, and page system design—not execution
|
|
9
|
-
unless explicitly requested.
|
|
3
|
+
type: marketing
|
|
4
|
+
description: Design and evaluate programmatic SEO strategies for creating SEO-driven pages at scale. Use when working with programmatic SEO, template pages, directory pages, location pages, or keyword-pattern page generation.
|
|
10
5
|
---
|
|
11
6
|
|
|
12
7
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-plan-writing
|
|
3
|
+
type: development
|
|
3
4
|
description: Structured task planning with clear breakdowns, dependencies, and verification criteria. Use when implementing features, refactoring, or any multi-step work.
|
|
4
|
-
allowed-tools: Read, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Plan Writing
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: riligar-tech-stack
|
|
3
|
+
type: development
|
|
3
4
|
description: Especialista na Tech Stack da RiLiGar. Use para criar projetos React/Vite, componentes com Mantine, APIs Bun/Elysia, e garantir padrões de código e estrutura de projetos.
|
|
4
|
-
license: Apache-2.0
|
|
5
|
-
metadata:
|
|
6
|
-
author: riligar
|
|
7
|
-
version: '1.0'
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# RiLiGar Tech Stack Expert
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-creator
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type: meta
|
|
4
|
+
description: Guide for creating effective skills. Use when creating a new skill or updating an existing skill that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Skill Creator
|
|
@@ -53,6 +53,7 @@ skill-name/
|
|
|
53
53
|
├── SKILL.md (required)
|
|
54
54
|
│ ├── YAML frontmatter metadata (required)
|
|
55
55
|
│ │ ├── name: (required)
|
|
56
|
+
│ │ ├── type: (required)
|
|
56
57
|
│ │ └── description: (required)
|
|
57
58
|
│ └── Markdown instructions (required)
|
|
58
59
|
└── Bundled Resources (optional)
|
|
@@ -61,11 +62,30 @@ skill-name/
|
|
|
61
62
|
└── assets/ - Files used in output (templates, icons, fonts, etc.)
|
|
62
63
|
```
|
|
63
64
|
|
|
65
|
+
### Skill Types (Taxonomy)
|
|
66
|
+
|
|
67
|
+
Every skill must have a `type` field that categorizes it. This enables organization, filtering, and discovery.
|
|
68
|
+
|
|
69
|
+
| Type | Description | Naming Pattern |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| `development` | Software development skills (frontend, backend, database, architecture, auth, testing) | `riligar-dev-*` |
|
|
72
|
+
| `design` | UI/UX and visual design skills | `riligar-design-*` |
|
|
73
|
+
| `marketing` | Copywriting, email, SEO, and content marketing | `riligar-marketing-*` |
|
|
74
|
+
| `business` | Business analysis, financial modeling, market research | `riligar-business-*` |
|
|
75
|
+
| `infrastructure` | Deployment, DNS, hosting, DevOps | `riligar-infrastructure` |
|
|
76
|
+
| `meta` | Skills about skills (this skill) | `skill-creator` |
|
|
77
|
+
|
|
78
|
+
**Naming Convention:**
|
|
79
|
+
|
|
80
|
+
- Directory name MUST match the `name` field in frontmatter
|
|
81
|
+
- Use pattern: `riligar-{type}-{specific-name}`
|
|
82
|
+
- Examples: `riligar-dev-frontend`, `riligar-marketing-copy`, `riligar-business-startup-analyst`
|
|
83
|
+
|
|
64
84
|
#### SKILL.md (required)
|
|
65
85
|
|
|
66
86
|
Every SKILL.md consists of:
|
|
67
87
|
|
|
68
|
-
- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that Claude reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.
|
|
88
|
+
- **Frontmatter** (YAML): Contains `name`, `type`, and `description` fields. These are the only fields that Claude reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.
|
|
69
89
|
- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
|
|
70
90
|
|
|
71
91
|
#### Bundled Resources (optional)
|
|
@@ -303,15 +323,26 @@ Any example files and directories not needed for the skill should be deleted. Th
|
|
|
303
323
|
|
|
304
324
|
##### Frontmatter
|
|
305
325
|
|
|
306
|
-
Write the YAML frontmatter with `name` and `description`:
|
|
326
|
+
Write the YAML frontmatter with `name`, `type`, and `description`:
|
|
307
327
|
|
|
308
|
-
- `name`: The skill name
|
|
328
|
+
- `name`: The skill name (must match directory name)
|
|
329
|
+
- `type`: The skill category (see Skill Types taxonomy above)
|
|
309
330
|
- `description`: This is the primary triggering mechanism for your skill, and helps Claude understand when to use the skill.
|
|
310
331
|
- Include both what the Skill does and specific triggers/contexts for when to use it.
|
|
311
332
|
- Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to Claude.
|
|
312
333
|
- Example description for a `docx` skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
|
|
313
334
|
|
|
314
|
-
|
|
335
|
+
**Example frontmatter:**
|
|
336
|
+
|
|
337
|
+
```yaml
|
|
338
|
+
---
|
|
339
|
+
name: riligar-dev-example
|
|
340
|
+
type: development
|
|
341
|
+
description: Brief description of what the skill does. Use when [specific triggers].
|
|
342
|
+
---
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
Do not include any other fields in YAML frontmatter (no `allowed-tools`, `license`, `metadata`, `version`, etc.).
|
|
315
346
|
|
|
316
347
|
##### Body
|
|
317
348
|
|