@kurokeita/add-skill 2.6.1 → 3.0.1
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 +43 -64
- package/dist/bin/cli.js +270 -478
- package/dist/skills/statusline-setup/.claude-plugin/plugin.json +1 -1
- package/dist/skills/statusline-setup/SKILL.md +48 -448
- package/dist/skills/statusline-setup/mod/hooks/register.tsx +93 -103
- package/dist/skills/statusline-setup/mod/tests/work.test.ts +28 -10
- package/dist/skills/statusline-setup/mod/types/index.d.ts +2 -1
- package/dist/skills/universalize-agents/reference/mapping.md +3 -2
- package/package.json +3 -3
- package/dist/agents/backend-specialist.md +0 -277
- package/dist/agents/code-archaeologist.md +0 -114
- package/dist/agents/database-architect.md +0 -238
- package/dist/agents/debugger.md +0 -231
- package/dist/agents/devops-engineer.md +0 -242
- package/dist/agents/documentation-writer.md +0 -104
- package/dist/agents/explorer-agent.md +0 -79
- package/dist/agents/frontend-specialist.md +0 -594
- package/dist/agents/game-developer.md +0 -162
- package/dist/agents/mobile-developer.md +0 -383
- package/dist/agents/orchestrator.md +0 -435
- package/dist/agents/penetration-tester.md +0 -188
- package/dist/agents/performance-optimizer.md +0 -191
- package/dist/agents/product-manager.md +0 -122
- package/dist/agents/product-owner.md +0 -106
- package/dist/agents/project-planner.md +0 -408
- package/dist/agents/qa-automation-engineer.md +0 -109
- package/dist/agents/security-auditor.md +0 -171
- package/dist/agents/test-engineer.md +0 -158
- package/dist/skills/agent-identifier/SKILL.md +0 -431
- package/dist/skills/agent-identifier/examples/agent-creation-prompt.md +0 -247
- package/dist/skills/agent-identifier/examples/complete-agent-examples.md +0 -432
- package/dist/skills/agent-identifier/references/agent-creation-system-prompt.md +0 -215
- package/dist/skills/agent-identifier/references/system-prompt-design.md +0 -419
- package/dist/skills/agent-identifier/references/triggering-examples.md +0 -508
- package/dist/skills/agent-identifier/scripts/validate-agent.sh +0 -217
- package/dist/skills/code-review-excellence/SKILL.md +0 -525
- package/dist/skills/component-refactoring/SKILL.md +0 -492
- package/dist/skills/component-refactoring/references/complexity-patterns.md +0 -493
- package/dist/skills/component-refactoring/references/component-splitting.md +0 -477
- package/dist/skills/component-refactoring/references/hook-extraction.md +0 -317
- package/dist/skills/context7-guidelines/SKILL.md +0 -31
- package/dist/skills/feature-design-assistant/SKILL.md +0 -371
- package/dist/skills/find-bugs/SKILL.md +0 -75
- package/dist/skills/frontend-design/SKILL.md +0 -45
- package/dist/skills/go-concurrency-patterns/SKILL.md +0 -657
- package/dist/skills/grill-me/SKILL.md +0 -9
- package/dist/skills/handoff/SKILL.md +0 -16
- package/dist/skills/koreader-plugin-development/SKILL.md +0 -141
- package/dist/skills/koreader-plugin-development/examples/2-example-patch.lua +0 -17
- package/dist/skills/koreader-plugin-development/examples/_meta.lua +0 -6
- package/dist/skills/koreader-plugin-development/examples/helloworld.lua +0 -36
- package/dist/skills/koreader-plugin-development/references/debugging.md +0 -92
- package/dist/skills/koreader-plugin-development/references/events-and-widgets.md +0 -102
- package/dist/skills/koreader-plugin-development/references/patches.md +0 -118
- package/dist/skills/koreader-plugin-development/references/plugin-anatomy.md +0 -97
- package/dist/skills/make-instruction/SKILL.md +0 -68
- package/dist/skills/make-prompt/SKILL.md +0 -70
- package/dist/skills/make-skill/SKILL.md +0 -147
- package/dist/skills/prd-to-tasks/SKILL.md +0 -164
- package/dist/skills/react-native-async-patterns/SKILL.md +0 -256
- package/dist/skills/react-native-performance/SKILL.md +0 -425
- package/dist/skills/react-native-testing/SKILL.md +0 -458
- package/dist/skills/react-native-zustand-patterns/SKILL.md +0 -343
- package/dist/skills/skill-creator/SKILL.md +0 -385
- package/dist/skills/skill-creator/scripts/init_skill.cjs +0 -235
- package/dist/skills/skill-creator/scripts/package_skill.cjs +0 -84
- package/dist/skills/skill-creator/scripts/validate_skill.cjs +0 -127
- package/dist/skills/skill-development/SKILL.md +0 -676
- package/dist/skills/skill-development/references/skill-creator-original.md +0 -210
- package/dist/skills/sql-optimization-patterns/SKILL.md +0 -509
- package/dist/skills/test-driven-development/SKILL.md +0 -114
- package/dist/skills/test-driven-development/deep-modules.md +0 -33
- package/dist/skills/test-driven-development/interface-design.md +0 -35
- package/dist/skills/test-driven-development/mocking.md +0 -68
- package/dist/skills/test-driven-development/refactoring.md +0 -10
- package/dist/skills/test-driven-development/tests.md +0 -61
- package/dist/skills/vercel-react-best-practices/AGENTS.md +0 -2410
- package/dist/skills/vercel-react-best-practices/SKILL.md +0 -127
- package/dist/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/dist/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -49
- package/dist/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
- package/dist/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -80
- package/dist/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -36
- package/dist/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
- package/dist/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/dist/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/dist/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
- package/dist/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/dist/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/dist/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
- package/dist/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
- package/dist/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/dist/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/dist/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
- package/dist/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -82
- package/dist/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
- package/dist/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
- package/dist/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
- package/dist/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
- package/dist/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
- package/dist/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/dist/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
- package/dist/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -50
- package/dist/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
- package/dist/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/dist/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/dist/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
- package/dist/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/dist/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/dist/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/dist/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/dist/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/dist/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/dist/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/dist/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
- package/dist/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
- package/dist/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/dist/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/dist/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
- package/dist/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
- package/dist/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/dist/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
- package/dist/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
- package/dist/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/dist/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
- package/dist/skills/web-design-guidelines/SKILL.md +0 -40
- package/dist/skills/workflow-patterns/SKILL.md +0 -623
- package/dist/skills/write-prd/SKILL.md +0 -162
- package/dist/workflows/brainstorm.md +0 -113
- package/dist/workflows/create.md +0 -60
- package/dist/workflows/debug.md +0 -107
- package/dist/workflows/deploy.md +0 -178
- package/dist/workflows/enhance.md +0 -64
- package/dist/workflows/github-pull-request-create.md +0 -134
- package/dist/workflows/orchestrate.md +0 -246
- package/dist/workflows/plan.md +0 -90
- package/dist/workflows/preview.md +0 -83
- package/dist/workflows/status.md +0 -87
- package/dist/workflows/test.md +0 -144
- package/dist/workflows/ui-ux-pro-max.md +0 -315
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: make-instruction
|
|
3
|
-
description: Generates custom Copilot instruction files (.instructions.md) following official best practices. Use when you need to standardize code generation, reviews, or documentation for specific domains or file types.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Make Instruction
|
|
7
|
-
|
|
8
|
-
This skill helps you generate custom instruction files for GitHub Copilot (`.github/instructions/*.instructions.md`) following the official "awesome-copilot" best practices.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Use this skill when you want to:
|
|
13
|
-
|
|
14
|
-
- Create a reusable prompt or context for Copilot.
|
|
15
|
-
- Standardize code generation for a specific language, framework, or library.
|
|
16
|
-
- Define code review guidelines for specific file types.
|
|
17
|
-
- Ensure consistent documentation styles.
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
1. **Identify the Need**: Determine what domain or specific task you need instructions for (e.g., "React Components", "Python Testing", "API Documentation").
|
|
22
|
-
2. **Define Scope**: Decide which files these instructions should apply to (e.g., `**/*.tsx`, `tests/*.py`).
|
|
23
|
-
3. **Generate Content**: using the template below, the agent will help you draft the content.
|
|
24
|
-
|
|
25
|
-
## Template
|
|
26
|
-
|
|
27
|
-
The generated file should look like this:
|
|
28
|
-
|
|
29
|
-
```markdown
|
|
30
|
-
---
|
|
31
|
-
description: 'Brief description of the instruction purpose and scope'
|
|
32
|
-
applyTo: 'glob pattern (e.g., **/*.ts)'
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
# [Title: e.g., React Component Guidelines]
|
|
36
|
-
|
|
37
|
-
[Brief introduction explaining the purpose and scope]
|
|
38
|
-
|
|
39
|
-
## General Instructions
|
|
40
|
-
[High-level guidelines and principles]
|
|
41
|
-
|
|
42
|
-
## Best Practices
|
|
43
|
-
- [Be Specific]
|
|
44
|
-
- [Show Why]
|
|
45
|
-
|
|
46
|
-
## Code Standards
|
|
47
|
-
[Naming conventions, formatting, style rules]
|
|
48
|
-
|
|
49
|
-
## Examples
|
|
50
|
-
|
|
51
|
-
### Good Example
|
|
52
|
-
\`\`\`language
|
|
53
|
-
// Recommended approach
|
|
54
|
-
code example here
|
|
55
|
-
\`\`\`
|
|
56
|
-
|
|
57
|
-
### Bad Example
|
|
58
|
-
\`\`\`language
|
|
59
|
-
// Avoid this pattern
|
|
60
|
-
code example here
|
|
61
|
-
\`\`\`
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Tips for Success
|
|
65
|
-
|
|
66
|
-
- **Be Specific**: Copilot works best with concrete examples.
|
|
67
|
-
- **Use "applyTo" Correctly**: Ensure the glob pattern hits the right files.
|
|
68
|
-
- **Keep it Updated**: As your project evolves, update these instructions.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: make-prompt
|
|
3
|
-
description: Generates custom Copilot prompt files (.prompt.md) following official best practices. Use when you need to create structured, reusable prompts for complex tasks, code generation, or architectural planning.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Make Prompt
|
|
7
|
-
|
|
8
|
-
This skill helps you generate custom prompt files (`.prompt.md`) for GitHub Copilot following the official "awesome-copilot" best practices and the "Professional Prompt Builder" guide.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Use this skill when you want to:
|
|
13
|
-
|
|
14
|
-
- Create structured, reusable prompts for complex tasks.
|
|
15
|
-
- Define a specific persona or expertise level for Copilot.
|
|
16
|
-
- Create blueprints, implementation plans, or specifications.
|
|
17
|
-
- Ensure consistent output formats for code generation or analysis.
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
1. **Discovery**: Identify the Identity, Persona, Task, Context, Instructions, Output, Tools, and Validation criteria.
|
|
22
|
-
2. **Generate**: Create the `.prompt.md` file using the template below.
|
|
23
|
-
|
|
24
|
-
## Template
|
|
25
|
-
|
|
26
|
-
The generated file should look like this:
|
|
27
|
-
|
|
28
|
-
```markdown
|
|
29
|
-
---
|
|
30
|
-
description: "[Clear, concise description from requirements]"
|
|
31
|
-
agent: "[agent|ask|edit based on task type]"
|
|
32
|
-
tools: ["[appropriate tools based on functionality]"]
|
|
33
|
-
model: "[only if specific model required]"
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
# [Prompt Title]
|
|
37
|
-
|
|
38
|
-
[Persona definition - specific role and expertise]
|
|
39
|
-
Example: "You are a senior .NET architect with 10+ years of experience..."
|
|
40
|
-
|
|
41
|
-
## [Task Section]
|
|
42
|
-
[Clear task description with specific requirements]
|
|
43
|
-
|
|
44
|
-
## [Instructions Section]
|
|
45
|
-
[Step-by-step instructions following established patterns]
|
|
46
|
-
|
|
47
|
-
## [Context/Input Section]
|
|
48
|
-
[Variable usage and context requirements]
|
|
49
|
-
Example: "Uses \${selection} and \${file}"
|
|
50
|
-
|
|
51
|
-
## [Output Section]
|
|
52
|
-
[Expected output format and structure]
|
|
53
|
-
|
|
54
|
-
## [Quality/Validation Section]
|
|
55
|
-
[Success criteria and validation steps]
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Checklist for Quality
|
|
59
|
-
|
|
60
|
-
- ✅ **Clear Structure**: Logical flow.
|
|
61
|
-
- ✅ **Specific Instructions**: Actionable directions.
|
|
62
|
-
- ✅ **Proper Context**: All necessary info is included.
|
|
63
|
-
- ✅ **Tool Integration**: Correct tools selected.
|
|
64
|
-
- ✅ **Error Handling**: Guidance for edge cases.
|
|
65
|
-
|
|
66
|
-
## Tools Reference
|
|
67
|
-
|
|
68
|
-
- **File Operations**: `codebase`, `editFiles`, `search`, `problems`
|
|
69
|
-
- **Execution**: `runCommands`, `runTasks`, `runTests`, `terminalLastCommand`
|
|
70
|
-
- **External**: `fetch`, `githubRepo`, `openSimpleBrowser`
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: make-skill
|
|
3
|
-
description: 'Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Make Skill
|
|
7
|
-
|
|
8
|
-
A meta-skill for creating new Agent Skills. Use this skill when you need to scaffold a new skill folder, generate a SKILL.md file, or help users understand the Agent Skills specification.
|
|
9
|
-
|
|
10
|
-
## When to Use This Skill
|
|
11
|
-
|
|
12
|
-
- User asks to "create a skill", "make a new skill", or "scaffold a skill"
|
|
13
|
-
- User wants to add a specialized capability to their GitHub Copilot setup
|
|
14
|
-
- User needs help structuring a skill with bundled resources
|
|
15
|
-
- User wants to duplicate this template as a starting point
|
|
16
|
-
|
|
17
|
-
## Prerequisites
|
|
18
|
-
|
|
19
|
-
- Understanding of what the skill should accomplish
|
|
20
|
-
- A clear, keyword-rich description of capabilities and triggers
|
|
21
|
-
- Knowledge of any bundled resources needed (scripts, references, assets, templates)
|
|
22
|
-
|
|
23
|
-
## Creating a New Skill
|
|
24
|
-
|
|
25
|
-
### Step 1: Create the Skill Directory
|
|
26
|
-
|
|
27
|
-
Create a new folder with a lowercase, hyphenated name:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
skills/<skill-name>/
|
|
31
|
-
└── SKILL.md # Required
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Step 2: Generate SKILL.md with Frontmatter
|
|
35
|
-
|
|
36
|
-
Every skill requires YAML frontmatter with `name` and `description`:
|
|
37
|
-
|
|
38
|
-
```yaml
|
|
39
|
-
---
|
|
40
|
-
name: <skill-name>
|
|
41
|
-
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
|
|
42
|
-
---
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
#### Frontmatter Field Requirements
|
|
46
|
-
|
|
47
|
-
| Field | Required | Constraints |
|
|
48
|
-
|-------|----------|-------------|
|
|
49
|
-
| `name` | **Yes** | 1-64 chars, lowercase letters/numbers/hyphens only, must match folder name |
|
|
50
|
-
| `description` | **Yes** | 1-1024 chars, must describe WHAT it does AND WHEN to use it |
|
|
51
|
-
| `license` | No | License name or reference to bundled LICENSE.txt |
|
|
52
|
-
| `compatibility` | No | 1-500 chars, environment requirements if needed |
|
|
53
|
-
| `metadata` | No | Key-value pairs for additional properties |
|
|
54
|
-
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental) |
|
|
55
|
-
|
|
56
|
-
#### Description Best Practices
|
|
57
|
-
|
|
58
|
-
**CRITICAL**: The `description` is the PRIMARY mechanism for automatic skill discovery. Include:
|
|
59
|
-
|
|
60
|
-
1. **WHAT** the skill does (capabilities)
|
|
61
|
-
2. **WHEN** to use it (triggers, scenarios, file types)
|
|
62
|
-
3. **Keywords** users might mention in prompts
|
|
63
|
-
|
|
64
|
-
**Good example:**
|
|
65
|
-
|
|
66
|
-
```yaml
|
|
67
|
-
description: 'Toolkit for testing local web applications using Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or view browser console logs. Supports Chrome, Firefox, and WebKit.'
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Poor example:**
|
|
71
|
-
|
|
72
|
-
```yaml
|
|
73
|
-
description: 'Web testing helpers'
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Step 3: Write the Skill Body
|
|
77
|
-
|
|
78
|
-
After the frontmatter, add markdown instructions. Recommended sections:
|
|
79
|
-
|
|
80
|
-
| Section | Purpose |
|
|
81
|
-
|---------|---------|
|
|
82
|
-
| `# Title` | Brief overview |
|
|
83
|
-
| `## When to Use This Skill` | Reinforces description triggers |
|
|
84
|
-
| `## Prerequisites` | Required tools, dependencies |
|
|
85
|
-
| `## Step-by-Step Workflows` | Numbered steps for tasks |
|
|
86
|
-
| `## Troubleshooting` | Common issues and solutions |
|
|
87
|
-
| `## References` | Links to bundled docs |
|
|
88
|
-
|
|
89
|
-
### Step 4: Add Optional Directories (If Needed)
|
|
90
|
-
|
|
91
|
-
| Folder | Purpose | When to Use |
|
|
92
|
-
|--------|---------|-------------|
|
|
93
|
-
| `scripts/` | Executable code (Python, Bash, JS) | Automation that performs operations |
|
|
94
|
-
| `references/` | Documentation agent reads | API references, schemas, guides |
|
|
95
|
-
| `assets/` | Static files used AS-IS | Images, fonts, templates |
|
|
96
|
-
| `templates/` | Starter code agent modifies | Scaffolds to extend |
|
|
97
|
-
|
|
98
|
-
## Example: Complete Skill Structure
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
my-awesome-skill/
|
|
102
|
-
├── SKILL.md # Required instructions
|
|
103
|
-
├── LICENSE.txt # Optional license file
|
|
104
|
-
├── scripts/
|
|
105
|
-
│ └── helper.py # Executable automation
|
|
106
|
-
├── references/
|
|
107
|
-
│ ├── api-reference.md # Detailed docs
|
|
108
|
-
│ └── examples.md # Usage examples
|
|
109
|
-
├── assets/
|
|
110
|
-
│ └── diagram.png # Static resources
|
|
111
|
-
└── templates/
|
|
112
|
-
└── starter.ts # Code scaffold
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Quick Start: Duplicate This Template
|
|
116
|
-
|
|
117
|
-
1. Copy the `make-skill-template/` folder
|
|
118
|
-
2. Rename to your skill name (lowercase, hyphens)
|
|
119
|
-
3. Update `SKILL.md`:
|
|
120
|
-
- Change `name:` to match folder name
|
|
121
|
-
- Write a keyword-rich `description:`
|
|
122
|
-
- Replace body content with your instructions
|
|
123
|
-
4. Add bundled resources as needed
|
|
124
|
-
5. Validate with `npm run skill:validate`
|
|
125
|
-
|
|
126
|
-
## Validation Checklist
|
|
127
|
-
|
|
128
|
-
- [ ] Folder name is lowercase with hyphens
|
|
129
|
-
- [ ] `name` field matches folder name exactly
|
|
130
|
-
- [ ] `description` is 10-1024 characters
|
|
131
|
-
- [ ] `description` explains WHAT and WHEN
|
|
132
|
-
- [ ] `description` is wrapped in single quotes
|
|
133
|
-
- [ ] Body content is under 500 lines
|
|
134
|
-
- [ ] Bundled assets are under 5MB each
|
|
135
|
-
|
|
136
|
-
## Troubleshooting
|
|
137
|
-
|
|
138
|
-
| Issue | Solution |
|
|
139
|
-
|-------|----------|
|
|
140
|
-
| Skill not discovered | Improve description with more keywords and triggers |
|
|
141
|
-
| Validation fails on name | Ensure lowercase, no consecutive hyphens, matches folder |
|
|
142
|
-
| Description too short | Add capabilities, triggers, and keywords |
|
|
143
|
-
| Assets not found | Use relative paths from skill root |
|
|
144
|
-
|
|
145
|
-
## References
|
|
146
|
-
|
|
147
|
-
- Agent Skills official spec: <https://agentskills.io/specification>
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prd-to-tasks
|
|
3
|
-
description: >
|
|
4
|
-
Break a local PRD into independently grabbable implementation tasks using vertical slices, then save them under
|
|
5
|
-
.prd/{prd-name}/tasks/ in the current workspace. Use when the user wants to convert a PRD to tasks, break a spec
|
|
6
|
-
into actionable work, slice a PRD, or create implementation tasks from a local planning document. Do NOT trigger
|
|
7
|
-
for: writing PRDs, reviewing PRDs without task creation, or remote work item management systems.
|
|
8
|
-
argument-hint: "[prd-name]"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# PRD to Tasks
|
|
12
|
-
|
|
13
|
-
Break a local PRD into independently grabbable implementation tasks using vertical slices.
|
|
14
|
-
|
|
15
|
-
Input location:
|
|
16
|
-
|
|
17
|
-
- PRD directory: `.prd/{prd-name}/`
|
|
18
|
-
- Source PRD: `.prd/{prd-name}/prd.md`
|
|
19
|
-
|
|
20
|
-
Output location:
|
|
21
|
-
|
|
22
|
-
- Tasks directory: `.prd/{prd-name}/tasks/`
|
|
23
|
-
- Optional index: `.prd/{prd-name}/tasks/README.md`
|
|
24
|
-
|
|
25
|
-
`{prd-name}` should be a filesystem-safe kebab-case slug. If the user provides a title instead, normalize it to a slug
|
|
26
|
-
and state the slug you used.
|
|
27
|
-
|
|
28
|
-
## Step 1: Locate the PRD
|
|
29
|
-
|
|
30
|
-
If the user provided `$ARGUMENTS`, treat that as the PRD name and normalize it.
|
|
31
|
-
|
|
32
|
-
If not, ask which PRD directory to use.
|
|
33
|
-
|
|
34
|
-
Then:
|
|
35
|
-
|
|
36
|
-
1. Confirm `.prd/{prd-name}/prd.md` exists
|
|
37
|
-
2. Read it fully
|
|
38
|
-
3. Check whether `.prd/{prd-name}/tasks/` already exists
|
|
39
|
-
4. If task files already exist, summarize them and ask whether to overwrite, append, or regenerate selectively
|
|
40
|
-
|
|
41
|
-
If the PRD does not exist, stop and tell the user exactly which path is missing.
|
|
42
|
-
|
|
43
|
-
## Step 2: Explore the codebase
|
|
44
|
-
|
|
45
|
-
If you have not already explored the relevant code in this conversation, do so now:
|
|
46
|
-
|
|
47
|
-
1. Read top-level architecture guidance if present
|
|
48
|
-
2. Search for code related to the PRD concepts
|
|
49
|
-
3. Read nearby guidance files for affected subsystems
|
|
50
|
-
4. Look for similar features and test patterns
|
|
51
|
-
|
|
52
|
-
The PRD tells you *what* to build. The codebase tells you enough about *where* and *how* to create useful tasks.
|
|
53
|
-
|
|
54
|
-
## Step 3: Draft vertical slices
|
|
55
|
-
|
|
56
|
-
Break the PRD into **tracer bullet** tasks.
|
|
57
|
-
|
|
58
|
-
### What is a tracer bullet?
|
|
59
|
-
|
|
60
|
-
A tracer bullet is a thin vertical slice through the whole feature path. It proves that the relevant layers connect
|
|
61
|
-
correctly end to end. It is not a horizontal "build all backend first, then all UI" slice.
|
|
62
|
-
|
|
63
|
-
Prefer slices that are:
|
|
64
|
-
|
|
65
|
-
- Independently verifiable
|
|
66
|
-
- Demoable on their own
|
|
67
|
-
- Thin and end to end
|
|
68
|
-
- Ordered by dependency
|
|
69
|
-
|
|
70
|
-
### HITL vs AFK
|
|
71
|
-
|
|
72
|
-
Each slice should be marked:
|
|
73
|
-
|
|
74
|
-
- `HITL`: needs human input, review, testing on real devices, design signoff, or external coordination
|
|
75
|
-
- `AFK`: can be implemented and validated without waiting on a person
|
|
76
|
-
|
|
77
|
-
### Vertical slice rules
|
|
78
|
-
|
|
79
|
-
- Each slice should deliver a complete behavior, not one technical layer
|
|
80
|
-
- Prefer many thin slices over a few broad ones
|
|
81
|
-
- Use the PRD's module design to inform slicing, but do not create one task per module
|
|
82
|
-
- Order slices so blockers come first
|
|
83
|
-
|
|
84
|
-
## Step 4: Quiz the user
|
|
85
|
-
|
|
86
|
-
Present the proposed slices as a numbered list. For each slice, include:
|
|
87
|
-
|
|
88
|
-
- Title
|
|
89
|
-
- Type: `HITL` or `AFK`
|
|
90
|
-
- Blocked by
|
|
91
|
-
- User stories covered
|
|
92
|
-
|
|
93
|
-
Ask the user whether:
|
|
94
|
-
|
|
95
|
-
- The granularity is right
|
|
96
|
-
- The dependencies are correct
|
|
97
|
-
- Any slices should be merged or split
|
|
98
|
-
- The `HITL` versus `AFK` labels are accurate
|
|
99
|
-
|
|
100
|
-
Iterate until approved.
|
|
101
|
-
|
|
102
|
-
## Step 5: Write task files
|
|
103
|
-
|
|
104
|
-
Only write files after the user approves the breakdown.
|
|
105
|
-
|
|
106
|
-
Create `.prd/{prd-name}/tasks/` if needed.
|
|
107
|
-
|
|
108
|
-
Create one Markdown file per task using zero-padded numeric prefixes:
|
|
109
|
-
|
|
110
|
-
- `.prd/{prd-name}/tasks/01-{task-slug}.md`
|
|
111
|
-
- `.prd/{prd-name}/tasks/02-{task-slug}.md`
|
|
112
|
-
|
|
113
|
-
`{task-slug}` should be kebab-case and derived from the task title.
|
|
114
|
-
|
|
115
|
-
Each task file should use this structure:
|
|
116
|
-
|
|
117
|
-
```md
|
|
118
|
-
# {Task title}
|
|
119
|
-
|
|
120
|
-
- Type: AFK | HITL
|
|
121
|
-
- Status: Proposed
|
|
122
|
-
- Blocked by: None | 01-other-task
|
|
123
|
-
- Source PRD: ../prd.md
|
|
124
|
-
|
|
125
|
-
## What to Build
|
|
126
|
-
|
|
127
|
-
Concise description of the vertical slice. Describe end-to-end behavior, not a layer-by-layer checklist.
|
|
128
|
-
|
|
129
|
-
## Acceptance Criteria
|
|
130
|
-
|
|
131
|
-
- [ ] Criterion 1
|
|
132
|
-
- [ ] Criterion 2
|
|
133
|
-
- [ ] Criterion 3
|
|
134
|
-
|
|
135
|
-
## User Stories Addressed
|
|
136
|
-
|
|
137
|
-
- User story 3
|
|
138
|
-
- User story 7
|
|
139
|
-
|
|
140
|
-
## Notes
|
|
141
|
-
|
|
142
|
-
- Optional implementation hints grounded in the current codebase
|
|
143
|
-
- Reference relevant modules or concepts, but avoid binding the task to fragile file-level details unless necessary
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Also create or update `.prd/{prd-name}/tasks/README.md` with:
|
|
147
|
-
|
|
148
|
-
- The PRD title
|
|
149
|
-
- The approved slice list in dependency order
|
|
150
|
-
- A short summary of each task
|
|
151
|
-
|
|
152
|
-
## Important constraints
|
|
153
|
-
|
|
154
|
-
- Do not modify `prd.md` unless the user asks
|
|
155
|
-
- Do not delete existing task files unless the user explicitly approves replacement
|
|
156
|
-
- If existing tasks overlap the proposed slices, call that out before writing duplicates
|
|
157
|
-
|
|
158
|
-
## After writing
|
|
159
|
-
|
|
160
|
-
Summarize:
|
|
161
|
-
|
|
162
|
-
- The PRD slug used
|
|
163
|
-
- The task files created or updated
|
|
164
|
-
- Any existing task files that were preserved
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: react-native-async-patterns
|
|
3
|
-
description: Async/await correctness in React Native with Zustand. Use when debugging race conditions, missing awaits, floating promises, or async timing issues in Expo/React Native apps.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# React Native Async Patterns
|
|
7
|
-
|
|
8
|
-
## Problem Statement
|
|
9
|
-
|
|
10
|
-
Async bugs in React Native are insidious because they often work in development but fail under load or on slower devices. The most common issues: missing `await` on async functions, race conditions between state updates, and assuming operations complete in order.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Pattern: Floating Promise Detection
|
|
15
|
-
|
|
16
|
-
**Problem:** Calling an async function without `await` causes it to run in the background. If subsequent code depends on its completion, you get a race condition.
|
|
17
|
-
|
|
18
|
-
**Example (from retake bug):**
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
// Before (buggy) - enableSkillAreaRetake is async but not awaited
|
|
22
|
-
enableSkillAreaRetake(skillArea); // Fire and forget ❌
|
|
23
|
-
await clearSkillAreaAnswers(skillArea); // Runs before enable completes
|
|
24
|
-
|
|
25
|
-
// After (fixed)
|
|
26
|
-
await enableSkillAreaRetake(skillArea); // Wait for state update ✅
|
|
27
|
-
await clearSkillAreaAnswers(skillArea); // Now runs in correct order
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Why it's subtle:** Both functions might have `async` in their signature, but only one was awaited. The code "looks right" at a glance.
|
|
31
|
-
|
|
32
|
-
**Detection:**
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Find potential floating promises - async calls without await
|
|
36
|
-
grep -rn "^\s*[a-zA-Z]*\s*(" --include="*.ts" --include="*.tsx" | \
|
|
37
|
-
grep -v "await\|return\|const\|let\|if\|else\|=>"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Prevention:**
|
|
41
|
-
|
|
42
|
-
1. ESLint rule `@typescript-eslint/no-floating-promises` - catches this at lint time
|
|
43
|
-
2. Code review trigger: Any line calling a function that might be async without `await`, `return`, or assignment
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Pattern: Post-Condition Validation
|
|
48
|
-
|
|
49
|
-
**Problem:** Assuming an async call succeeded without verifying. The call might return early, throw silently, or fail to update state.
|
|
50
|
-
|
|
51
|
-
**Example (from retake bug):**
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
// Before (buggy) - assumed load worked
|
|
55
|
-
await loadCompletedAssessmentAnswers(id);
|
|
56
|
-
// Proceeded blindly with retake flow...
|
|
57
|
-
|
|
58
|
-
// After (defensive)
|
|
59
|
-
await loadCompletedAssessmentAnswers(id);
|
|
60
|
-
const loaded = useAssessmentStore.getState().completedAssessmentAnswers;
|
|
61
|
-
if (Object.keys(loaded).length === 0) {
|
|
62
|
-
throw new Error(
|
|
63
|
-
`Failed to load answers for assessment ${id} - cannot proceed with retake`
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**Principle:** Treat every async call as potentially failed until proven otherwise.
|
|
69
|
-
|
|
70
|
-
**When to validate:**
|
|
71
|
-
|
|
72
|
-
- After loading data that subsequent operations depend on
|
|
73
|
-
- After state updates that must complete before continuing
|
|
74
|
-
- Before irreversible operations (submissions, deletions)
|
|
75
|
-
|
|
76
|
-
**Pattern template:**
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
await someAsyncOperation();
|
|
80
|
-
const result = getRelevantState();
|
|
81
|
-
if (!isValid(result)) {
|
|
82
|
-
throw new Error(`[${functionName}] Post-condition failed: ${diagnosticContext}`);
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Pattern: Async Function Identification
|
|
89
|
-
|
|
90
|
-
**Problem:** Not all async functions look async. Zustand actions, callbacks, and promise-returning functions may not have obvious `async` keywords.
|
|
91
|
-
|
|
92
|
-
**Hidden async patterns:**
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
// Obvious async
|
|
96
|
-
async function fetchData() { ... }
|
|
97
|
-
|
|
98
|
-
// Less obvious - returns Promise
|
|
99
|
-
function fetchData(): Promise<Data> { ... }
|
|
100
|
-
|
|
101
|
-
// Hidden - Zustand action that's actually async
|
|
102
|
-
const useStore = create((set, get) => ({
|
|
103
|
-
// This looks sync but calls async internally
|
|
104
|
-
enableRetake: (area: string) => {
|
|
105
|
-
someAsyncSetup().then(() => { // ← Hidden async!
|
|
106
|
-
set({ retakeAreas: [...get().retakeAreas, area] });
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
}));
|
|
110
|
-
|
|
111
|
-
// Proper async Zustand action
|
|
112
|
-
const useStore = create((set, get) => ({
|
|
113
|
-
enableRetake: async (area: string) => {
|
|
114
|
-
await someAsyncSetup();
|
|
115
|
-
set({ retakeAreas: [...get().retakeAreas, area] });
|
|
116
|
-
},
|
|
117
|
-
}));
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**Detection:** Check function signatures and implementations:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Find functions returning Promise
|
|
124
|
-
grep -rn "): Promise<" --include="*.ts" --include="*.tsx"
|
|
125
|
-
|
|
126
|
-
# Find .then() chains that might need await
|
|
127
|
-
grep -rn "\.then(" --include="*.ts" --include="*.tsx"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Pattern: Sequential vs Parallel Async
|
|
133
|
-
|
|
134
|
-
**Problem:** Running async operations sequentially when they could be parallel (slow), or parallel when they must be sequential (race condition).
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
// Sequential - correct when order matters
|
|
138
|
-
await enableSkillAreaRetake(skillArea);
|
|
139
|
-
await clearSkillAreaAnswers(skillArea);
|
|
140
|
-
await loadRetakeQuestions(skillArea);
|
|
141
|
-
|
|
142
|
-
// Parallel - correct when operations are independent
|
|
143
|
-
const [user, settings, history] = await Promise.all([
|
|
144
|
-
fetchUser(id),
|
|
145
|
-
fetchSettings(id),
|
|
146
|
-
fetchHistory(id),
|
|
147
|
-
]);
|
|
148
|
-
|
|
149
|
-
// WRONG - parallel when order matters
|
|
150
|
-
await Promise.all([
|
|
151
|
-
enableSkillAreaRetake(skillArea), // These have dependencies!
|
|
152
|
-
clearSkillAreaAnswers(skillArea),
|
|
153
|
-
]);
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Decision framework:**
|
|
157
|
-
|
|
158
|
-
| Operations share state? | Must run in order? | Pattern |
|
|
159
|
-
| ------------------------ | ------------------- | --------- |
|
|
160
|
-
| No | No | `Promise.all()` |
|
|
161
|
-
| Yes | Yes | Sequential `await` |
|
|
162
|
-
| Yes | No | Usually sequential to be safe |
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Pattern: Async in useEffect
|
|
167
|
-
|
|
168
|
-
**Problem:** `useEffect` callbacks can't be async directly. Common mistakes with cleanup and race conditions.
|
|
169
|
-
|
|
170
|
-
```typescript
|
|
171
|
-
// WRONG - useEffect can't be async
|
|
172
|
-
useEffect(async () => {
|
|
173
|
-
const data = await fetchData();
|
|
174
|
-
setData(data);
|
|
175
|
-
}, []);
|
|
176
|
-
|
|
177
|
-
// CORRECT - async function inside
|
|
178
|
-
useEffect(() => {
|
|
179
|
-
async function load() {
|
|
180
|
-
const data = await fetchData();
|
|
181
|
-
setData(data);
|
|
182
|
-
}
|
|
183
|
-
load();
|
|
184
|
-
}, []);
|
|
185
|
-
|
|
186
|
-
// BETTER - with cleanup for race conditions
|
|
187
|
-
useEffect(() => {
|
|
188
|
-
let cancelled = false;
|
|
189
|
-
|
|
190
|
-
async function load() {
|
|
191
|
-
const data = await fetchData();
|
|
192
|
-
if (!cancelled) {
|
|
193
|
-
setData(data);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
load();
|
|
197
|
-
|
|
198
|
-
return () => {
|
|
199
|
-
cancelled = true;
|
|
200
|
-
};
|
|
201
|
-
}, [dependency]);
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## ESLint Configuration
|
|
207
|
-
|
|
208
|
-
Apply config from `configs/eslint-async.json` to catch these issues at lint time:
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"rules": {
|
|
213
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
214
|
-
"@typescript-eslint/require-await": "warn",
|
|
215
|
-
"@typescript-eslint/await-thenable": "error",
|
|
216
|
-
"@typescript-eslint/no-misused-promises": "error"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Required:** `@typescript-eslint/eslint-plugin` and proper TypeScript configuration.
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Code Review Checklist
|
|
226
|
-
|
|
227
|
-
When reviewing async code, check:
|
|
228
|
-
|
|
229
|
-
- [ ] Every async function call is either `await`ed, `return`ed, or explicitly fire-and-forget with comment
|
|
230
|
-
- [ ] Operations that depend on each other are sequenced with `await`
|
|
231
|
-
- [ ] Post-conditions validated after critical async operations
|
|
232
|
-
- [ ] `useEffect` with async uses the inner function pattern
|
|
233
|
-
- [ ] Race conditions considered when component could unmount during async
|
|
234
|
-
- [ ] Error handling exists for async failures
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## Quick Debugging
|
|
239
|
-
|
|
240
|
-
When async timing issues occur:
|
|
241
|
-
|
|
242
|
-
```typescript
|
|
243
|
-
// Add timestamps to trace execution order
|
|
244
|
-
console.log(`[${Date.now()}] Starting enableRetake`);
|
|
245
|
-
await enableSkillAreaRetake(skillArea);
|
|
246
|
-
console.log(`[${Date.now()}] Finished enableRetake`);
|
|
247
|
-
console.log(`[${Date.now()}] Starting clearAnswers`);
|
|
248
|
-
await clearSkillAreaAnswers(skillArea);
|
|
249
|
-
console.log(`[${Date.now()}] Finished clearAnswers`);
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
Look for:
|
|
253
|
-
|
|
254
|
-
- Operations finishing out of expected order
|
|
255
|
-
- Operations starting before previous ones complete
|
|
256
|
-
- Suspiciously fast "completions" (might not have awaited)
|