cc-codeconductor 0.2.9 → 0.3.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 +105 -25
- package/dist/index.js +662 -291
- package/package.json +1 -1
- package/presets/agy/AGENTS.md +365 -0
- package/presets/agy/README.md +47 -0
- package/presets/agy/hooks.json +30 -0
- package/presets/agy/mcp_config.json +3 -0
- package/presets/agy/rules/commit-style.md +1 -0
- package/presets/agy/rules/graphify.md +14 -0
- package/presets/agy/scripts/post-tool.sh +25 -0
- package/presets/agy/scripts/pre-tool.sh +56 -0
- package/presets/agy/settings.json +8 -0
- package/presets/agy/skills/cc-api-contract/SKILL.md +71 -0
- package/presets/agy/skills/cc-db-migration/SKILL.md +70 -0
- package/presets/agy/skills/cc-feature/SKILL.md +115 -0
- package/presets/agy/skills/cc-fix/SKILL.md +124 -0
- package/presets/agy/skills/cc-pagespeed/SKILL.md +101 -0
- package/presets/agy/skills/cc-refactor/SKILL.md +149 -0
- package/presets/agy/skills/cc-review/SKILL.md +142 -0
- package/presets/agy/skills/cc-tdd-cycle/SKILL.md +226 -0
- package/presets/agy/skills/cc-test-plan/SKILL.md +145 -0
- package/presets/agy/skills/commit/SKILL.md +5 -0
- package/presets/agy/workflows/cc-api-contract.md +71 -0
- package/presets/agy/workflows/cc-db-migration.md +70 -0
- package/presets/agy/workflows/cc-feature.md +115 -0
- package/presets/agy/workflows/cc-fix.md +124 -0
- package/presets/agy/workflows/cc-pagespeed.md +101 -0
- package/presets/agy/workflows/cc-refactor.md +149 -0
- package/presets/agy/workflows/cc-review.md +142 -0
- package/presets/agy/workflows/cc-tdd-cycle.md +226 -0
- package/presets/agy/workflows/cc-test-plan.md +145 -0
- package/presets/agy/workflows/commit.md +1 -0
- package/presets/claude/CLAUDE.md +47 -3
- package/presets/claude/claude.json +6 -0
- package/presets/claude/commands/cc/pagespeed.md +103 -0
- package/presets/claude/settings.json +249 -2
- package/presets/claude/skills/android/SKILL.md +119 -0
- package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
- package/presets/claude/skills/find-skills/SKILL.md +142 -0
- package/presets/claude/skills/laravel-specialist/SKILL.md +264 -0
- package/presets/claude/skills/laravel-specialist/references/eloquent.md +351 -0
- package/presets/claude/skills/laravel-specialist/references/livewire.md +512 -0
- package/presets/claude/skills/laravel-specialist/references/queues.md +423 -0
- package/presets/claude/skills/laravel-specialist/references/routing.md +362 -0
- package/presets/claude/skills/laravel-specialist/references/testing.md +522 -0
- package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
- package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/claude/skills/php-pro/SKILL.md +208 -0
- package/presets/claude/skills/php-pro/references/async-patterns.md +412 -0
- package/presets/claude/skills/php-pro/references/laravel-patterns.md +377 -0
- package/presets/claude/skills/php-pro/references/modern-php-features.md +323 -0
- package/presets/claude/skills/php-pro/references/symfony-patterns.md +466 -0
- package/presets/claude/skills/php-pro/references/testing-quality.md +466 -0
- package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/codex/AGENTS.md +38 -14
- package/presets/codex/skills/android/SKILL.md +119 -0
- package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
- package/presets/codex/skills/find-skills/SKILL.md +142 -0
- package/presets/codex/skills/laravel-specialist/SKILL.md +264 -0
- package/presets/codex/skills/laravel-specialist/references/eloquent.md +351 -0
- package/presets/codex/skills/laravel-specialist/references/livewire.md +512 -0
- package/presets/codex/skills/laravel-specialist/references/queues.md +423 -0
- package/presets/codex/skills/laravel-specialist/references/routing.md +362 -0
- package/presets/codex/skills/laravel-specialist/references/testing.md +522 -0
- package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
- package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/codex/skills/php-pro/SKILL.md +208 -0
- package/presets/codex/skills/php-pro/references/async-patterns.md +412 -0
- package/presets/codex/skills/php-pro/references/laravel-patterns.md +377 -0
- package/presets/codex/skills/php-pro/references/modern-php-features.md +323 -0
- package/presets/codex/skills/php-pro/references/symfony-patterns.md +466 -0
- package/presets/codex/skills/php-pro/references/testing-quality.md +466 -0
- package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/opencode/README.md +11 -10
- package/presets/opencode/agents/orchestrator.md +121 -1
- package/presets/opencode/agents/reviewer.md +31 -0
- package/presets/opencode/commands/cc-pagespeed.md +100 -0
- package/presets/opencode/prompts/v0.3.0/architect.md +221 -0
- package/presets/opencode/prompts/v0.3.0/docs.md +189 -0
- package/presets/opencode/prompts/v0.3.0/implementer.md +162 -0
- package/presets/opencode/prompts/v0.3.0/orchestrator.md +360 -0
- package/presets/opencode/prompts/v0.3.0/repo-explorer.md +110 -0
- package/presets/opencode/prompts/v0.3.0/reviewer.md +225 -0
- package/presets/opencode/prompts/v0.3.0/task-coach.md +155 -0
- package/presets/opencode/prompts/v0.3.0/tester.md +251 -0
- package/presets/opencode/skills/android/SKILL.md +119 -0
- package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
- package/presets/opencode/skills/find-skills/SKILL.md +142 -0
- package/presets/opencode/skills/laravel-specialist/SKILL.md +264 -0
- package/presets/opencode/skills/laravel-specialist/references/eloquent.md +351 -0
- package/presets/opencode/skills/laravel-specialist/references/livewire.md +512 -0
- package/presets/opencode/skills/laravel-specialist/references/queues.md +423 -0
- package/presets/opencode/skills/laravel-specialist/references/routing.md +362 -0
- package/presets/opencode/skills/laravel-specialist/references/testing.md +522 -0
- package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
- package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
- package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
- package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
- package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
- package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
- package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
- package/presets/opencode/skills/php-pro/SKILL.md +208 -0
- package/presets/opencode/skills/php-pro/references/async-patterns.md +412 -0
- package/presets/opencode/skills/php-pro/references/laravel-patterns.md +377 -0
- package/presets/opencode/skills/php-pro/references/modern-php-features.md +323 -0
- package/presets/opencode/skills/php-pro/references/symfony-patterns.md +466 -0
- package/presets/opencode/skills/php-pro/references/testing-quality.md +466 -0
- package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
- package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
- package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
- package/presets/seo-hotel/settings.json +225 -0
- package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
- package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
- package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
- package/src/presets/manifests/agy.yml +38 -3
- package/src/presets/manifests/claude.yml +8 -2
- package/src/presets/manifests/codex.yml +3 -2
- package/src/presets/manifests/cursor.yml +3 -2
- package/src/presets/manifests/gemini.yml +3 -2
- package/src/presets/manifests/opencode.yml +7 -2
- package/src/presets/models/agy.yml +16 -0
- package/src/presets/models/opencode.yml +6 -6
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: android
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
name: Android + Kotlin (Jetpack Compose & Media3)
|
|
5
|
+
description: >
|
|
6
|
+
Provides expert knowledge for building modern native Android apps using Kotlin, Jetpack Compose, Material Design 3, MVI architecture, Hilt dependency injection, and Media3/ExoPlayer.
|
|
7
|
+
|
|
8
|
+
user-invokable: true
|
|
9
|
+
license: MIT
|
|
10
|
+
metadata:
|
|
11
|
+
author: lgzarturo
|
|
12
|
+
category: mobile
|
|
13
|
+
|
|
14
|
+
compatibility:
|
|
15
|
+
tools: [claude, codex, gemini, agy, opencode]
|
|
16
|
+
stacks:
|
|
17
|
+
languages: [kotlin, java]
|
|
18
|
+
frameworks: [android]
|
|
19
|
+
|
|
20
|
+
risk:
|
|
21
|
+
level: medium
|
|
22
|
+
can_execute_shell: true
|
|
23
|
+
can_modify_files: true
|
|
24
|
+
requires_network: false
|
|
25
|
+
|
|
26
|
+
inputs: []
|
|
27
|
+
|
|
28
|
+
outputs: []
|
|
29
|
+
|
|
30
|
+
quality:
|
|
31
|
+
reviewed_by: codeconductor-core
|
|
32
|
+
version: 0.1.0
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Android + Kotlin (Jetpack Compose & Media3)
|
|
36
|
+
|
|
37
|
+
This playbook defines the architecture, UI design system, performance guidelines, and testing strategy for native Android applications.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 1. Lead Architect & Modularization
|
|
42
|
+
|
|
43
|
+
### Architecture (MVI / MVVM with Clean Architecture)
|
|
44
|
+
- Prefer **MVI (Model-View-Intent)** for state management. Ensure a strict unidirectional data flow:
|
|
45
|
+
- **UiState**: Single source of truth for the UI state.
|
|
46
|
+
- **UiIntent**: Actions initiated by the user or system.
|
|
47
|
+
- **UiEffect**: One-time events (navigation, toasts, snackbars).
|
|
48
|
+
- Separate the project into clean logical modules:
|
|
49
|
+
- `app`: Application entry point, launcher activity, global dependency injection configuration.
|
|
50
|
+
- `core`: Shared resources, network layer, media playback logic (ExoPlayer/Media3), storage.
|
|
51
|
+
- `feature`: Individual business features (isolated and independent of other features).
|
|
52
|
+
|
|
53
|
+
### Dependency Injection (Hilt)
|
|
54
|
+
- Annotate the Application class with `@HiltAndroidApp`.
|
|
55
|
+
- Annotate Activities and Fragments with `@AndroidEntryPoint`.
|
|
56
|
+
- Use constructor injection for ViewModels with `@HiltViewModel`.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 2. Jetpack Compose UI/UX
|
|
61
|
+
|
|
62
|
+
### Recomposition & State Management
|
|
63
|
+
- Consume `StateFlow` from ViewModels safely using `collectAsStateWithLifecycle()` to respect the activity lifecycle.
|
|
64
|
+
- Keep data models immutable. Mark configuration classes with `@Immutable` or `@Stable` to prevent redundant recompositions.
|
|
65
|
+
- Use `contentType` and `key` in `LazyColumn` and `LazyRow` to optimize item recycling and rendering performance.
|
|
66
|
+
- Avoid fixed hardcoded margins. Apply `WindowInsets` to support modern edge-to-edge screens.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 3. Performance & Multimedia (Media3 / ExoPlayer)
|
|
71
|
+
|
|
72
|
+
### Playback & Services
|
|
73
|
+
- Run `ExoPlayer` / `Media3` inside a robust `Foreground Service` (using `MediaSessionService`) to ensure playback continues when the app is in the background.
|
|
74
|
+
- Clean up resources: release player instances in `onDestroy` or when the service is stopped.
|
|
75
|
+
- Control wake locks strictly to avoid draining the user's battery when playback is paused.
|
|
76
|
+
|
|
77
|
+
### Kotlin Coroutines & Threading
|
|
78
|
+
- Always inject `CoroutineDispatcher` instances instead of hardcoding them:
|
|
79
|
+
- `Dispatchers.IO`: Database access, network operations, file reading.
|
|
80
|
+
- `Dispatchers.Default`: CPU-intensive operations (parsing JSON, filtering large lists).
|
|
81
|
+
- `Dispatchers.Main`: UI modifications and light interactions.
|
|
82
|
+
|
|
83
|
+
### R8 & Resource Optimization
|
|
84
|
+
- Enable shrinking and obfuscation in production builds:
|
|
85
|
+
- `isMinifyEnabled = true`
|
|
86
|
+
- `isShrinkResources = true`
|
|
87
|
+
- Convert all static images to the modern `WebP` format to minimize the application binary size.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 4. Quality Assurance & Automated Testing
|
|
92
|
+
|
|
93
|
+
### Unit Testing
|
|
94
|
+
- Use JUnit 5 and MockK for mocking dependencies.
|
|
95
|
+
- Test ViewModels and Reducers by asserting StateFlow updates. Use `Turbine` to easily test Kotlin Flows.
|
|
96
|
+
- Mock all multimedia/ExoPlayer components to avoid loading actual audio/video resources in unit tests.
|
|
97
|
+
|
|
98
|
+
### UI Testing
|
|
99
|
+
- Create UI tests using Compose test rules: `createComposeRule()` or `createAndroidComposeRule<MainActivity>()`.
|
|
100
|
+
- Assert correct rendering, visibility states, and user interactions without executing real network calls.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 5. Key Gradle & ADB Commands
|
|
105
|
+
|
|
106
|
+
Use these commands for building, checking code style, running tests, and profiling performance:
|
|
107
|
+
|
|
108
|
+
| Command | Action |
|
|
109
|
+
| ------- | ------ |
|
|
110
|
+
| `./gradlew init` | Initialize a new Gradle project structure. |
|
|
111
|
+
| `./gradlew app:dependencies` | List all dependencies of the application module. |
|
|
112
|
+
| `./gradlew assembleDebug` | Validate compilation and generate debug APK. |
|
|
113
|
+
| `./gradlew ktlintCheck` | Run KtLint check to enforce Kotlin style guidelines. |
|
|
114
|
+
| `./gradlew lintDebug` | Run Android Lint tool to inspect code quality and UI issues. |
|
|
115
|
+
| `./gradlew testDebugUnitTest` | Run unit tests for debug build variant. |
|
|
116
|
+
| `./gradlew connectedAndroidTest` | Run instrumented UI tests on connected emulator or device. |
|
|
117
|
+
| `./gradlew assembleRelease` | Generate release build variant with R8 optimizations. |
|
|
118
|
+
| `adb shell dumpsys batterystats` | Profile system battery consumption metrics. |
|
|
119
|
+
| `adb shell am dumpheap <package> heap.hprof` | Dump application heap memory file for profiling. |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conductor-setup
|
|
3
|
+
description: Configure a Rails project to work with Conductor (parallel coding agents)
|
|
4
|
+
allowed-tools: Bash(chmod *), Bash(bundle *), Bash(npm *), Bash(script/server)
|
|
5
|
+
context: fork
|
|
6
|
+
risk: unknown
|
|
7
|
+
source: community
|
|
8
|
+
metadata:
|
|
9
|
+
author: Shpigford
|
|
10
|
+
version: "1.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Set up this Rails project for Conductor, the Mac app for parallel coding agents.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
- You need to configure a Rails project so it runs correctly inside Conductor workspaces.
|
|
17
|
+
- The project should support parallel coding agents with isolated ports, Redis settings, and shared secrets.
|
|
18
|
+
- You want the standard `conductor.json`, `bin/conductor-setup`, and `script/server` scaffolding for a Rails repo.
|
|
19
|
+
|
|
20
|
+
# What to Create
|
|
21
|
+
|
|
22
|
+
## 1. conductor.json (project root)
|
|
23
|
+
|
|
24
|
+
Create `conductor.json` in the project root if it doesn't already exist:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"scripts": {
|
|
29
|
+
"setup": "bin/conductor-setup",
|
|
30
|
+
"run": "script/server"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 2. bin/conductor-setup (executable)
|
|
36
|
+
|
|
37
|
+
Create `bin/conductor-setup` if it doesn't already exist:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
#!/bin/bash
|
|
41
|
+
set -e
|
|
42
|
+
|
|
43
|
+
# Symlink .env from repo root (where secrets live, outside worktrees)
|
|
44
|
+
[ -f "$CONDUCTOR_ROOT_PATH/.env" ] && ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env
|
|
45
|
+
|
|
46
|
+
# Symlink Rails master key
|
|
47
|
+
[ -f "$CONDUCTOR_ROOT_PATH/config/master.key" ] && ln -sf "$CONDUCTOR_ROOT_PATH/config/master.key" config/master.key
|
|
48
|
+
|
|
49
|
+
# Install dependencies
|
|
50
|
+
bundle install
|
|
51
|
+
npm install
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Make it executable with `chmod +x bin/conductor-setup`.
|
|
55
|
+
|
|
56
|
+
## 3. script/server (executable)
|
|
57
|
+
|
|
58
|
+
Create the `script` directory if needed, then create `script/server` if it doesn't already exist:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
#!/bin/bash
|
|
62
|
+
|
|
63
|
+
# === Port Configuration ===
|
|
64
|
+
export PORT=${CONDUCTOR_PORT:-3000}
|
|
65
|
+
export VITE_RUBY_PORT=$((PORT + 1000))
|
|
66
|
+
|
|
67
|
+
# === Redis Isolation ===
|
|
68
|
+
if [ -n "$CONDUCTOR_WORKSPACE_NAME" ]; then
|
|
69
|
+
HASH=$(printf '%s' "$CONDUCTOR_WORKSPACE_NAME" | cksum | cut -d' ' -f1)
|
|
70
|
+
REDIS_DB=$((HASH % 16))
|
|
71
|
+
export REDIS_URL="redis://localhost:6379/${REDIS_DB}"
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
exec bin/dev
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Make it executable with `chmod +x script/server`.
|
|
78
|
+
|
|
79
|
+
## 4. Update Rails Config Files
|
|
80
|
+
|
|
81
|
+
For each of the following files, if they exist and contain Redis configuration, update them to use `ENV.fetch('REDIS_URL', ...)` or `ENV['REDIS_URL']` with a fallback:
|
|
82
|
+
|
|
83
|
+
### config/initializers/sidekiq.rb
|
|
84
|
+
If this file exists and configures Redis, update it to use:
|
|
85
|
+
```ruby
|
|
86
|
+
redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### config/cable.yml
|
|
90
|
+
If this file exists, update the development adapter to use:
|
|
91
|
+
```yaml
|
|
92
|
+
development:
|
|
93
|
+
adapter: redis
|
|
94
|
+
url: <%= ENV.fetch('REDIS_URL', 'redis://localhost:6379/1') %>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### config/environments/development.rb
|
|
98
|
+
If this file configures Redis for caching, update to use:
|
|
99
|
+
```ruby
|
|
100
|
+
config.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### config/initializers/rack_attack.rb
|
|
104
|
+
If this file exists and configures a Redis cache store, update to use:
|
|
105
|
+
```ruby
|
|
106
|
+
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'))
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
# Implementation Notes
|
|
110
|
+
|
|
111
|
+
- **Don't overwrite existing files**: Check if conductor.json, bin/conductor-setup, and script/server exist before creating them. If they exist, skip creation and inform the user.
|
|
112
|
+
- **Rails config updates**: Only modify Redis-related configuration. If a file doesn't exist or doesn't use Redis, skip it gracefully.
|
|
113
|
+
- **Create directories as needed**: Create `script/` directory if it doesn't exist.
|
|
114
|
+
|
|
115
|
+
# Verification
|
|
116
|
+
|
|
117
|
+
After creating the files:
|
|
118
|
+
1. Confirm all Conductor files exist and scripts are executable
|
|
119
|
+
2. Run `script/server` to verify it starts without errors
|
|
120
|
+
3. Check that Rails configs properly reference `ENV['REDIS_URL']` or `ENV.fetch('REDIS_URL', ...)`
|
|
121
|
+
|
|
122
|
+
## Limitations
|
|
123
|
+
- Use this skill only when the task clearly matches the scope described above.
|
|
124
|
+
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
|
|
125
|
+
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: find-skills
|
|
3
|
+
description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Find Skills
|
|
7
|
+
|
|
8
|
+
This skill helps you discover and install skills from the open agent skills ecosystem.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Use this skill when the user:
|
|
13
|
+
|
|
14
|
+
- Asks "how do I do X" where X might be a common task with an existing skill
|
|
15
|
+
- Says "find a skill for X" or "is there a skill for X"
|
|
16
|
+
- Asks "can you do X" where X is a specialized capability
|
|
17
|
+
- Expresses interest in extending agent capabilities
|
|
18
|
+
- Wants to search for tools, templates, or workflows
|
|
19
|
+
- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
|
|
20
|
+
|
|
21
|
+
## What is the Skills CLI?
|
|
22
|
+
|
|
23
|
+
The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
|
|
24
|
+
|
|
25
|
+
**Key commands:**
|
|
26
|
+
|
|
27
|
+
- `npx skills find [query]` - Search for skills interactively or by keyword
|
|
28
|
+
- `npx skills add <package>` - Install a skill from GitHub or other sources
|
|
29
|
+
- `npx skills check` - Check for skill updates
|
|
30
|
+
- `npx skills update` - Update all installed skills
|
|
31
|
+
|
|
32
|
+
**Browse skills at:** https://skills.sh/
|
|
33
|
+
|
|
34
|
+
## How to Help Users Find Skills
|
|
35
|
+
|
|
36
|
+
### Step 1: Understand What They Need
|
|
37
|
+
|
|
38
|
+
When a user asks for help with something, identify:
|
|
39
|
+
|
|
40
|
+
1. The domain (e.g., React, testing, design, deployment)
|
|
41
|
+
2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
|
|
42
|
+
3. Whether this is a common enough task that a skill likely exists
|
|
43
|
+
|
|
44
|
+
### Step 2: Check the Leaderboard First
|
|
45
|
+
|
|
46
|
+
Before running a CLI search, check the [skills.sh leaderboard](https://skills.sh/) to see if a well-known skill already exists for the domain. The leaderboard ranks skills by total installs, surfacing the most popular and battle-tested options.
|
|
47
|
+
|
|
48
|
+
For example, top skills for web development include:
|
|
49
|
+
- `vercel-labs/agent-skills` — React, Next.js, web design (100K+ installs each)
|
|
50
|
+
- `anthropics/skills` — Frontend design, document processing (100K+ installs)
|
|
51
|
+
|
|
52
|
+
### Step 3: Search for Skills
|
|
53
|
+
|
|
54
|
+
If the leaderboard doesn't cover the user's need, run the find command:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx skills find [query]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For example:
|
|
61
|
+
|
|
62
|
+
- User asks "how do I make my React app faster?" → `npx skills find react performance`
|
|
63
|
+
- User asks "can you help me with PR reviews?" → `npx skills find pr review`
|
|
64
|
+
- User asks "I need to create a changelog" → `npx skills find changelog`
|
|
65
|
+
|
|
66
|
+
### Step 4: Verify Quality Before Recommending
|
|
67
|
+
|
|
68
|
+
**Do not recommend a skill based solely on search results.** Always verify:
|
|
69
|
+
|
|
70
|
+
1. **Install count** — Prefer skills with 1K+ installs. Be cautious with anything under 100.
|
|
71
|
+
2. **Source reputation** — Official sources (`vercel-labs`, `anthropics`, `microsoft`) are more trustworthy than unknown authors.
|
|
72
|
+
3. **GitHub stars** — Check the source repository. A skill from a repo with <100 stars should be treated with skepticism.
|
|
73
|
+
|
|
74
|
+
### Step 5: Present Options to the User
|
|
75
|
+
|
|
76
|
+
When you find relevant skills, present them to the user with:
|
|
77
|
+
|
|
78
|
+
1. The skill name and what it does
|
|
79
|
+
2. The install count and source
|
|
80
|
+
3. The install command they can run
|
|
81
|
+
4. A link to learn more at skills.sh
|
|
82
|
+
|
|
83
|
+
Example response:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
I found a skill that might help! The "react-best-practices" skill provides
|
|
87
|
+
React and Next.js performance optimization guidelines from Vercel Engineering.
|
|
88
|
+
(185K installs)
|
|
89
|
+
|
|
90
|
+
To install it:
|
|
91
|
+
npx skills add vercel-labs/agent-skills@react-best-practices
|
|
92
|
+
|
|
93
|
+
Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-practices
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 6: Offer to Install
|
|
97
|
+
|
|
98
|
+
If the user wants to proceed, you can install the skill for them:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx skills add <owner/repo@skill> -g -y
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
|
|
105
|
+
|
|
106
|
+
## Common Skill Categories
|
|
107
|
+
|
|
108
|
+
When searching, consider these common categories:
|
|
109
|
+
|
|
110
|
+
| Category | Example Queries |
|
|
111
|
+
| --------------- | ---------------------------------------- |
|
|
112
|
+
| Web Development | react, nextjs, typescript, css, tailwind |
|
|
113
|
+
| Testing | testing, jest, playwright, e2e |
|
|
114
|
+
| DevOps | deploy, docker, kubernetes, ci-cd |
|
|
115
|
+
| Documentation | docs, readme, changelog, api-docs |
|
|
116
|
+
| Code Quality | review, lint, refactor, best-practices |
|
|
117
|
+
| Design | ui, ux, design-system, accessibility |
|
|
118
|
+
| Productivity | workflow, automation, git |
|
|
119
|
+
|
|
120
|
+
## Tips for Effective Searches
|
|
121
|
+
|
|
122
|
+
1. **Use specific keywords**: "react testing" is better than just "testing"
|
|
123
|
+
2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
|
|
124
|
+
3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
|
|
125
|
+
|
|
126
|
+
## When No Skills Are Found
|
|
127
|
+
|
|
128
|
+
If no relevant skills exist:
|
|
129
|
+
|
|
130
|
+
1. Acknowledge that no existing skill was found
|
|
131
|
+
2. Offer to help with the task directly using your general capabilities
|
|
132
|
+
3. Suggest the user could create their own skill with `npx skills init`
|
|
133
|
+
|
|
134
|
+
Example:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
I searched for skills related to "xyz" but didn't find any matches.
|
|
138
|
+
I can still help you with this task directly! Would you like me to proceed?
|
|
139
|
+
|
|
140
|
+
If this is something you do often, you could create your own skill:
|
|
141
|
+
npx skills init my-xyz-skill
|
|
142
|
+
```
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: laravel-specialist
|
|
3
|
+
description: Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers, implementing Sanctum auth flows, building Livewire components, optimising Eloquent queries, or writing Pest/PHPUnit tests for Laravel features.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: https://github.com/Jeffallan
|
|
7
|
+
version: "1.1.0"
|
|
8
|
+
domain: backend
|
|
9
|
+
triggers: Laravel, Eloquent, PHP framework, Laravel API, Artisan, Blade templates, Laravel queues, Livewire, Laravel testing, Sanctum, Horizon
|
|
10
|
+
role: specialist
|
|
11
|
+
scope: implementation
|
|
12
|
+
output-format: code
|
|
13
|
+
related-skills: fullstack-guardian, test-master, devops-engineer, security-reviewer
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Laravel Specialist
|
|
17
|
+
|
|
18
|
+
Senior Laravel specialist with deep expertise in Laravel 10+, Eloquent ORM, and modern PHP 8.2+ development.
|
|
19
|
+
|
|
20
|
+
## Core Workflow
|
|
21
|
+
|
|
22
|
+
1. **Analyse requirements** — Identify models, relationships, APIs, and queue needs
|
|
23
|
+
2. **Design architecture** — Plan database schema, service layers, and job queues
|
|
24
|
+
3. **Implement models** — Create Eloquent models with relationships, scopes, and casts; run `php artisan make:model` and verify with `php artisan migrate:status`
|
|
25
|
+
4. **Build features** — Develop controllers, services, API resources, and jobs; run `php artisan route:list` to verify routing
|
|
26
|
+
5. **Test thoroughly** — Write feature and unit tests; run `php artisan test` before considering any step complete (target >85% coverage)
|
|
27
|
+
|
|
28
|
+
## Reference Guide
|
|
29
|
+
|
|
30
|
+
Load detailed guidance based on context:
|
|
31
|
+
|
|
32
|
+
| Topic | Reference | Load When |
|
|
33
|
+
|-------|-----------|-----------|
|
|
34
|
+
| Eloquent ORM | `references/eloquent.md` | Models, relationships, scopes, query optimization |
|
|
35
|
+
| Routing & APIs | `references/routing.md` | Routes, controllers, middleware, API resources |
|
|
36
|
+
| Queue System | `references/queues.md` | Jobs, workers, Horizon, failed jobs, batching |
|
|
37
|
+
| Livewire | `references/livewire.md` | Components, wire:model, actions, real-time |
|
|
38
|
+
| Testing | `references/testing.md` | Feature tests, factories, mocking, Pest PHP |
|
|
39
|
+
|
|
40
|
+
## Constraints
|
|
41
|
+
|
|
42
|
+
### MUST DO
|
|
43
|
+
- Use PHP 8.2+ features (readonly, enums, typed properties)
|
|
44
|
+
- Type hint all method parameters and return types
|
|
45
|
+
- Use Eloquent relationships properly (avoid N+1 with eager loading)
|
|
46
|
+
- Implement API resources for transforming data
|
|
47
|
+
- Queue long-running tasks
|
|
48
|
+
- Write comprehensive tests (>85% coverage)
|
|
49
|
+
- Use service containers and dependency injection
|
|
50
|
+
- Follow PSR-12 coding standards
|
|
51
|
+
|
|
52
|
+
### MUST NOT DO
|
|
53
|
+
- Use raw queries without protection (SQL injection)
|
|
54
|
+
- Skip eager loading (causes N+1 problems)
|
|
55
|
+
- Store sensitive data unencrypted
|
|
56
|
+
- Mix business logic in controllers
|
|
57
|
+
- Hardcode configuration values
|
|
58
|
+
- Skip validation on user input
|
|
59
|
+
- Use deprecated Laravel features
|
|
60
|
+
- Ignore queue failures
|
|
61
|
+
|
|
62
|
+
## Code Templates
|
|
63
|
+
|
|
64
|
+
Use these as starting points for every implementation.
|
|
65
|
+
|
|
66
|
+
### Eloquent Model
|
|
67
|
+
|
|
68
|
+
```php
|
|
69
|
+
<?php
|
|
70
|
+
|
|
71
|
+
declare(strict_types=1);
|
|
72
|
+
|
|
73
|
+
namespace App\Models;
|
|
74
|
+
|
|
75
|
+
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
76
|
+
use Illuminate\Database\Eloquent\Model;
|
|
77
|
+
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
78
|
+
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
79
|
+
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
80
|
+
|
|
81
|
+
final class Post extends Model
|
|
82
|
+
{
|
|
83
|
+
use HasFactory, SoftDeletes;
|
|
84
|
+
|
|
85
|
+
protected $fillable = ['title', 'body', 'status', 'user_id'];
|
|
86
|
+
|
|
87
|
+
protected $casts = [
|
|
88
|
+
'status' => PostStatus::class, // backed enum
|
|
89
|
+
'published_at' => 'immutable_datetime',
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
// Relationships — always eager-load via ::with() at call site
|
|
93
|
+
public function author(): BelongsTo
|
|
94
|
+
{
|
|
95
|
+
return $this->belongsTo(User::class, 'user_id');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public function comments(): HasMany
|
|
99
|
+
{
|
|
100
|
+
return $this->hasMany(Comment::class);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Local scope
|
|
104
|
+
public function scopePublished(Builder $query): Builder
|
|
105
|
+
{
|
|
106
|
+
return $query->where('status', PostStatus::Published);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Migration
|
|
112
|
+
|
|
113
|
+
```php
|
|
114
|
+
<?php
|
|
115
|
+
|
|
116
|
+
use Illuminate\Database\Migrations\Migration;
|
|
117
|
+
use Illuminate\Database\Schema\Blueprint;
|
|
118
|
+
use Illuminate\Support\Facades\Schema;
|
|
119
|
+
|
|
120
|
+
return new class extends Migration
|
|
121
|
+
{
|
|
122
|
+
public function up(): void
|
|
123
|
+
{
|
|
124
|
+
Schema::create('posts', function (Blueprint $table): void {
|
|
125
|
+
$table->id();
|
|
126
|
+
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
|
127
|
+
$table->string('title');
|
|
128
|
+
$table->text('body');
|
|
129
|
+
$table->string('status')->default('draft');
|
|
130
|
+
$table->timestamp('published_at')->nullable();
|
|
131
|
+
$table->softDeletes();
|
|
132
|
+
$table->timestamps();
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
public function down(): void
|
|
137
|
+
{
|
|
138
|
+
Schema::dropIfExists('posts');
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### API Resource
|
|
144
|
+
|
|
145
|
+
```php
|
|
146
|
+
<?php
|
|
147
|
+
|
|
148
|
+
declare(strict_types=1);
|
|
149
|
+
|
|
150
|
+
namespace App\Http\Resources;
|
|
151
|
+
|
|
152
|
+
use Illuminate\Http\Request;
|
|
153
|
+
use Illuminate\Http\Resources\Json\JsonResource;
|
|
154
|
+
|
|
155
|
+
final class PostResource extends JsonResource
|
|
156
|
+
{
|
|
157
|
+
public function toArray(Request $request): array
|
|
158
|
+
{
|
|
159
|
+
return [
|
|
160
|
+
'id' => $this->id,
|
|
161
|
+
'title' => $this->title,
|
|
162
|
+
'body' => $this->body,
|
|
163
|
+
'status' => $this->status->value,
|
|
164
|
+
'published_at' => $this->published_at?->toIso8601String(),
|
|
165
|
+
'author' => new UserResource($this->whenLoaded('author')),
|
|
166
|
+
'comments' => CommentResource::collection($this->whenLoaded('comments')),
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Queued Job
|
|
173
|
+
|
|
174
|
+
```php
|
|
175
|
+
<?php
|
|
176
|
+
|
|
177
|
+
declare(strict_types=1);
|
|
178
|
+
|
|
179
|
+
namespace App\Jobs;
|
|
180
|
+
|
|
181
|
+
use App\Models\Post;
|
|
182
|
+
use Illuminate\Bus\Queueable;
|
|
183
|
+
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
184
|
+
use Illuminate\Foundation\Bus\Dispatchable;
|
|
185
|
+
use Illuminate\Queue\InteractsWithQueue;
|
|
186
|
+
use Illuminate\Queue\SerializesModels;
|
|
187
|
+
|
|
188
|
+
final class PublishPost implements ShouldQueue
|
|
189
|
+
{
|
|
190
|
+
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
191
|
+
|
|
192
|
+
public int $tries = 3;
|
|
193
|
+
public int $backoff = 60;
|
|
194
|
+
|
|
195
|
+
public function __construct(
|
|
196
|
+
private readonly Post $post,
|
|
197
|
+
) {}
|
|
198
|
+
|
|
199
|
+
public function handle(): void
|
|
200
|
+
{
|
|
201
|
+
$this->post->update([
|
|
202
|
+
'status' => PostStatus::Published,
|
|
203
|
+
'published_at' => now(),
|
|
204
|
+
]);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
public function failed(\Throwable $e): void
|
|
208
|
+
{
|
|
209
|
+
// Log or notify — never silently swallow failures
|
|
210
|
+
logger()->error('PublishPost failed', ['post' => $this->post->id, 'error' => $e->getMessage()]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Feature Test (Pest)
|
|
216
|
+
|
|
217
|
+
```php
|
|
218
|
+
<?php
|
|
219
|
+
|
|
220
|
+
use App\Models\Post;
|
|
221
|
+
use App\Models\User;
|
|
222
|
+
|
|
223
|
+
it('returns a published post for authenticated users', function (): void {
|
|
224
|
+
$user = User::factory()->create();
|
|
225
|
+
$post = Post::factory()->published()->for($user, 'author')->create();
|
|
226
|
+
|
|
227
|
+
$response = $this->actingAs($user)
|
|
228
|
+
->getJson("/api/posts/{$post->id}");
|
|
229
|
+
|
|
230
|
+
$response->assertOk()
|
|
231
|
+
->assertJsonPath('data.status', 'published')
|
|
232
|
+
->assertJsonPath('data.author.id', $user->id);
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
it('queues a publish job when a draft is submitted', function (): void {
|
|
236
|
+
Queue::fake();
|
|
237
|
+
$user = User::factory()->create();
|
|
238
|
+
$post = Post::factory()->draft()->for($user, 'author')->create();
|
|
239
|
+
|
|
240
|
+
$this->actingAs($user)
|
|
241
|
+
->postJson("/api/posts/{$post->id}/publish")
|
|
242
|
+
->assertAccepted();
|
|
243
|
+
|
|
244
|
+
Queue::assertPushed(PublishPost::class, fn ($job) => $job->post->is($post));
|
|
245
|
+
});
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Validation Checkpoints
|
|
249
|
+
|
|
250
|
+
Run these at each workflow stage to confirm correctness before proceeding:
|
|
251
|
+
|
|
252
|
+
| Stage | Command | Expected Result |
|
|
253
|
+
|-------|---------|-----------------|
|
|
254
|
+
| After migration | `php artisan migrate:status` | All migrations show `Ran` |
|
|
255
|
+
| After routing | `php artisan route:list --path=api` | New routes appear with correct verbs |
|
|
256
|
+
| After job dispatch | `php artisan queue:work --once` | Job processes without exception |
|
|
257
|
+
| After implementation | `php artisan test --coverage` | >85% coverage, 0 failures |
|
|
258
|
+
| Before PR | `./vendor/bin/pint --test` | PSR-12 linting passes |
|
|
259
|
+
|
|
260
|
+
## Knowledge Reference
|
|
261
|
+
|
|
262
|
+
Laravel 10+, Eloquent ORM, PHP 8.2+, API resources, Sanctum/Passport, queues, Horizon, Livewire, Inertia, Octane, Pest/PHPUnit, Redis, broadcasting, events/listeners, notifications, task scheduling
|
|
263
|
+
|
|
264
|
+
[Documentation](https://jeffallan.github.io/claude-skills/skills/backend/laravel-specialist/)
|