@skilly-hand/skilly-hand 0.6.1 → 0.8.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/CHANGELOG.md +32 -0
- package/README.md +1 -0
- package/catalog/README.md +4 -0
- package/catalog/catalog-index.json +4 -0
- package/catalog/skills/accessibility-audit/SKILL.md +154 -0
- package/catalog/skills/accessibility-audit/manifest.json +37 -0
- package/catalog/skills/accessibility-audit/references/w3c-wcag22-checklist.md +80 -0
- package/catalog/skills/accessibility-audit/scripts/audit-a11y.sh +372 -0
- package/catalog/skills/frontend-design/SKILL.md +237 -0
- package/catalog/skills/frontend-design/agents/component-designer.md +95 -0
- package/catalog/skills/frontend-design/agents/stack-detector.md +154 -0
- package/catalog/skills/frontend-design/assets/stack-scan-checklist.md +58 -0
- package/catalog/skills/frontend-design/manifest.json +27 -0
- package/catalog/skills/life-guard/SKILL.md +180 -0
- package/catalog/skills/life-guard/assets/committee-member-template.md +44 -0
- package/catalog/skills/life-guard/assets/safety-guard-template.md +47 -0
- package/catalog/skills/life-guard/manifest.json +33 -0
- package/catalog/skills/test-driven-development/SKILL.md +159 -0
- package/catalog/skills/test-driven-development/assets/tdd-cycle.md +487 -0
- package/catalog/skills/test-driven-development/manifest.json +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Component Designer
|
|
2
|
+
|
|
3
|
+
## Precondition
|
|
4
|
+
|
|
5
|
+
**Do not start without a confirmed stack summary from [stack-detector.md](stack-detector.md).**
|
|
6
|
+
|
|
7
|
+
If the user asks you to design something and no confirmed stack summary exists, respond:
|
|
8
|
+
"Before I design anything, I need to scan the project. Running stack detection first."
|
|
9
|
+
Then invoke stack-detector. Do not skip this, even if the task feels small.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
Use this agent when:
|
|
16
|
+
|
|
17
|
+
- Stack detection is complete and the user has confirmed the summary.
|
|
18
|
+
- The user asks to build, style, or refactor a specific UI component or page section.
|
|
19
|
+
- You need to design something new that must fit the project's existing visual language.
|
|
20
|
+
|
|
21
|
+
Do not use this agent when:
|
|
22
|
+
|
|
23
|
+
- Stack detection has not been run or confirmed.
|
|
24
|
+
- The request is to redesign the entire application's design system.
|
|
25
|
+
- The user explicitly asks for a greenfield design with no constraints.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Design Rules
|
|
30
|
+
|
|
31
|
+
These rules are absolute. No exceptions without explicit user confirmation.
|
|
32
|
+
|
|
33
|
+
1. **Use only confirmed tokens.** Every color, spacing, font, shadow, and border-radius value must come from the confirmed stack summary. If a token does not exist, ask before inventing one.
|
|
34
|
+
|
|
35
|
+
2. **Follow the sampled component structure.** The typing pattern, import style, prop naming, and composition approach must match what was observed in the sampled components. Do not introduce patterns from other frameworks or design systems.
|
|
36
|
+
|
|
37
|
+
3. **Match the CSS approach exactly.** If the project uses Tailwind classes, use only classes present in `tailwind.config`. If the project uses CSS Modules, write a co-located `.module.css` file following the existing naming convention. If the project uses a theme object (MUI, Chakra), reference `theme.colors`, `theme.spacing`, etc.
|
|
38
|
+
|
|
39
|
+
4. **Reference existing components, not external patterns.** When a new component is structurally similar to an existing one, start from that existing component. Do not start from a blank slate or an external design system example.
|
|
40
|
+
|
|
41
|
+
5. **No placeholder values.** No `#000`, `16px`, `1rem` hardcoded without a corresponding token. No `/* TODO: replace with brand color */` comments. If you don't have the right value, ask.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Questioning Protocol
|
|
46
|
+
|
|
47
|
+
At every point of uncertainty, ask the user a short, specific question before proceeding.
|
|
48
|
+
|
|
49
|
+
**Layout questions:**
|
|
50
|
+
- "Should this component use the same grid as [ExistingPage], or does it have different spacing requirements?"
|
|
51
|
+
- "The project breakpoints in tailwind.config are `sm`, `md`, `lg`. Should this component be responsive at all three, or only `md` and above?"
|
|
52
|
+
|
|
53
|
+
**Style questions:**
|
|
54
|
+
- "I see `--color-primary` and `--color-accent` in globals.css. Which one should this button use for its default state?"
|
|
55
|
+
- "The existing Card uses `rounded-md`. Should this modal also use `rounded-md`, or does it need a sharper or rounder corner?"
|
|
56
|
+
|
|
57
|
+
**Interaction / state questions:**
|
|
58
|
+
- "Should this component have a loading state? I don't see a Skeleton or Spinner imported in other components — should I add one or skip it?"
|
|
59
|
+
- "The existing Input has a `disabled` prop. Should this new Select also handle `disabled`?"
|
|
60
|
+
|
|
61
|
+
**Composition questions:**
|
|
62
|
+
- "Do you want this to accept children (composable) or receive structured props (data-driven)? The existing Card uses both — which pattern fits here?"
|
|
63
|
+
|
|
64
|
+
One question at a time. Do not front-load a list of 8 questions before starting.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Implementation Checklist
|
|
69
|
+
|
|
70
|
+
Before finalizing any output, verify every item:
|
|
71
|
+
|
|
72
|
+
- [ ] All color values come from confirmed project tokens, not hardcoded hex or named colors.
|
|
73
|
+
- [ ] All spacing values use confirmed tokens (Tailwind classes, CSS vars, or theme values).
|
|
74
|
+
- [ ] Typography (font family, size, weight, line-height) matches an existing usage in the codebase.
|
|
75
|
+
- [ ] The component's file structure (location, naming, exports) matches the existing pattern.
|
|
76
|
+
- [ ] The prop interface follows the same TypeScript conventions as sampled components.
|
|
77
|
+
- [ ] The styling approach (Tailwind, CSS Module, styled, theme) is consistent with the confirmed stack.
|
|
78
|
+
- [ ] No new dependencies were introduced without asking the user first.
|
|
79
|
+
- [ ] No new design tokens were invented without explicit user approval.
|
|
80
|
+
- [ ] The component was cross-referenced against at least one existing component for structural consistency.
|
|
81
|
+
- [ ] Accessibility: semantic HTML elements, aria attributes consistent with existing components.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## What Finished Work Looks Like
|
|
86
|
+
|
|
87
|
+
A finished component from this agent:
|
|
88
|
+
|
|
89
|
+
- Reads like it was written by the existing team.
|
|
90
|
+
- Uses the same imports, utilities, and style tokens as the rest of the codebase.
|
|
91
|
+
- Has no values that can't be traced back to a confirmed project resource.
|
|
92
|
+
- Includes no design decisions that weren't explicitly confirmed by the user or directly derived from existing code.
|
|
93
|
+
- Has no "you can customize this" placeholder comments.
|
|
94
|
+
|
|
95
|
+
If the output doesn't meet this bar, it is not done.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Stack Detector
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Surface a complete, verified picture of the project's frontend stack before any design work begins. This agent produces a **confirmed stack summary** that the component-designer requires as a precondition. Nothing gets designed until this output is validated by the user.
|
|
6
|
+
|
|
7
|
+
Do not guess. Do not assume. Do not approximate. Every field in the output must come from something you actually read in the project.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Run this agent:
|
|
14
|
+
|
|
15
|
+
- At the very start of every frontend design task, before any other action.
|
|
16
|
+
- When the user changes direction mid-task and a different part of the codebase is now in scope.
|
|
17
|
+
- When the confirmed stack summary from a previous run is no longer current (e.g., user says "we migrated to Tailwind").
|
|
18
|
+
|
|
19
|
+
Do not skip this agent:
|
|
20
|
+
|
|
21
|
+
- Not even when the stack "looks obvious" from the file names.
|
|
22
|
+
- Not even when the user describes the stack in plain language — descriptions can be outdated or incomplete.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Scan Procedure
|
|
27
|
+
|
|
28
|
+
Run these steps in order. Do not skip a step because a previous one seemed sufficient.
|
|
29
|
+
|
|
30
|
+
### Step 1 — Read package.json
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cat package.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Extract:
|
|
37
|
+
- Framework: `react`, `vue`, `@angular/core`, `svelte`, `next`, `nuxt`, `astro`, `remix`, etc.
|
|
38
|
+
- UI component library: `@mui/material`, `@chakra-ui/react`, `@radix-ui/*`, `antd`, `@headlessui/react`, etc.
|
|
39
|
+
- CSS-in-JS library: `styled-components`, `@emotion/react`, `@stitches/react`, `vanilla-extract`, etc.
|
|
40
|
+
- CSS utilities: `tailwindcss`, `unocss`, `windicss`
|
|
41
|
+
- Preprocessor: `sass`, `less`, `postcss`
|
|
42
|
+
- Note the exact version of each — not just presence.
|
|
43
|
+
|
|
44
|
+
If `package.json` is missing, ask: "I can't find package.json. Where is the project root?"
|
|
45
|
+
|
|
46
|
+
### Step 2 — Detect CSS Approach
|
|
47
|
+
|
|
48
|
+
One project may use multiple CSS strategies. Identify all of them.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# CSS Modules
|
|
52
|
+
find src -name "*.module.css" -o -name "*.module.scss" | head -5
|
|
53
|
+
|
|
54
|
+
# Tailwind (class-based utility)
|
|
55
|
+
cat tailwind.config.ts 2>/dev/null || cat tailwind.config.js 2>/dev/null
|
|
56
|
+
|
|
57
|
+
# styled-components or emotion
|
|
58
|
+
grep -rl "styled\." src/ | head -3
|
|
59
|
+
grep -rl "css\`" src/ | head -3
|
|
60
|
+
|
|
61
|
+
# Global stylesheets
|
|
62
|
+
find src -name "globals.css" -o -name "global.scss" -o -name "index.css" | head -3
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If both Tailwind and styled-components are present, flag it: "I see both Tailwind and styled-components in this project. Which is the canonical styling approach for new components?"
|
|
66
|
+
|
|
67
|
+
### Step 3 — Find Design Tokens
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# CSS custom properties
|
|
71
|
+
grep -rn ":root" src/ --include="*.css" --include="*.scss" | head -20
|
|
72
|
+
|
|
73
|
+
# Tailwind config tokens
|
|
74
|
+
cat tailwind.config.ts 2>/dev/null
|
|
75
|
+
|
|
76
|
+
# Token files
|
|
77
|
+
find . -name "tokens.json" -o -name "design-tokens.json" -o -name "_variables.scss" -o -name "variables.css" 2>/dev/null
|
|
78
|
+
|
|
79
|
+
# Theme files (MUI, Chakra, custom)
|
|
80
|
+
find src -name "theme.ts" -o -name "theme.tsx" -o -name "theme.js" | head -3
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Extract and list the available tokens by category: colors, spacing, typography, border-radius, shadows.
|
|
84
|
+
|
|
85
|
+
If no tokens are found, note it explicitly: "No design tokens were found. This project may be using hardcoded values or a library's default theme."
|
|
86
|
+
|
|
87
|
+
### Step 4 — Detect shadcn/ui (special case)
|
|
88
|
+
|
|
89
|
+
shadcn/ui is installed as local source files, not as a package. Detect it separately:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# shadcn/ui components live here
|
|
93
|
+
ls src/components/ui/ 2>/dev/null
|
|
94
|
+
|
|
95
|
+
# shadcn config
|
|
96
|
+
cat components.json 2>/dev/null
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If `components.json` exists, read it to understand the alias paths, CSS variable naming, and base color.
|
|
100
|
+
|
|
101
|
+
### Step 5 — Sample Existing Components
|
|
102
|
+
|
|
103
|
+
Read 3–5 existing component files. Choose a variety: a simple atomic component, a composite one, and if available, a page-level layout.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
find src/components -maxdepth 2 -name "*.tsx" -o -name "*.vue" | head -10
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For each sampled component, note:
|
|
110
|
+
- How it imports and applies styles (classNames, css modules, theme tokens, Tailwind classes).
|
|
111
|
+
- How props are typed and named.
|
|
112
|
+
- Whether it uses composition patterns (children, slots, render props).
|
|
113
|
+
- Any shared utility functions (e.g., `cn()`, `clsx()`, `twMerge()`).
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Confirmation Checklist
|
|
118
|
+
|
|
119
|
+
Before handing off to component-designer, present the following summary to the user and ask for explicit confirmation:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Detected stack:
|
|
123
|
+
Framework: [e.g. React 18 (Next.js 14)]
|
|
124
|
+
UI library: [e.g. shadcn/ui (Radix + Tailwind) | None detected]
|
|
125
|
+
CSS approach: [e.g. Tailwind CSS v3 with CSS Modules for overrides]
|
|
126
|
+
Design tokens: [e.g. CSS vars in globals.css: --color-primary, --spacing-md, ...]
|
|
127
|
+
OR [None found — using Tailwind config colors/spacing]
|
|
128
|
+
Component sample: [e.g. Button, Card, Modal — all use cn() + Tailwind classes]
|
|
129
|
+
|
|
130
|
+
Does this match your project setup? Any corrections before I proceed?
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Do not move forward until the user responds. A non-answer ("looks fine", "yes") is acceptable. Silence is not.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Output Format
|
|
138
|
+
|
|
139
|
+
After user confirmation, produce a structured stack summary to pass to component-designer:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
CONFIRMED STACK SUMMARY
|
|
143
|
+
-----------------------
|
|
144
|
+
Framework: React 18 / Next.js 14 (App Router)
|
|
145
|
+
UI library: shadcn/ui (components.json present, alias: @/components/ui)
|
|
146
|
+
CSS approach: Tailwind CSS v3; utility classes primary; no CSS Modules
|
|
147
|
+
Design tokens: Tailwind config (src/styles/tailwind.config.ts)
|
|
148
|
+
CSS vars: --background, --foreground, --primary, --muted (globals.css)
|
|
149
|
+
Style utilities: cn() from @/lib/utils (clsx + tailwind-merge)
|
|
150
|
+
Component pattern: Functional, TypeScript, props typed via interface, forwardRef on inputs
|
|
151
|
+
Sampled: Button.tsx, Card.tsx, Input.tsx
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
This summary is the required input for component-designer. If the summary cannot be completed, do not proceed.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Stack Scan Checklist
|
|
2
|
+
|
|
3
|
+
Reference table for stack-detector. Use this to ensure no detection category is missed before producing the confirmed stack summary.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Detection Categories
|
|
8
|
+
|
|
9
|
+
| Category | What to Find | Where to Look | How to Detect | Confirmed? |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| **Framework** | React, Vue, Angular, Svelte, Solid, Astro, etc. | `package.json` dependencies | `react`, `vue`, `@angular/core`, `svelte`, `astro` in deps | [ ] |
|
|
12
|
+
| **Meta-framework** | Next.js, Nuxt, Remix, SvelteKit, etc. | `package.json`, config files | `next`, `nuxt`, `@remix-run/react` in deps; `next.config.*`, `nuxt.config.*` | [ ] |
|
|
13
|
+
| **UI component library** | MUI, Chakra, shadcn, Radix, Headless, Ant, Mantine | `package.json` + component imports | `@mui/material`, `@chakra-ui/react`, `antd`, `@mantine/core`, `@headlessui/react`, or `components.json` | [ ] |
|
|
14
|
+
| **shadcn/ui (special)** | Local shadcn component files | `src/components/ui/`, `components.json` | `ls src/components/ui/`; `cat components.json` | [ ] |
|
|
15
|
+
| **CSS approach** | Tailwind, CSS Modules, styled-components, Emotion, Sass, vanilla | File extensions + package.json | `.module.css`, `.module.scss`, `styled.`, `css\``, `tailwindcss` in deps | [ ] |
|
|
16
|
+
| **CSS preprocessor** | Sass/SCSS, Less, PostCSS | `package.json`, file extensions | `sass`, `less`, `postcss` in deps; `.scss`, `.less` files | [ ] |
|
|
17
|
+
| **Design tokens (CSS vars)** | Custom properties at `:root` | Global CSS/SCSS files | `grep -rn ":root"` in stylesheets | [ ] |
|
|
18
|
+
| **Design tokens (Tailwind)** | Extended colors, spacing, fonts | `tailwind.config.ts` / `tailwind.config.js` | `theme.extend.colors`, `theme.extend.spacing`, `theme.extend.fontFamily` | [ ] |
|
|
19
|
+
| **Design tokens (theme file)** | MUI theme, Chakra theme, custom theme provider | `src/theme.ts`, `src/styles/theme.ts`, `ThemeProvider` usage | `cat theme.ts`; search for `createTheme`, `extendTheme`, `ThemeProvider` | [ ] |
|
|
20
|
+
| **Design tokens (JSON)** | Figma tokens, Style Dictionary output | `tokens.json`, `design-tokens.json` | `find . -name "tokens.json"` | [ ] |
|
|
21
|
+
| **Style utilities** | cn(), clsx(), classnames, twMerge | Utility files, component imports | `grep -rl "clsx\|cn(\|classnames\|twMerge" src/` | [ ] |
|
|
22
|
+
| **Component location** | Where components live in the project | `src/components/`, `app/components/`, `components/` | `find src -maxdepth 3 -type d -name "components"` | [ ] |
|
|
23
|
+
| **Naming convention** | PascalCase files, kebab-case files, flat vs nested | Sampled component file names | Read 3–5 component files | [ ] |
|
|
24
|
+
| **TypeScript** | Typed props, interfaces, generics in use | File extensions, tsconfig | `.tsx`, `.ts` files; `typescript` in deps | [ ] |
|
|
25
|
+
| **Existing breakpoints** | sm, md, lg, xl values | `tailwind.config`, global CSS, theme file | `theme.screens` in Tailwind; media queries in global CSS | [ ] |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Ambiguity Flags
|
|
30
|
+
|
|
31
|
+
Stop and ask the user if any of these are true:
|
|
32
|
+
|
|
33
|
+
| Condition | Question to Ask |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| Both Tailwind and styled-components present | "Which is the canonical styling approach for new components?" |
|
|
36
|
+
| Multiple UI libraries detected | "Are all of these in active use, or is one being deprecated?" |
|
|
37
|
+
| No tokens found anywhere | "No design tokens were found. Are values hardcoded throughout, or is there a file I missed?" |
|
|
38
|
+
| `components/ui/` exists but no `components.json` | "I see a `ui/` folder but no shadcn config. Is this shadcn, or a custom component library?" |
|
|
39
|
+
| CSS Modules and Tailwind both in use | "Do new components use Tailwind, CSS Modules, or both? Which does the team prefer?" |
|
|
40
|
+
| No component files found in expected locations | "Where does the project keep its UI components?" |
|
|
41
|
+
| `package.json` exists but no lock file | "Is this project actively maintained? No lock file found — dependencies may be inconsistent." |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Minimum Viable Summary
|
|
46
|
+
|
|
47
|
+
The confirmed stack summary passed to component-designer must include all of the following. Any `[unknown]` field must be resolved with the user before proceeding.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Framework: [name + version]
|
|
51
|
+
Meta-framework: [name + version] or [none]
|
|
52
|
+
UI library: [name + version] or [none]
|
|
53
|
+
CSS approach: [primary approach] + [secondary if applicable]
|
|
54
|
+
Design tokens: [source file(s) + list of key token categories available]
|
|
55
|
+
Style utilities: [e.g. cn() from @/lib/utils] or [none]
|
|
56
|
+
Component pattern: [structural observation from sampled files]
|
|
57
|
+
Sampled files: [list of 3–5 file paths read]
|
|
58
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "frontend-design",
|
|
3
|
+
"title": "Frontend Design",
|
|
4
|
+
"description": "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work.",
|
|
5
|
+
"portable": true,
|
|
6
|
+
"tags": ["frontend", "design", "workflow", "ui"],
|
|
7
|
+
"detectors": ["always"],
|
|
8
|
+
"detectionTriggers": ["manual"],
|
|
9
|
+
"installsFor": ["all"],
|
|
10
|
+
"agentSupport": ["codex", "claude", "cursor", "gemini", "copilot"],
|
|
11
|
+
"skillMetadata": {
|
|
12
|
+
"author": "skilly-hand",
|
|
13
|
+
"last-edit": "2026-04-04",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"version": "1.0.0",
|
|
16
|
+
"changelog": "Initial frontend-design skill; enforces stack-detection-first workflow before any UI component generation; affects catalog skill coverage for frontend and design workflows",
|
|
17
|
+
"auto-invoke": "Designing or generating UI components, pages, or layouts in a web or mobile project",
|
|
18
|
+
"allowed-tools": ["Read", "Grep", "Glob", "Bash", "Edit", "Write"]
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
{ "path": "SKILL.md", "kind": "instruction" },
|
|
22
|
+
{ "path": "agents/stack-detector.md", "kind": "asset" },
|
|
23
|
+
{ "path": "agents/component-designer.md", "kind": "asset" },
|
|
24
|
+
{ "path": "assets/stack-scan-checklist.md", "kind": "asset" }
|
|
25
|
+
],
|
|
26
|
+
"dependencies": []
|
|
27
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: life-guard
|
|
3
|
+
description: >
|
|
4
|
+
Review code, decisions, and artifacts through a multi-perspective committee and a domain expert safety guard, then synthesize a structured verdict.
|
|
5
|
+
Trigger: Reviewing code, decisions, pull requests, APIs, architecture, or any artifact that benefits from adversarial multi-perspective evaluation.
|
|
6
|
+
metadata:
|
|
7
|
+
author: skilly-hand
|
|
8
|
+
last-edit: 2026-04-04
|
|
9
|
+
license: Apache-2.0
|
|
10
|
+
version: "1.0.0"
|
|
11
|
+
changelog: "Added multi-perspective review skill with committee + safety guard synthesis; enables adversarial evaluation without permanent agent files; affects catalog skill coverage for review and quality workflows"
|
|
12
|
+
auto-invoke: "Reviewing code, decisions, or artifacts where adversarial multi-perspective evaluation adds value"
|
|
13
|
+
allowed-tools: Read, Grep, Glob, Bash, Task, SubAgent
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Life-Guard Guide
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
Use this skill when:
|
|
21
|
+
|
|
22
|
+
- A code change, architecture decision, or artifact carries meaningful risk.
|
|
23
|
+
- A single reviewer perspective is likely to miss domain-specific edge cases.
|
|
24
|
+
- You need a structured verdict, not an opinion.
|
|
25
|
+
- Pull requests, API designs, security decisions, or data models require adversarial scrutiny.
|
|
26
|
+
|
|
27
|
+
Do not use this skill for:
|
|
28
|
+
|
|
29
|
+
- Trivial single-file edits with no systemic impact.
|
|
30
|
+
- Tasks already covered by a domain-specific automated linter or test suite.
|
|
31
|
+
- Reviews where committee overhead exceeds the risk of getting it wrong.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core Workflow
|
|
36
|
+
|
|
37
|
+
1. Identify the target (code, decision, artifact) and its domain.
|
|
38
|
+
2. Determine committee size: 3 members for routine reviews, 5 for high-risk or cross-domain targets.
|
|
39
|
+
3. Spawn N committee members using `assets/committee-member-template.md`. Assign each a distinct evaluation lens. Run them independently — no member sees another's output.
|
|
40
|
+
4. Determine the expert domain for the safety guard.
|
|
41
|
+
5. Spawn 1 safety guard using `assets/safety-guard-template.md`. It evaluates the target from an authoritative expert position.
|
|
42
|
+
6. Run the committee and safety guard in parallel.
|
|
43
|
+
7. Collect all outputs.
|
|
44
|
+
8. Synthesize a structured verdict following the Synthesis Rules.
|
|
45
|
+
9. Emit the final verdict with confidence tier, top findings, and recommended action.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Committee Protocol
|
|
50
|
+
|
|
51
|
+
### Size
|
|
52
|
+
|
|
53
|
+
| Target Risk | Committee Size |
|
|
54
|
+
| ----------- | -------------- |
|
|
55
|
+
| Routine (single concern) | 3 members |
|
|
56
|
+
| High-risk or cross-domain | 5 members |
|
|
57
|
+
|
|
58
|
+
### Lens Assignment
|
|
59
|
+
|
|
60
|
+
Assign lenses based on what is being reviewed. Examples:
|
|
61
|
+
|
|
62
|
+
| Domain | Possible Lenses |
|
|
63
|
+
| ------ | --------------- |
|
|
64
|
+
| Code change | Security, Performance, Maintainability, Testability, UX impact |
|
|
65
|
+
| Architecture decision | Scalability, Operational risk, Developer experience, Cost, Data integrity |
|
|
66
|
+
| API design | Consumer ergonomics, Contract stability, Security, Versioning, Documentation |
|
|
67
|
+
| Data model | Normalization, Query performance, Migration safety, Privacy, Extensibility |
|
|
68
|
+
|
|
69
|
+
Never assign the same lens to two committee members. Each member evaluates independently — no member sees another's prompt or output during evaluation.
|
|
70
|
+
|
|
71
|
+
### Independence Rules
|
|
72
|
+
|
|
73
|
+
- Spawn committee members in parallel.
|
|
74
|
+
- Pass only the target artifact and the member's assigned lens as context.
|
|
75
|
+
- Do not share intermediate findings between members before synthesis.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Safety Guard Protocol
|
|
80
|
+
|
|
81
|
+
### Domain Resolution
|
|
82
|
+
|
|
83
|
+
Determine the expert domain from the target:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
Target is code? -> Domain is the language + ecosystem (e.g., "TypeScript + Node.js security")
|
|
87
|
+
Target is architecture? -> Domain is the system archetype (e.g., "distributed systems reliability")
|
|
88
|
+
Target is a decision? -> Domain is the function it affects (e.g., "data privacy compliance")
|
|
89
|
+
Target is an API? -> Domain is the protocol + consumer context (e.g., "REST API design for web clients")
|
|
90
|
+
Target is unclear? -> Ask before spawning
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Specialization
|
|
94
|
+
|
|
95
|
+
The safety guard:
|
|
96
|
+
|
|
97
|
+
- Operates as an authoritative expert, not a peer reviewer.
|
|
98
|
+
- Evaluates the target for correctness, safety, and conformance to domain standards.
|
|
99
|
+
- Raises blockers, not suggestions. If the safety guard finds a structural flaw, it is a hard finding.
|
|
100
|
+
- Runs in parallel with the committee, not after it.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Synthesis Rules
|
|
105
|
+
|
|
106
|
+
### Confidence Tiers
|
|
107
|
+
|
|
108
|
+
| Tier | Condition | Recommended Action |
|
|
109
|
+
| ---- | --------- | ------------------ |
|
|
110
|
+
| HIGH | Safety guard passes + committee majority agrees | Approve with noted caveats |
|
|
111
|
+
| MEDIUM | Safety guard passes + committee is split | Approve after addressing split findings |
|
|
112
|
+
| LOW | Safety guard raises a blocker OR committee majority flags risk | Block — require remediation before approval |
|
|
113
|
+
| VETO | Safety guard raises a structural flaw | Hard block — do not proceed |
|
|
114
|
+
|
|
115
|
+
### Contradiction Handling
|
|
116
|
+
|
|
117
|
+
- Safety guard findings override committee findings on correctness and safety.
|
|
118
|
+
- When committee members contradict each other, count lenses: majority rules unless a minority finding is a security or data-integrity concern.
|
|
119
|
+
- A single security or data-integrity finding from any voice is sufficient for LOW or VETO tier.
|
|
120
|
+
|
|
121
|
+
### Verdict Structure
|
|
122
|
+
|
|
123
|
+
Emit exactly this structure:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
CONFIDENCE: {HIGH | MEDIUM | LOW | VETO}
|
|
127
|
+
|
|
128
|
+
SUMMARY:
|
|
129
|
+
{1–2 sentences on the overall state of the target}
|
|
130
|
+
|
|
131
|
+
TOP FINDINGS:
|
|
132
|
+
1. [{Voice}] {Finding} — {Severity: Info | Warning | Blocker}
|
|
133
|
+
2. [{Voice}] {Finding} — {Severity: Info | Warning | Blocker}
|
|
134
|
+
...
|
|
135
|
+
|
|
136
|
+
RECOMMENDED ACTION:
|
|
137
|
+
{Approve | Approve with caveats | Block — remediate before resubmit | Hard block}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Decision Tree
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
Is there a safety guard blocker?
|
|
146
|
+
YES -> VETO — hard block regardless of committee output
|
|
147
|
+
|
|
148
|
+
Does the safety guard pass?
|
|
149
|
+
YES -> evaluate committee output
|
|
150
|
+
|
|
151
|
+
Do 3+ of 5 committee members (or 2+ of 3) flag a risk?
|
|
152
|
+
YES -> LOW — block and require remediation
|
|
153
|
+
NO -> continue
|
|
154
|
+
|
|
155
|
+
Does any committee member flag a security or data-integrity risk?
|
|
156
|
+
YES -> LOW at minimum — escalate to safety guard if not already covered
|
|
157
|
+
|
|
158
|
+
Does committee majority agree the target is sound?
|
|
159
|
+
YES and safety guard passes -> HIGH or MEDIUM depending on split
|
|
160
|
+
NO -> LOW
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Commands
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Reference committee member template when constructing agent prompts
|
|
169
|
+
cat .skilly-hand/catalog/life-guard/assets/committee-member-template.md
|
|
170
|
+
|
|
171
|
+
# Reference safety guard template when constructing agent prompts
|
|
172
|
+
cat .skilly-hand/catalog/life-guard/assets/safety-guard-template.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Resources
|
|
178
|
+
|
|
179
|
+
- Committee member prompt template: [assets/committee-member-template.md](assets/committee-member-template.md)
|
|
180
|
+
- Safety guard prompt template: [assets/safety-guard-template.md](assets/safety-guard-template.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Committee Member: {{LENS}}
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
|
|
5
|
+
You are an ephemeral code and decision reviewer. Your evaluation lens is **{{LENS}}**.
|
|
6
|
+
You are one of {{COMMITTEE_SIZE}} independent reviewers. You do not know what the others are evaluating or what they will find.
|
|
7
|
+
|
|
8
|
+
## Target
|
|
9
|
+
|
|
10
|
+
{{TARGET_ARTIFACT}}
|
|
11
|
+
|
|
12
|
+
## Evaluation Instructions
|
|
13
|
+
|
|
14
|
+
Evaluate the target exclusively through the **{{LENS}}** lens.
|
|
15
|
+
|
|
16
|
+
1. State the lens clearly at the top of your output.
|
|
17
|
+
2. Identify findings. For each finding:
|
|
18
|
+
- Describe the issue precisely.
|
|
19
|
+
- Cite the specific location (file, line, section, or decision point) where applicable.
|
|
20
|
+
- Assign severity: `Info`, `Warning`, or `Blocker`.
|
|
21
|
+
3. If the target is sound from your lens perspective, state that explicitly — do not invent findings.
|
|
22
|
+
4. Do not comment on concerns outside your assigned lens.
|
|
23
|
+
5. Do not suggest what other reviewers should look for.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
LENS: {{LENS}}
|
|
29
|
+
|
|
30
|
+
FINDINGS:
|
|
31
|
+
1. {Location} — {Description} — {Severity}
|
|
32
|
+
2. {Location} — {Description} — {Severity}
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
OVERALL ASSESSMENT FROM THIS LENS:
|
|
36
|
+
{Pass | Caution | Block} — {1 sentence rationale}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Constraints
|
|
40
|
+
|
|
41
|
+
- MUST evaluate only from the assigned lens.
|
|
42
|
+
- MUST NOT reference other committee members.
|
|
43
|
+
- MUST NOT speculate about the orchestrator's final verdict.
|
|
44
|
+
- MUST cite evidence from the target for every finding rated Warning or higher.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Safety Guard: {{DOMAIN}}
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
|
|
5
|
+
You are an authoritative domain expert, not a peer reviewer. Your domain is **{{DOMAIN}}**.
|
|
6
|
+
You are the single safety guard for this review. Your findings carry elevated weight in the final verdict.
|
|
7
|
+
|
|
8
|
+
## Target
|
|
9
|
+
|
|
10
|
+
{{TARGET_ARTIFACT}}
|
|
11
|
+
|
|
12
|
+
## Evaluation Instructions
|
|
13
|
+
|
|
14
|
+
Evaluate the target for correctness, safety, and conformance to **{{DOMAIN}}** standards.
|
|
15
|
+
|
|
16
|
+
1. State the domain clearly at the top of your output.
|
|
17
|
+
2. Identify blockers first. A blocker is any finding that, if unaddressed, makes the target unsafe, incorrect, or non-conformant.
|
|
18
|
+
3. After blockers, identify warnings — issues that should be addressed but do not hard-stop the review.
|
|
19
|
+
4. If the target conforms fully, state that explicitly with rationale.
|
|
20
|
+
5. Do not hedge on blockers. If something is structurally wrong, call it a blocker.
|
|
21
|
+
|
|
22
|
+
## Output Format
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
DOMAIN: {{DOMAIN}}
|
|
26
|
+
|
|
27
|
+
BLOCKERS:
|
|
28
|
+
1. {Location} — {Description} — Blocker
|
|
29
|
+
...
|
|
30
|
+
(none if no blockers found)
|
|
31
|
+
|
|
32
|
+
WARNINGS:
|
|
33
|
+
1. {Location} — {Description} — Warning
|
|
34
|
+
...
|
|
35
|
+
(none if no warnings found)
|
|
36
|
+
|
|
37
|
+
CONFORMANCE VERDICT:
|
|
38
|
+
{Pass | Conditional Pass | Fail} — {1–2 sentence rationale}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Constraints
|
|
42
|
+
|
|
43
|
+
- MUST assess correctness and safety against {{DOMAIN}} standards specifically.
|
|
44
|
+
- MUST NOT soften blockers into warnings.
|
|
45
|
+
- MUST cite the relevant standard, rule, or principle for every Blocker finding.
|
|
46
|
+
- MUST NOT defer to committee output — this assessment is independent.
|
|
47
|
+
- A structural flaw triggers VETO at synthesis regardless of committee consensus.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "life-guard",
|
|
3
|
+
"title": "Life-Guard",
|
|
4
|
+
"description": "Review code, decisions, and artifacts through a multi-perspective committee and a domain expert safety guard, then synthesize a structured verdict.",
|
|
5
|
+
"portable": true,
|
|
6
|
+
"tags": ["core", "workflow", "review", "quality"],
|
|
7
|
+
"detectors": ["always"],
|
|
8
|
+
"detectionTriggers": ["manual"],
|
|
9
|
+
"installsFor": ["all"],
|
|
10
|
+
"agentSupport": ["codex", "claude", "cursor", "gemini", "copilot"],
|
|
11
|
+
"skillMetadata": {
|
|
12
|
+
"author": "skilly-hand",
|
|
13
|
+
"last-edit": "2026-04-04",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"version": "1.0.0",
|
|
16
|
+
"changelog": "Added multi-perspective review skill with committee + safety guard synthesis; enables adversarial evaluation without permanent agent files; affects catalog skill coverage for review and quality workflows",
|
|
17
|
+
"auto-invoke": "Reviewing code, decisions, or artifacts where adversarial multi-perspective evaluation adds value",
|
|
18
|
+
"allowed-tools": [
|
|
19
|
+
"Read",
|
|
20
|
+
"Grep",
|
|
21
|
+
"Glob",
|
|
22
|
+
"Bash",
|
|
23
|
+
"Task",
|
|
24
|
+
"SubAgent"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
{ "path": "SKILL.md", "kind": "instruction" },
|
|
29
|
+
{ "path": "assets/committee-member-template.md", "kind": "asset" },
|
|
30
|
+
{ "path": "assets/safety-guard-template.md", "kind": "asset" }
|
|
31
|
+
],
|
|
32
|
+
"dependencies": []
|
|
33
|
+
}
|