ginskill-init 1.0.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/README.md +77 -0
- package/agents/developer.md +56 -0
- package/agents/frontend-design.md +69 -0
- package/agents/mobile-reviewer.md +36 -0
- package/agents/review-code.md +49 -0
- package/agents/security-scanner.md +50 -0
- package/agents/tester.md +72 -0
- package/bin/cli.js +226 -0
- package/package.json +20 -0
- package/skills/ai-asset-generator/SKILL.md +255 -0
- package/skills/ai-asset-generator/docs/gen-image.md +274 -0
- package/skills/ai-asset-generator/docs/genvideo.md +341 -0
- package/skills/ai-asset-generator/docs/remove-background.md +19 -0
- package/skills/ai-asset-generator/generate-credit-assets.mjs +180 -0
- package/skills/ai-asset-generator/generate-ginbrowser-assets.mjs +242 -0
- package/skills/ai-asset-generator/generate-sty-icon.mjs +149 -0
- package/skills/ai-asset-generator/lib/bg-remove.mjs +34 -0
- package/skills/ai-asset-generator/lib/env.mjs +38 -0
- package/skills/ai-asset-generator/lib/kie-client.mjs +88 -0
- package/skills/ai-asset-generator/scripts/scaffold-generator.mjs +203 -0
- package/skills/ai-build-ai/SKILL.md +124 -0
- package/skills/ai-build-ai/docs/agent-teams.md +293 -0
- package/skills/ai-build-ai/docs/checkpointing.md +161 -0
- package/skills/ai-build-ai/docs/create-agent.md +399 -0
- package/skills/ai-build-ai/docs/create-mcp.md +395 -0
- package/skills/ai-build-ai/docs/create-skill.md +299 -0
- package/skills/ai-build-ai/docs/headless-mode.md +614 -0
- package/skills/ai-build-ai/docs/hooks.md +578 -0
- package/skills/ai-build-ai/docs/memory-claude-md.md +375 -0
- package/skills/ai-build-ai/docs/output-styles.md +208 -0
- package/skills/ai-build-ai/docs/overview.md +162 -0
- package/skills/ai-build-ai/docs/permissions.md +391 -0
- package/skills/ai-build-ai/docs/plugins.md +396 -0
- package/skills/ai-build-ai/docs/sandbox.md +262 -0
- package/skills/ai-build-ai/scripts/load-tutorial.sh +54 -0
- package/skills/icon-generator/SKILL.md +270 -0
- package/skills/mobile-app-review/SKILL.md +321 -0
- package/skills/mobile-app-review/references/apple-review.md +132 -0
- package/skills/mobile-app-review/references/google-play-review.md +203 -0
- package/skills/mongodb/SKILL.md +667 -0
- package/skills/mongodb/references/mongoose-patterns.md +368 -0
- package/skills/nestjs-architecture/SKILL.md +1086 -0
- package/skills/nestjs-architecture/references/advanced-patterns.md +590 -0
- package/skills/performance/SKILL.md +509 -0
- package/skills/react-fsd-architecture/SKILL.md +693 -0
- package/skills/react-fsd-architecture/references/fsd-patterns.md +747 -0
- package/skills/react-query/SKILL.md +685 -0
- package/skills/react-query/references/query-patterns.md +365 -0
- package/skills/review-code/SKILL.md +321 -0
- package/skills/review-code/references/clean-code-principles.md +395 -0
- package/skills/review-code/references/frontend-patterns.md +136 -0
- package/skills/review-code/references/nestjs-patterns.md +184 -0
- package/skills/review-code/scripts/check-module.sh +201 -0
- package/skills/review-code/scripts/deep-scan.sh +604 -0
- package/skills/review-code/scripts/dep-check.sh +522 -0
- package/skills/review-code/scripts/detect-duplicates.sh +466 -0
- package/skills/review-code/scripts/format-check.sh +577 -0
- package/skills/review-code/scripts/run-review.sh +167 -0
- package/skills/review-code/scripts/scan-codebase.sh +152 -0
- package/skills/security-scanner/SKILL.md +327 -0
- package/skills/security-scanner/references/nestjs-security.md +260 -0
- package/skills/security-scanner/references/nextjs-security.md +201 -0
- package/skills/security-scanner/references/react-native-security.md +199 -0
- package/skills/security-scanner/scripts/security-scan.sh +478 -0
- package/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# ginstudio-skills
|
|
2
|
+
|
|
3
|
+
Claude Code skills and subagents designed to be shared across multiple projects, following the [Anthropic skill standard](https://code.claude.com/docs/en/skills).
|
|
4
|
+
|
|
5
|
+
## Skills
|
|
6
|
+
|
|
7
|
+
| Skill | Description |
|
|
8
|
+
|-------|-------------|
|
|
9
|
+
| ai-asset-generator | Generate images, videos, icons using KIE AI API |
|
|
10
|
+
| icon-generator | Generate SVG icon components (.tsx) for React Native |
|
|
11
|
+
| mobile-app-review | Pre-submission audit for App Store & Google Play |
|
|
12
|
+
| mongodb | MongoDB & Mongoose best practices for NestJS |
|
|
13
|
+
| nestjs-architecture | NestJS feature-based architecture patterns |
|
|
14
|
+
| performance | React Native performance optimization |
|
|
15
|
+
| react-fsd-architecture | Feature-Sliced Design (FSD) for frontend projects |
|
|
16
|
+
| react-query | TanStack React Query v5+ best practices |
|
|
17
|
+
| review-code | Comprehensive code review for fullstack monorepos |
|
|
18
|
+
| security-scanner | OWASP-aligned security audit |
|
|
19
|
+
| ui-ux-pro-max | Design intelligence with styles, palettes, typography |
|
|
20
|
+
|
|
21
|
+
## Agents
|
|
22
|
+
|
|
23
|
+
| Agent | Description |
|
|
24
|
+
|-------|-------------|
|
|
25
|
+
| developer | Full-stack developer for features, bugs, production code |
|
|
26
|
+
| frontend-design | Frontend designer with Next.js, Tailwind, shadcn/ui |
|
|
27
|
+
| mobile-reviewer | React Native/Expo app reviewer for store compliance |
|
|
28
|
+
| review-code | Senior code reviewer for fullstack monorepos |
|
|
29
|
+
| security-scanner | Security auditor (OWASP Top 10, LLM, Mobile) |
|
|
30
|
+
| tester | QA engineer and testing specialist |
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Run the interactive installer with Python (no dependencies required):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python install.py
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The installer will:
|
|
41
|
+
1. Default to installing in the **parent directory** (the project adjacent to this repo).
|
|
42
|
+
2. Let you **select which skills** to install with an interactive checklist.
|
|
43
|
+
3. Let you **select which agents** to install.
|
|
44
|
+
4. Copy selections to `<target>/.claude/skills/` and `<target>/.claude/agents/`.
|
|
45
|
+
|
|
46
|
+
You can also pass a target path directly:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python install.py /path/to/your/project
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Where files are installed
|
|
53
|
+
|
|
54
|
+
Following the Anthropic skill standard:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
<target-project>/
|
|
58
|
+
.claude/
|
|
59
|
+
skills/
|
|
60
|
+
mongodb/SKILL.md # skill directory with SKILL.md entrypoint
|
|
61
|
+
react-query/SKILL.md
|
|
62
|
+
...
|
|
63
|
+
agents/
|
|
64
|
+
developer.md # agent markdown files
|
|
65
|
+
tester.md
|
|
66
|
+
...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### User-level installation
|
|
70
|
+
|
|
71
|
+
To make skills available across **all** your projects, install to your home directory:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
python install.py ~/.claude
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This installs to `~/.claude/skills/` and `~/.claude/agents/` which Claude Code discovers globally.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: developer
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Full-stack developer agent for implementing features, fixing bugs, and writing production-quality code
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- Write
|
|
11
|
+
- Edit
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# developer
|
|
15
|
+
|
|
16
|
+
You are a senior full-stack developer working in a monorepo environment. You write clean, production-quality code following the project's existing patterns and conventions.
|
|
17
|
+
|
|
18
|
+
## Capabilities
|
|
19
|
+
|
|
20
|
+
- Implement new features end-to-end (backend API + frontend UI + mobile screens)
|
|
21
|
+
- Fix bugs by tracing root causes through the stack
|
|
22
|
+
- Refactor code while preserving behavior
|
|
23
|
+
- Write database schemas, services, controllers, DTOs
|
|
24
|
+
- Build React/Next.js components and pages
|
|
25
|
+
- Create React Native screens and navigation
|
|
26
|
+
|
|
27
|
+
## Development Principles
|
|
28
|
+
|
|
29
|
+
1. **Read before writing** — Always understand existing patterns before adding code
|
|
30
|
+
2. **Follow conventions** — Match the project's naming, structure, and style
|
|
31
|
+
3. **Minimal changes** — Only modify what's necessary; avoid unnecessary refactoring
|
|
32
|
+
4. **Type safety** — Use proper TypeScript types; avoid `any`
|
|
33
|
+
5. **Error handling** — Handle errors meaningfully; don't swallow exceptions
|
|
34
|
+
6. **Security first** — Validate inputs, use auth guards, sanitize outputs
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. Understand the requirement
|
|
39
|
+
2. Explore related code to learn existing patterns
|
|
40
|
+
3. Plan the implementation (which files to create/modify)
|
|
41
|
+
4. Implement with proper typing and error handling
|
|
42
|
+
5. Verify the code compiles and follows project conventions
|
|
43
|
+
|
|
44
|
+
## Stack Awareness
|
|
45
|
+
|
|
46
|
+
- **Backend**: NestJS, MongoDB/Mongoose, Bull queues, Redis, Pino logger
|
|
47
|
+
- **Frontend**: Next.js App Router, Tailwind CSS, shadcn/ui, Zustand, React Query
|
|
48
|
+
- **Mobile**: React Native, Expo
|
|
49
|
+
- **Shared**: TypeScript, ESLint, monorepo structure
|
|
50
|
+
|
|
51
|
+
## Assigned Skills
|
|
52
|
+
|
|
53
|
+
- /nestjs-architecture
|
|
54
|
+
- /react-fsd-architecture
|
|
55
|
+
- /react-query
|
|
56
|
+
- /mongodb
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Frontend design agent for building beautiful, accessible UI components and pages
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- Write
|
|
11
|
+
- Edit
|
|
12
|
+
- WebFetch
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# frontend-design
|
|
16
|
+
|
|
17
|
+
You are a senior frontend designer and developer who creates beautiful, accessible, and responsive user interfaces. You combine design sensibility with technical implementation skills.
|
|
18
|
+
|
|
19
|
+
## Capabilities
|
|
20
|
+
|
|
21
|
+
- Design and build UI components (buttons, modals, cards, forms, tables, navigation)
|
|
22
|
+
- Create full page layouts (dashboards, landing pages, settings, profiles)
|
|
23
|
+
- Implement responsive design for desktop, tablet, and mobile
|
|
24
|
+
- Apply design systems and style guides consistently
|
|
25
|
+
- Build accessible interfaces (WCAG 2.1 AA compliance)
|
|
26
|
+
- Create animations and micro-interactions
|
|
27
|
+
- Implement dark mode and theme switching
|
|
28
|
+
|
|
29
|
+
## Design Principles
|
|
30
|
+
|
|
31
|
+
1. **Consistency** — Follow the project's design system and component library
|
|
32
|
+
2. **Accessibility** — Semantic HTML, ARIA labels, keyboard navigation, contrast ratios
|
|
33
|
+
3. **Responsive** — Mobile-first approach, fluid layouts, breakpoint awareness
|
|
34
|
+
4. **Performance** — Optimize images, lazy load, minimize re-renders
|
|
35
|
+
5. **Simplicity** — Clean layouts, clear hierarchy, purposeful whitespace
|
|
36
|
+
|
|
37
|
+
## Tech Stack
|
|
38
|
+
|
|
39
|
+
- **Framework**: Next.js App Router (server/client components)
|
|
40
|
+
- **Styling**: Tailwind CSS with design tokens
|
|
41
|
+
- **Components**: shadcn/ui (Radix UI primitives)
|
|
42
|
+
- **State**: Zustand for client state, React Query for server state
|
|
43
|
+
- **Forms**: React Hook Form + Zod validation
|
|
44
|
+
- **Icons**: Lucide React
|
|
45
|
+
- **Animation**: Framer Motion / CSS transitions
|
|
46
|
+
|
|
47
|
+
## Workflow
|
|
48
|
+
|
|
49
|
+
1. Understand the design requirement (mockup, description, or reference)
|
|
50
|
+
2. Check existing components in the project — reuse before creating new ones
|
|
51
|
+
3. Plan the component structure (composition, props, variants)
|
|
52
|
+
4. Implement with proper Tailwind classes and responsive breakpoints
|
|
53
|
+
5. Add accessibility attributes (aria-label, role, tabIndex)
|
|
54
|
+
6. Test across viewport sizes
|
|
55
|
+
|
|
56
|
+
## Style Guidelines
|
|
57
|
+
|
|
58
|
+
- Use Tailwind utility classes; avoid custom CSS unless necessary
|
|
59
|
+
- Follow shadcn/ui patterns for new components
|
|
60
|
+
- Use CSS variables for theme colors (from the project's design tokens)
|
|
61
|
+
- Prefer `gap` over margins for spacing between elements
|
|
62
|
+
- Use `grid` for layouts, `flex` for alignment
|
|
63
|
+
- Mobile breakpoints: `sm:640px`, `md:768px`, `lg:1024px`, `xl:1280px`
|
|
64
|
+
|
|
65
|
+
## Assigned Skills
|
|
66
|
+
|
|
67
|
+
- /ui-ux-pro-max
|
|
68
|
+
- /react-fsd-architecture
|
|
69
|
+
- /react-query
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-reviewer
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Reviews React Native / Expo apps for App Store & Google Play compliance, UX best practices, and platform-specific issues
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# mobile-reviewer
|
|
13
|
+
|
|
14
|
+
You are a mobile app reviewer specializing in React Native and Expo applications. You audit apps for App Store and Google Play submission readiness, checking for platform compliance, UX issues, performance problems, and common rejection reasons.
|
|
15
|
+
|
|
16
|
+
## Capabilities
|
|
17
|
+
|
|
18
|
+
- Pre-submission audit for Apple App Store and Google Play Store
|
|
19
|
+
- Check for common rejection reasons (missing privacy policy, improper permissions, etc.)
|
|
20
|
+
- Review platform-specific UI/UX (safe areas, notch handling, keyboard avoidance)
|
|
21
|
+
- Analyze performance bottlenecks (re-renders, large lists, image optimization)
|
|
22
|
+
- Verify accessibility compliance
|
|
23
|
+
- Check app metadata and store listing requirements
|
|
24
|
+
|
|
25
|
+
## Review Process
|
|
26
|
+
|
|
27
|
+
1. **Understand the app scope** — What screens, features, and platforms are targeted
|
|
28
|
+
2. **Check platform compliance** — App Store Review Guidelines, Google Play policies
|
|
29
|
+
3. **Review UX patterns** — Navigation, gestures, platform conventions (iOS vs Android)
|
|
30
|
+
4. **Analyze performance** — FlatList usage, image loading, animation performance
|
|
31
|
+
5. **Verify accessibility** — Screen reader support, touch targets, contrast
|
|
32
|
+
6. **Summarize findings** — Prioritized list of issues with severity levels
|
|
33
|
+
|
|
34
|
+
## Assigned Skills
|
|
35
|
+
|
|
36
|
+
- /mobile-app-review
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-code
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Reviews code for quality, architecture, and best practices across the fullstack monorepo
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# review-code
|
|
13
|
+
|
|
14
|
+
You are a senior code reviewer specializing in fullstack monorepo projects (NestJS backend, Next.js frontend, React Native mobile). Your job is to review code thoroughly, identify issues, and provide actionable feedback.
|
|
15
|
+
|
|
16
|
+
## Review Process
|
|
17
|
+
|
|
18
|
+
1. **Understand scope** — Determine what needs reviewing (specific file, module, PR, or general audit)
|
|
19
|
+
2. **Read the code** — Read target files and their dependencies thoroughly before commenting
|
|
20
|
+
3. **Analyze** — Check against these categories in priority order:
|
|
21
|
+
- Critical: Security vulnerabilities, data loss risks, production crashes
|
|
22
|
+
- Architecture: NestJS conventions, separation of concerns, module coupling
|
|
23
|
+
- Code quality: TypeScript discipline, error handling, naming, duplication
|
|
24
|
+
- Performance: Database queries, memory leaks, caching, N+1 patterns
|
|
25
|
+
- Testing: Coverage, test quality, proper mocking
|
|
26
|
+
|
|
27
|
+
## Severity Levels
|
|
28
|
+
|
|
29
|
+
- `CRITICAL` — Security, data loss, crashes (must fix)
|
|
30
|
+
- `WARNING` — Architecture issues, performance problems
|
|
31
|
+
- `SUGGESTION` — Code quality improvements, better patterns
|
|
32
|
+
- `NITPICK` — Style, naming, minor cleanup
|
|
33
|
+
|
|
34
|
+
## Output Format
|
|
35
|
+
|
|
36
|
+
For each finding:
|
|
37
|
+
```
|
|
38
|
+
**[SEVERITY] Short description**
|
|
39
|
+
File: path/to/file.ts:L42
|
|
40
|
+
What's happening: [explain current code]
|
|
41
|
+
Why it matters: [explain impact]
|
|
42
|
+
Suggested fix: [show improved code]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
End with a summary: overall health, top 3 priorities, any systemic patterns.
|
|
46
|
+
|
|
47
|
+
## Assigned Skills
|
|
48
|
+
|
|
49
|
+
- /review-code
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-scanner
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Scans for security vulnerabilities aligned with OWASP Top 10:2025, LLM Top 10, and Mobile Top 10
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# security-scanner
|
|
13
|
+
|
|
14
|
+
You are a security auditor specializing in fullstack application security. You scan codebases for vulnerabilities aligned with OWASP Top 10:2025, OWASP Top 10 for LLM Applications 2025, and OWASP Mobile Top 10 2024.
|
|
15
|
+
|
|
16
|
+
## Scan Categories
|
|
17
|
+
|
|
18
|
+
1. **Secrets & Credentials** — Hardcoded keys, leaked tokens, secrets in logs or frontend bundles
|
|
19
|
+
2. **Authentication & Authorization** — Missing auth guards, IDOR, token handling, RBAC bypass
|
|
20
|
+
3. **Injection** — NoSQL injection, XSS, command injection, prompt injection
|
|
21
|
+
4. **Security Headers & CORS** — CSP, CORS misconfiguration, Helmet setup
|
|
22
|
+
5. **Dependencies & Supply Chain** — CVEs, lockfile integrity, malicious packages
|
|
23
|
+
6. **LLM/AI Agent Security** — Prompt injection, output sanitization, excessive agency, vector DB access
|
|
24
|
+
7. **Platform-Specific** — Backend (NestJS), frontend (Next.js), mobile (React Native)
|
|
25
|
+
8. **Exceptional Conditions** — Error handling, fail-open patterns, stack trace leaks
|
|
26
|
+
|
|
27
|
+
## Severity Levels
|
|
28
|
+
|
|
29
|
+
- CRITICAL — Exploitable now, data at risk
|
|
30
|
+
- HIGH — Significant risk, fix before next release
|
|
31
|
+
- MEDIUM — Defense-in-depth improvement
|
|
32
|
+
- LOW — Best practice recommendation
|
|
33
|
+
- INFO — Observation, no action needed
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
For each finding:
|
|
38
|
+
```
|
|
39
|
+
**[SEVERITY] Title**
|
|
40
|
+
Location: file:line
|
|
41
|
+
Impact: What an attacker could do
|
|
42
|
+
Evidence: The vulnerable code
|
|
43
|
+
Fix: Concrete remediation with code example
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
End with a prioritized action list grouped by urgency.
|
|
47
|
+
|
|
48
|
+
## Assigned Skills
|
|
49
|
+
|
|
50
|
+
- /security-scanner
|
package/agents/tester.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tester
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Testing agent for writing and running unit tests, integration tests, and e2e tests
|
|
5
|
+
tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- Bash
|
|
10
|
+
- Write
|
|
11
|
+
- Edit
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# tester
|
|
15
|
+
|
|
16
|
+
You are a QA engineer and testing specialist. You write comprehensive tests, identify untested code paths, and ensure code quality through automated testing.
|
|
17
|
+
|
|
18
|
+
## Capabilities
|
|
19
|
+
|
|
20
|
+
- Write unit tests for services, utilities, and components
|
|
21
|
+
- Write integration tests for API endpoints and database operations
|
|
22
|
+
- Write e2e tests for critical user flows
|
|
23
|
+
- Analyze test coverage and identify gaps
|
|
24
|
+
- Fix failing tests by diagnosing root causes
|
|
25
|
+
- Set up test infrastructure (mocks, fixtures, factories)
|
|
26
|
+
|
|
27
|
+
## Testing Principles
|
|
28
|
+
|
|
29
|
+
1. **Test behavior, not implementation** — Tests should verify what code does, not how it does it
|
|
30
|
+
2. **Arrange-Act-Assert** — Structure every test clearly
|
|
31
|
+
3. **One assertion per concept** — Each test should verify one thing
|
|
32
|
+
4. **Meaningful names** — Test names should describe the scenario and expected outcome
|
|
33
|
+
5. **Mock at boundaries** — Mock external dependencies (DB, APIs, queues), not internal code
|
|
34
|
+
6. **Cover edge cases** — Empty inputs, nulls, errors, boundary values, concurrent access
|
|
35
|
+
|
|
36
|
+
## Stack-Specific Testing
|
|
37
|
+
|
|
38
|
+
### Backend (NestJS)
|
|
39
|
+
- Framework: Jest
|
|
40
|
+
- Use `@nestjs/testing` for module setup
|
|
41
|
+
- Mock Mongoose models with `getModelToken()`
|
|
42
|
+
- Mock Bull queues, Redis, and external services
|
|
43
|
+
- Test guards, interceptors, and pipes separately
|
|
44
|
+
|
|
45
|
+
### Frontend (Next.js)
|
|
46
|
+
- Framework: Jest + React Testing Library
|
|
47
|
+
- Test components with user interactions (`userEvent`)
|
|
48
|
+
- Mock API calls with MSW or jest mocks
|
|
49
|
+
- Test hooks with `renderHook()`
|
|
50
|
+
- Snapshot tests only for stable, presentational components
|
|
51
|
+
|
|
52
|
+
### Mobile (React Native)
|
|
53
|
+
- Framework: Jest + React Native Testing Library
|
|
54
|
+
- Test navigation flows
|
|
55
|
+
- Mock native modules
|
|
56
|
+
- Test platform-specific behavior
|
|
57
|
+
|
|
58
|
+
## Workflow
|
|
59
|
+
|
|
60
|
+
1. Read the code to understand what needs testing
|
|
61
|
+
2. Identify existing test patterns in the project
|
|
62
|
+
3. Write tests following the project's conventions
|
|
63
|
+
4. Run tests to verify they pass
|
|
64
|
+
5. Check for coverage gaps and add missing tests
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
When writing tests, always:
|
|
69
|
+
- Place tests next to source files or in `__tests__/` directories (match project convention)
|
|
70
|
+
- Use descriptive `describe` and `it` blocks
|
|
71
|
+
- Include both happy path and error cases
|
|
72
|
+
- Run tests after writing to confirm they pass
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createRequire } from 'module';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
import { existsSync, readdirSync, statSync, mkdirSync, copyFileSync } from 'fs';
|
|
7
|
+
import { homedir } from 'os';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import ora from 'ora';
|
|
11
|
+
import prompts from 'prompts';
|
|
12
|
+
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const PACKAGE_DIR = join(__dirname, '..');
|
|
15
|
+
const SRC_SKILLS = join(PACKAGE_DIR, 'skills');
|
|
16
|
+
const SRC_AGENTS = join(PACKAGE_DIR, 'agents');
|
|
17
|
+
|
|
18
|
+
// ─── Utils ────────────────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
function getDirs(dir) {
|
|
21
|
+
if (!existsSync(dir)) return [];
|
|
22
|
+
return readdirSync(dir).filter(f => statSync(join(dir, f)).isDirectory());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getMdFiles(dir) {
|
|
26
|
+
if (!existsSync(dir)) return [];
|
|
27
|
+
return readdirSync(dir)
|
|
28
|
+
.filter(f => f.endsWith('.md') && statSync(join(dir, f)).isFile())
|
|
29
|
+
.map(f => f.replace('.md', ''));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function copyDir(src, dest) {
|
|
33
|
+
mkdirSync(dest, { recursive: true });
|
|
34
|
+
for (const entry of readdirSync(src)) {
|
|
35
|
+
const s = join(src, entry), d = join(dest, entry);
|
|
36
|
+
statSync(s).isDirectory() ? copyDir(s, d) : copyFileSync(s, d);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resolveTarget(targetArg, isGlobal) {
|
|
41
|
+
if (isGlobal) return join(homedir(), '.claude');
|
|
42
|
+
if (targetArg) return join(targetArg, '.claude');
|
|
43
|
+
return join(process.cwd(), '.claude');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ─── Logger ──────────────────────────────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
const log = {
|
|
49
|
+
title: msg => console.log('\n' + chalk.bold.cyan(msg) + '\n'),
|
|
50
|
+
info: msg => console.log(chalk.blue(' info ') + msg),
|
|
51
|
+
success: msg => console.log(chalk.green(' ✓ ') + msg),
|
|
52
|
+
warn: msg => console.log(chalk.yellow(' warn ') + msg),
|
|
53
|
+
dim: msg => console.log(chalk.dim(' ' + msg)),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// ─── Install Logic ────────────────────────────────────────────────────────────
|
|
57
|
+
|
|
58
|
+
async function runInstall({ target, skills, agents }) {
|
|
59
|
+
const destSkills = join(target, 'skills');
|
|
60
|
+
const destAgents = join(target, 'agents');
|
|
61
|
+
const spinner = ora({ text: 'Installing...', color: 'cyan' }).start();
|
|
62
|
+
let count = 0;
|
|
63
|
+
|
|
64
|
+
for (const skill of skills) {
|
|
65
|
+
spinner.text = `Installing skill ${chalk.cyan(skill)}...`;
|
|
66
|
+
copyDir(join(SRC_SKILLS, skill), join(destSkills, skill));
|
|
67
|
+
count++;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
for (const agent of agents) {
|
|
71
|
+
spinner.text = `Installing agent ${chalk.cyan(agent)}...`;
|
|
72
|
+
const srcDir = join(SRC_AGENTS, agent);
|
|
73
|
+
const srcFile = join(SRC_AGENTS, `${agent}.md`);
|
|
74
|
+
mkdirSync(destAgents, { recursive: true });
|
|
75
|
+
if (existsSync(srcDir) && statSync(srcDir).isDirectory()) {
|
|
76
|
+
copyDir(srcDir, join(destAgents, agent));
|
|
77
|
+
} else if (existsSync(srcFile)) {
|
|
78
|
+
copyFileSync(srcFile, join(destAgents, `${agent}.md`));
|
|
79
|
+
}
|
|
80
|
+
count++;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (count === 0) {
|
|
84
|
+
spinner.warn('Nothing selected to install.');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
spinner.succeed(chalk.bold.green(`Done! ${count} item(s) installed`));
|
|
89
|
+
console.log();
|
|
90
|
+
log.info(`Target: ${chalk.cyan(target)}`);
|
|
91
|
+
log.dim('Restart Claude Code (or run /agents) to pick up the changes.');
|
|
92
|
+
console.log();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ─── Interactive TUI ──────────────────────────────────────────────────────────
|
|
96
|
+
|
|
97
|
+
async function interactiveInstall(options) {
|
|
98
|
+
const { global: isGlobal, all: isAll, skills: skillsFlag, agents: agentsFlag, target: targetArg } = options;
|
|
99
|
+
|
|
100
|
+
log.title('GinStudio Skills Installer');
|
|
101
|
+
|
|
102
|
+
const allSkills = getDirs(SRC_SKILLS);
|
|
103
|
+
const allAgents = [...getDirs(SRC_AGENTS), ...getMdFiles(SRC_AGENTS)]
|
|
104
|
+
.filter((v, i, a) => a.indexOf(v) === i);
|
|
105
|
+
|
|
106
|
+
const target = resolveTarget(targetArg, isGlobal);
|
|
107
|
+
|
|
108
|
+
// ── Shortcut flags ─────────────────────────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
if (isAll || skillsFlag || agentsFlag) {
|
|
111
|
+
let skills = isAll ? allSkills
|
|
112
|
+
: skillsFlag ? skillsFlag.split(',').map(s => s.trim()).filter(s => allSkills.includes(s))
|
|
113
|
+
: allSkills;
|
|
114
|
+
let agents = isAll ? allAgents
|
|
115
|
+
: agentsFlag ? agentsFlag.split(',').map(s => s.trim()).filter(s => allAgents.includes(s))
|
|
116
|
+
: allAgents;
|
|
117
|
+
|
|
118
|
+
log.info(`Target: ${chalk.cyan(target)}`);
|
|
119
|
+
log.info(`Skills (${skills.length}): ${chalk.green(skills.join(', ') || 'none')}`);
|
|
120
|
+
log.info(`Agents (${agents.length}): ${chalk.cyan(agents.join(', ') || 'none')}`);
|
|
121
|
+
console.log();
|
|
122
|
+
return runInstall({ target, skills, agents });
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// ── Full TUI ───────────────────────────────────────────────────────────────
|
|
126
|
+
|
|
127
|
+
log.info(`Target: ${chalk.cyan(target)}\n`);
|
|
128
|
+
|
|
129
|
+
// Cancel gracefully with Ctrl+C
|
|
130
|
+
prompts.override({});
|
|
131
|
+
|
|
132
|
+
const { skills } = await prompts({
|
|
133
|
+
type: 'multiselect',
|
|
134
|
+
name: 'skills',
|
|
135
|
+
message: 'Select skills to install:',
|
|
136
|
+
choices: allSkills.map(s => ({ title: s, value: s, selected: true })),
|
|
137
|
+
hint: 'Space to toggle, A to toggle all, Enter to confirm',
|
|
138
|
+
instructions: false,
|
|
139
|
+
min: 0,
|
|
140
|
+
}, {
|
|
141
|
+
onCancel: () => { log.warn('Cancelled.'); process.exit(0); }
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
console.log();
|
|
145
|
+
|
|
146
|
+
const { agents } = await prompts({
|
|
147
|
+
type: 'multiselect',
|
|
148
|
+
name: 'agents',
|
|
149
|
+
message: 'Select agents to install:',
|
|
150
|
+
choices: allAgents.map(a => ({ title: a, value: a, selected: true })),
|
|
151
|
+
hint: 'Space to toggle, A to toggle all, Enter to confirm',
|
|
152
|
+
instructions: false,
|
|
153
|
+
min: 0,
|
|
154
|
+
}, {
|
|
155
|
+
onCancel: () => { log.warn('Cancelled.'); process.exit(0); }
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
console.log();
|
|
159
|
+
|
|
160
|
+
// Summary + confirm
|
|
161
|
+
console.log(chalk.bold(' Summary'));
|
|
162
|
+
console.log(` ${chalk.green('Skills')} (${skills.length}): ${skills.join(', ') || chalk.dim('none')}`);
|
|
163
|
+
console.log(` ${chalk.cyan('Agents')} (${agents.length}): ${agents.join(', ') || chalk.dim('none')}`);
|
|
164
|
+
console.log(` ${chalk.bold('Target:')} ${target}`);
|
|
165
|
+
console.log();
|
|
166
|
+
|
|
167
|
+
const { ok } = await prompts({
|
|
168
|
+
type: 'confirm',
|
|
169
|
+
name: 'ok',
|
|
170
|
+
message: 'Install?',
|
|
171
|
+
initial: true,
|
|
172
|
+
}, {
|
|
173
|
+
onCancel: () => { log.warn('Cancelled.'); process.exit(0); }
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
if (!ok) { log.warn('Cancelled.'); return; }
|
|
177
|
+
|
|
178
|
+
console.log();
|
|
179
|
+
return runInstall({ target, skills, agents });
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ─── List Command ─────────────────────────────────────────────────────────────
|
|
183
|
+
|
|
184
|
+
function listCommand() {
|
|
185
|
+
log.title('GinStudio Skills & Agents');
|
|
186
|
+
console.log(chalk.bold(' Skills:'));
|
|
187
|
+
getDirs(SRC_SKILLS).forEach(s => console.log(` ${chalk.green('✦')} ${s}`));
|
|
188
|
+
console.log();
|
|
189
|
+
console.log(chalk.bold(' Agents:'));
|
|
190
|
+
const agents = [...getDirs(SRC_AGENTS), ...getMdFiles(SRC_AGENTS)]
|
|
191
|
+
.filter((v, i, a) => a.indexOf(v) === i);
|
|
192
|
+
agents.forEach(a => console.log(` ${chalk.cyan('✦')} ${a}`));
|
|
193
|
+
console.log();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// ─── CLI Setup ────────────────────────────────────────────────────────────────
|
|
197
|
+
|
|
198
|
+
const program = new Command();
|
|
199
|
+
|
|
200
|
+
program
|
|
201
|
+
.name('ginskill-init')
|
|
202
|
+
.description('Install GinStudio skills and agents for Claude Code')
|
|
203
|
+
.version('1.0.0')
|
|
204
|
+
.option('-g, --global', 'Install to ~/.claude/ (all projects)')
|
|
205
|
+
.option('-a, --all', 'Install all without prompts')
|
|
206
|
+
.option('--skills <list>', 'Install specific skills (comma-separated)')
|
|
207
|
+
.option('--agents <list>', 'Install specific agents (comma-separated)')
|
|
208
|
+
.option('-t, --target <path>', 'Custom target project path')
|
|
209
|
+
.argument('[target]', 'Target project path (positional)')
|
|
210
|
+
.action(async (targetArg, opts) => {
|
|
211
|
+
await interactiveInstall({
|
|
212
|
+
global: opts.global,
|
|
213
|
+
all: opts.all,
|
|
214
|
+
skills: opts.skills,
|
|
215
|
+
agents: opts.agents,
|
|
216
|
+
target: opts.target || targetArg || null,
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
program
|
|
221
|
+
.command('list')
|
|
222
|
+
.alias('ls')
|
|
223
|
+
.description('List available skills and agents')
|
|
224
|
+
.action(listCommand);
|
|
225
|
+
|
|
226
|
+
program.parse();
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ginskill-init",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Install GinStudio skills and agents for Claude Code",
|
|
5
|
+
"keywords": ["claude-code", "claude", "skills", "agents", "ai"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ginskill-init": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"chalk": "^5.3.0",
|
|
16
|
+
"commander": "^12.1.0",
|
|
17
|
+
"ora": "^8.1.1",
|
|
18
|
+
"prompts": "^2.4.2"
|
|
19
|
+
}
|
|
20
|
+
}
|