devlyn-cli 0.4.0 → 0.5.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
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<br />
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<picture>
|
|
6
|
+
<img alt="DEVLYN" src="assets/logo.svg" width="540" />
|
|
7
|
+
</picture>
|
|
8
|
+
|
|
9
|
+
### The Skills & Commands Toolkit for Claude Code
|
|
10
|
+
|
|
11
|
+
**Ship better code with battle-tested AI workflows — debugging, code review, UI design, product specs, and more.**
|
|
6
12
|
|
|
7
13
|
[](https://www.npmjs.com/package/devlyn-cli)
|
|
8
14
|
[](https://opensource.org/licenses/MIT)
|
|
15
|
+
[](https://docs.anthropic.com/en/docs/claude-code)
|
|
16
|
+
|
|
17
|
+
[Get Started](#get-started) · [Commands](#commands) · [Skills](#skills) · [Workflows](#workflows) · [Optional Packs](#optional-skills--packs) · [Contributing](#contributing)
|
|
9
18
|
|
|
10
19
|
</div>
|
|
11
20
|
|
|
@@ -13,122 +22,222 @@
|
|
|
13
22
|
|
|
14
23
|
## Why devlyn-cli?
|
|
15
24
|
|
|
16
|
-
[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is powerful out of the box
|
|
25
|
+
[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is powerful out of the box — but teams need **consistent, repeatable workflows**. Without shared conventions, every developer prompts differently, reviews differently, and debugs differently.
|
|
17
26
|
|
|
18
|
-
devlyn-cli
|
|
27
|
+
devlyn-cli solves this by installing a curated `.claude/` configuration into any project:
|
|
19
28
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
29
|
+
- **14 slash commands** for debugging, code review, UI design, documentation, and more
|
|
30
|
+
- **5 core skills** that activate automatically based on conversation context
|
|
31
|
+
- **Agent team workflows** that spawn specialized AI teammates for complex tasks
|
|
32
|
+
- **Product & feature spec templates** for structured planning
|
|
33
|
+
- **Commit conventions** for consistent git history
|
|
24
34
|
|
|
25
|
-
Zero dependencies. One command. Works with any project
|
|
35
|
+
**Zero dependencies. One command. Works with any project.**
|
|
26
36
|
|
|
27
|
-
##
|
|
37
|
+
## Get Started
|
|
28
38
|
|
|
29
39
|
```bash
|
|
30
40
|
npx devlyn-cli
|
|
31
41
|
```
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
The interactive installer walks you through setup — select optional skills, choose community packs, done.
|
|
34
44
|
|
|
35
45
|
```bash
|
|
36
|
-
# Non-interactive
|
|
46
|
+
# Non-interactive install (CI/CD friendly)
|
|
37
47
|
npx devlyn-cli -y
|
|
38
48
|
|
|
39
|
-
# Update to the latest
|
|
49
|
+
# Update to the latest version
|
|
40
50
|
npx devlyn-cli@latest
|
|
41
51
|
|
|
42
|
-
#
|
|
52
|
+
# See everything that's included
|
|
43
53
|
npx devlyn-cli list
|
|
44
54
|
```
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
### What Gets Installed
|
|
47
57
|
|
|
48
58
|
```
|
|
49
59
|
your-project/
|
|
50
60
|
├── .claude/
|
|
51
61
|
│ ├── commands/ # 14 slash commands
|
|
52
|
-
│ ├── skills/ # 5 core skills + optional addons
|
|
53
|
-
│ ├── templates/ #
|
|
54
|
-
│
|
|
55
|
-
└──
|
|
62
|
+
│ ├── skills/ # 5 core skills + any optional addons
|
|
63
|
+
│ ├── templates/ # Product spec, feature spec, prompt templates
|
|
64
|
+
│ ├── commit-conventions.md # Commit message standards
|
|
65
|
+
│ └── settings.json # Agent teams enabled
|
|
66
|
+
└── CLAUDE.md # Project-level AI instructions
|
|
56
67
|
```
|
|
57
68
|
|
|
58
69
|
## Commands
|
|
59
70
|
|
|
60
|
-
Slash commands are invoked directly in Claude Code conversations (e.g., `/devlyn.resolve`).
|
|
71
|
+
Slash commands are invoked directly in Claude Code conversations (e.g., type `/devlyn.resolve`).
|
|
72
|
+
|
|
73
|
+
### Debugging & Resolution
|
|
61
74
|
|
|
62
75
|
| Command | Description |
|
|
63
76
|
|---|---|
|
|
64
77
|
| `/devlyn.resolve` | Systematic bug fixing with root-cause analysis and test-driven validation |
|
|
65
|
-
| `/devlyn.team-resolve` |
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
78
|
+
| `/devlyn.team-resolve` | Spawns a full agent team — root cause analyst, test engineer, security auditor — to investigate complex issues |
|
|
79
|
+
|
|
80
|
+
### Code Review & Quality
|
|
81
|
+
|
|
82
|
+
| Command | Description |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `/devlyn.review` | Post-implementation review — security, quality, best practices checklist |
|
|
85
|
+
| `/devlyn.team-review` | Multi-perspective team review with specialized reviewers (security, quality, testing, performance, product) |
|
|
86
|
+
| `/devlyn.clean` | Detect and remove dead code, unused dependencies, complexity hotspots, and tech debt |
|
|
87
|
+
|
|
88
|
+
### UI Design & Implementation
|
|
89
|
+
|
|
90
|
+
| Command | Description |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `/devlyn.design-ui` | Generate 5 radically distinct UI style explorations from a spec or reference image |
|
|
93
|
+
| `/devlyn.team-design-ui` | Spawns a design team — creative director, product designer, visual designer, interaction designer, accessibility designer |
|
|
94
|
+
| `/devlyn.design-system` | Extract design system tokens from a chosen style for exact reproduction |
|
|
95
|
+
| `/devlyn.implement-ui` | Team-based UI build — component architect, UX engineer, accessibility engineer, responsive engineer, visual QA |
|
|
96
|
+
|
|
97
|
+
### Product & Planning
|
|
98
|
+
|
|
99
|
+
| Command | Description |
|
|
100
|
+
|---|---|
|
|
71
101
|
| `/devlyn.product-spec` | Generate or incrementally update product spec documents |
|
|
72
|
-
| `/devlyn.
|
|
102
|
+
| `/devlyn.feature-spec` | Transform product specs into implementable feature specifications |
|
|
103
|
+
| `/devlyn.discover-product` | Scan codebase to generate feature-oriented product documentation |
|
|
73
104
|
| `/devlyn.recommend-features` | Prioritize top 5 features to build next based on value and readiness |
|
|
74
|
-
|
|
75
|
-
|
|
105
|
+
|
|
106
|
+
### Documentation
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---|---|
|
|
76
110
|
| `/devlyn.update-docs` | Sync all project docs with current codebase — cleans stale content, preserves roadmaps, generates missing docs |
|
|
77
|
-
| `/devlyn.clean` | Detect and remove dead code, unused dependencies, complexity hotspots, and tech debt |
|
|
78
111
|
|
|
79
112
|
## Skills
|
|
80
113
|
|
|
81
|
-
Skills are
|
|
114
|
+
Skills are **not invoked manually** — they activate automatically when Claude Code detects a relevant conversation context. Think of them as always-on expertise that shapes how the AI approaches specific types of work.
|
|
82
115
|
|
|
83
|
-
| Skill |
|
|
84
|
-
|
|
85
|
-
| `root-cause-analysis` | 5 Whys methodology, evidence standards, and no-workaround rules
|
|
86
|
-
| `code-review-standards` |
|
|
87
|
-
| `ui-implementation-standards` |
|
|
88
|
-
| `code-health-standards` |
|
|
89
|
-
| `workflow-routing` | SDLC phase map — guides you to the right command for your current task |
|
|
116
|
+
| Skill | When It Activates | What It Does |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| `root-cause-analysis` | Debugging conversations | Enforces 5 Whys methodology, evidence standards, and no-workaround rules |
|
|
119
|
+
| `code-review-standards` | Code review tasks | Applies severity framework, quality bar, and approval criteria |
|
|
120
|
+
| `ui-implementation-standards` | UI/frontend work | Ensures design fidelity, accessibility, animation quality, and responsive standards |
|
|
121
|
+
| `code-health-standards` | Code maintenance | Enforces dead code prevention, dependency discipline, and complexity thresholds |
|
|
122
|
+
| `workflow-routing` | Any task | SDLC phase map — guides you to the right command for your current task |
|
|
123
|
+
|
|
124
|
+
## Workflows
|
|
90
125
|
|
|
91
|
-
|
|
126
|
+
Commands are designed to compose. Pick the right tool based on scope, then chain them together.
|
|
92
127
|
|
|
93
|
-
|
|
128
|
+
### Recommended Workflow
|
|
129
|
+
|
|
130
|
+
The full fix → polish → review → maintain cycle:
|
|
131
|
+
|
|
132
|
+
| Step | Command | What It Does |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| 1. **Resolve** | `/devlyn.resolve` or `/devlyn.team-resolve` | Fix the issue — solo for focused bugs (1-2 modules), team for complex issues (3+ modules) |
|
|
135
|
+
| 2. **Simplify** | `/simplify` | Quick cleanup pass for reuse, quality, and efficiency *(built-in Claude Code command)* |
|
|
136
|
+
| 3. **Review** | `/devlyn.review` or `/devlyn.team-review` | Audit the changes — solo for small PRs (< 10 files), team for large PRs (10+ files) |
|
|
137
|
+
| | | *If the review finds issues, loop back to step 1* |
|
|
138
|
+
| 4. **Clean** | `/devlyn.clean` | Remove dead code, unused dependencies, and complexity hotspots |
|
|
139
|
+
| 5. **Document** | `/devlyn.update-docs` | Sync project documentation with the current codebase |
|
|
140
|
+
|
|
141
|
+
Steps 4-5 are optional — run them periodically rather than on every PR. Steps 1-3 are the core loop.
|
|
142
|
+
|
|
143
|
+
> **Tip:** Consider running `/devlyn.review` once more after steps 4-5. `/devlyn.clean` removes code and `/devlyn.update-docs` changes docs — a final review pass catches accidental regressions from cleanup.
|
|
144
|
+
|
|
145
|
+
> **Scope matching matters.** For a simple one-file bug, `/devlyn.resolve` + `/devlyn.review` (solo) is fast. For a multi-module feature, `/devlyn.team-resolve` + `/devlyn.team-review` (team) gives you parallel specialist perspectives. Don't over-tool simple changes.
|
|
146
|
+
|
|
147
|
+
### UI Design Pipeline
|
|
148
|
+
|
|
149
|
+
A full explore → extract → build pipeline:
|
|
150
|
+
|
|
151
|
+
| Step | Command | What It Does |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| 1. **Explore** | `/devlyn.design-ui` | Generates 5 radically distinct style options from a spec or reference image |
|
|
154
|
+
| 2. **Extract** | `/devlyn.design-system` | Pulls exact design tokens (colors, spacing, typography) from your chosen style |
|
|
155
|
+
| 3. **Build** | `/devlyn.implement-ui` | Spawns a build team (component architect, UX engineer, accessibility engineer, responsive engineer, visual QA) |
|
|
156
|
+
|
|
157
|
+
> For design exploration with a full creative team, use `/devlyn.team-design-ui` instead of step 1.
|
|
158
|
+
|
|
159
|
+
After building, follow the [recommended workflow](#recommended-workflow) starting from step 2 (simplify) to review and polish the implementation.
|
|
160
|
+
|
|
161
|
+
### Standalone Tools
|
|
162
|
+
|
|
163
|
+
These commands work independently, outside of the main workflow:
|
|
164
|
+
|
|
165
|
+
| Command | What It Does |
|
|
94
166
|
|---|---|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
167
|
+
| `/devlyn.clean [focus]` | Focused cleanup — e.g., `/devlyn.clean dependencies` or `/devlyn.clean dead-code` |
|
|
168
|
+
| `/devlyn.update-docs [area]` | Focused doc sync — e.g., `/devlyn.update-docs API reference` |
|
|
169
|
+
| `/devlyn.product-spec` | Generate or update a product specification |
|
|
170
|
+
| `/devlyn.feature-spec` | Transform a product spec into an implementable feature spec |
|
|
171
|
+
| `/devlyn.discover-product` | Scan codebase to auto-generate product documentation |
|
|
172
|
+
| `/devlyn.recommend-features` | Prioritize top 5 features to build next |
|
|
98
173
|
|
|
99
174
|
## Optional Skills & Packs
|
|
100
175
|
|
|
101
|
-
During installation,
|
|
176
|
+
During installation, the interactive selector lets you add optional skills and community packs.
|
|
102
177
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
178
|
+
### Skills
|
|
179
|
+
|
|
180
|
+
Copied directly into your `.claude/skills/` directory.
|
|
181
|
+
|
|
182
|
+
| Skill | Description |
|
|
183
|
+
|---|---|
|
|
184
|
+
| `cloudflare-nextjs-setup` | Cloudflare Workers + Next.js deployment with OpenNext |
|
|
185
|
+
| `generate-skill` | Create well-structured Claude Code skills following Anthropic best practices |
|
|
186
|
+
| `prompt-engineering` | Claude 4 prompt optimization using official Anthropic best practices |
|
|
187
|
+
| `better-auth-setup` | Production-ready Better Auth + Hono + Drizzle + PostgreSQL auth setup |
|
|
188
|
+
| `pyx-scan` | Check whether an AI agent skill is safe before installing |
|
|
189
|
+
|
|
190
|
+
### Community Packs
|
|
191
|
+
|
|
192
|
+
Installed via the [skills CLI](https://github.com/anthropics/skills) (`npx skills add`). These are maintained by their respective communities.
|
|
193
|
+
|
|
194
|
+
| Pack | Description |
|
|
195
|
+
|---|---|
|
|
196
|
+
| `vercel-labs/agent-skills` | React, Next.js, React Native best practices |
|
|
197
|
+
| `supabase/agent-skills` | Supabase integration patterns |
|
|
198
|
+
| `coreyhaines31/marketingskills` | Marketing automation and content skills |
|
|
199
|
+
| `anthropics/skills` | Official Anthropic skill-creator with eval framework and description optimizer |
|
|
200
|
+
|
|
201
|
+
> **Want to add a pack?** Open a PR adding your pack to the `OPTIONAL_ADDONS` array in [`bin/devlyn.js`](bin/devlyn.js).
|
|
114
202
|
|
|
115
203
|
## How It Works
|
|
116
204
|
|
|
117
|
-
1. Run `npx devlyn-cli
|
|
118
|
-
2. The CLI copies
|
|
119
|
-
3. Claude Code automatically reads `.claude/commands
|
|
120
|
-
4. Invoke commands like `/devlyn.resolve` in your Claude Code session
|
|
205
|
+
1. **Run `npx devlyn-cli`** in your project root
|
|
206
|
+
2. The CLI copies config files into `.claude/` and `CLAUDE.md` to the project root
|
|
207
|
+
3. Claude Code automatically reads `.claude/commands/` and `.claude/skills/` on startup
|
|
208
|
+
4. Invoke commands like `/devlyn.resolve` in your Claude Code session — skills activate on their own
|
|
209
|
+
|
|
210
|
+
The installation is **idempotent** — run it again anytime to update to the latest config.
|
|
121
211
|
|
|
122
|
-
|
|
212
|
+
## Creating Your Own Skills
|
|
213
|
+
|
|
214
|
+
Want to author custom skills for your team or the community?
|
|
215
|
+
|
|
216
|
+
1. **During install**, select the `generate-skill` optional skill — or —
|
|
217
|
+
2. **Install the official Anthropic skill-creator** pack:
|
|
218
|
+
```bash
|
|
219
|
+
npx skills add anthropics/skills
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Both provide structured templates, best practices, and eval frameworks for writing high-quality Claude Code skills.
|
|
223
|
+
|
|
224
|
+
See the [Claude Code skills documentation](https://docs.anthropic.com/en/docs/claude-code/skills) for the full specification.
|
|
123
225
|
|
|
124
226
|
## Requirements
|
|
125
227
|
|
|
126
|
-
- Node.js 18
|
|
127
|
-
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI
|
|
228
|
+
- **Node.js 18+**
|
|
229
|
+
- **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** CLI installed and configured
|
|
128
230
|
|
|
129
231
|
## Contributing
|
|
130
232
|
|
|
131
|
-
Contributions are welcome!
|
|
233
|
+
Contributions are welcome! Here are some ways to get involved:
|
|
234
|
+
|
|
235
|
+
- **Add a command** — Create a new `.md` file in `config/commands/`
|
|
236
|
+
- **Add a skill** — Create a new directory in `config/skills/` with a `SKILL.md`
|
|
237
|
+
- **Add an optional skill** — Add to `optional-skills/` and the `OPTIONAL_ADDONS` array
|
|
238
|
+
- **Suggest a community pack** — Open a PR to add it to the pack list
|
|
239
|
+
|
|
240
|
+
### Development
|
|
132
241
|
|
|
133
242
|
1. Fork the repository
|
|
134
243
|
2. Create your branch (`git checkout -b feat/my-feature`)
|
|
@@ -143,4 +252,3 @@ Contributions are welcome! Feel free to open an issue or submit a pull request.
|
|
|
143
252
|
## License
|
|
144
253
|
|
|
145
254
|
[MIT](LICENSE) — Donut Studio
|
|
146
|
-
|
package/bin/devlyn.js
CHANGED
|
@@ -7,6 +7,7 @@ const { execSync } = require('child_process');
|
|
|
7
7
|
|
|
8
8
|
const CONFIG_SOURCE = path.join(__dirname, '..', 'config');
|
|
9
9
|
const OPTIONAL_SKILLS_SOURCE = path.join(__dirname, '..', 'optional-skills');
|
|
10
|
+
const OPTIONAL_COMMANDS_SOURCE = path.join(__dirname, '..', 'optional-commands');
|
|
10
11
|
const PKG = require('../package.json');
|
|
11
12
|
|
|
12
13
|
// Files removed in previous versions that should be cleaned up on upgrade
|
|
@@ -69,6 +70,8 @@ const OPTIONAL_ADDONS = [
|
|
|
69
70
|
{ name: 'prompt-engineering', desc: 'Claude 4 prompt optimization using Anthropic best practices', type: 'local' },
|
|
70
71
|
{ name: 'better-auth-setup', desc: 'Production-ready Better Auth + Hono + Drizzle + PostgreSQL auth setup', type: 'local' },
|
|
71
72
|
{ name: 'pyx-scan', desc: 'Check whether an AI agent skill is safe before installing', type: 'local' },
|
|
73
|
+
// Local optional commands (copied to .claude/commands/)
|
|
74
|
+
{ name: 'devlyn.pencil-sync', desc: 'Sync designs between codebase and Pencil (.pen files) via MCP', type: 'command' },
|
|
72
75
|
// External skill packs (installed via npx skills add)
|
|
73
76
|
{ name: 'vercel-labs/agent-skills', desc: 'React, Next.js, React Native best practices', type: 'external' },
|
|
74
77
|
{ name: 'supabase/agent-skills', desc: 'Supabase integration patterns', type: 'external' },
|
|
@@ -170,7 +173,9 @@ function listContents() {
|
|
|
170
173
|
// List optional addons
|
|
171
174
|
log('\n📦 Optional Addons:', 'blue');
|
|
172
175
|
OPTIONAL_ADDONS.forEach((addon) => {
|
|
173
|
-
const
|
|
176
|
+
const tagLabel = addon.type === 'command' ? 'cmd' : addon.type === 'local' ? 'skill' : 'pack';
|
|
177
|
+
const tagColor = addon.type === 'command' ? COLORS.green : addon.type === 'local' ? COLORS.magenta : COLORS.cyan;
|
|
178
|
+
const tag = `${tagColor}${tagLabel}${COLORS.reset}`;
|
|
174
179
|
log(` ${COLORS.green}${addon.name}${COLORS.reset} ${COLORS.dim}[${tag}${COLORS.dim}]${COLORS.reset}`);
|
|
175
180
|
log(` ${COLORS.dim}${addon.desc}${COLORS.reset}`);
|
|
176
181
|
});
|
|
@@ -232,7 +237,9 @@ function multiSelect(items) {
|
|
|
232
237
|
const checkbox = selected.has(i) ? `${COLORS.green}◉${COLORS.reset}` : `${COLORS.dim}○${COLORS.reset}`;
|
|
233
238
|
const pointer = i === cursor ? `${COLORS.cyan}❯${COLORS.reset}` : ' ';
|
|
234
239
|
const name = i === cursor ? `${COLORS.cyan}${item.name}${COLORS.reset}` : item.name;
|
|
235
|
-
const
|
|
240
|
+
const tagLabel = item.type === 'command' ? 'cmd' : item.type === 'local' ? 'skill' : 'pack';
|
|
241
|
+
const tagColor = item.type === 'command' ? COLORS.green : item.type === 'local' ? COLORS.magenta : COLORS.cyan;
|
|
242
|
+
const tag = `${tagColor}${tagLabel}${COLORS.reset}`;
|
|
236
243
|
console.log(`${pointer} ${checkbox} ${name} ${COLORS.dim}[${tag}${COLORS.dim}]${COLORS.reset}`);
|
|
237
244
|
console.log(` ${COLORS.dim}${item.desc}${COLORS.reset}`);
|
|
238
245
|
});
|
|
@@ -318,6 +325,30 @@ function installLocalSkill(skillName) {
|
|
|
318
325
|
return true;
|
|
319
326
|
}
|
|
320
327
|
|
|
328
|
+
function installLocalCommand(commandName) {
|
|
329
|
+
const src = path.join(OPTIONAL_COMMANDS_SOURCE, commandName);
|
|
330
|
+
const targetDir = getTargetDir();
|
|
331
|
+
const destDir = path.join(targetDir, 'commands');
|
|
332
|
+
|
|
333
|
+
if (!fs.existsSync(src)) {
|
|
334
|
+
log(` ⚠️ Command pack "${commandName}" not found`, 'yellow');
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
log(`\n📋 Installing ${commandName} commands...`, 'cyan');
|
|
339
|
+
|
|
340
|
+
if (!fs.existsSync(destDir)) {
|
|
341
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const files = fs.readdirSync(src).filter((f) => f.endsWith('.md'));
|
|
345
|
+
for (const file of files) {
|
|
346
|
+
fs.copyFileSync(path.join(src, file), path.join(destDir, file));
|
|
347
|
+
log(` → commands/${file}`, 'dim');
|
|
348
|
+
}
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
|
|
321
352
|
function installSkillPack(packName) {
|
|
322
353
|
try {
|
|
323
354
|
log(`\n📦 Installing ${packName}...`, 'cyan');
|
|
@@ -333,6 +364,9 @@ function installAddon(addon) {
|
|
|
333
364
|
if (addon.type === 'local') {
|
|
334
365
|
return installLocalSkill(addon.name);
|
|
335
366
|
}
|
|
367
|
+
if (addon.type === 'command') {
|
|
368
|
+
return installLocalCommand(addon.name);
|
|
369
|
+
}
|
|
336
370
|
return installSkillPack(addon.name);
|
|
337
371
|
}
|
|
338
372
|
|
|
@@ -385,9 +419,9 @@ async function init(skipPrompts = false) {
|
|
|
385
419
|
|
|
386
420
|
// Skip prompts if -y flag or non-interactive
|
|
387
421
|
if (skipPrompts || !process.stdin.isTTY) {
|
|
388
|
-
log('\n💡 Add optional
|
|
422
|
+
log('\n💡 Add optional addons later:', 'dim');
|
|
389
423
|
OPTIONAL_ADDONS.forEach((addon) => {
|
|
390
|
-
if (addon.type === 'local') {
|
|
424
|
+
if (addon.type === 'local' || addon.type === 'command') {
|
|
391
425
|
log(` npx devlyn-cli (select "${addon.name}" during install)`, 'dim');
|
|
392
426
|
} else {
|
|
393
427
|
log(` npx skills add ${addon.name}`, 'dim');
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Pull Pencil Design into Code
|
|
2
|
+
|
|
3
|
+
Implement the selected Pencil design in code with exact visual fidelity. Work through one component at a time, verifying each against the design before moving on.
|
|
4
|
+
|
|
5
|
+
<project_context>
|
|
6
|
+
- Next.js 16 + React 19, Server Components by default
|
|
7
|
+
- Custom CSS with CSS variables (no Tailwind) — tokens live in `src/app/globals.css`
|
|
8
|
+
- Three visual zones, each with its own CSS file and class prefix:
|
|
9
|
+
- Marketing (`marketing.css`) — cinematic, descriptive class names
|
|
10
|
+
- Auth (`auth.css`) — minimal, `auth-` prefix
|
|
11
|
+
- Dashboard (`dashboard.css`) — functional, `dash-` prefix
|
|
12
|
+
- Design system reference: `docs/design-system.md`
|
|
13
|
+
</project_context>
|
|
14
|
+
|
|
15
|
+
<goal>
|
|
16
|
+
The coded implementation should be visually indistinguishable from the Pencil design. Small discrepancies — a few pixels of padding, a slightly different font weight, a missing border-radius — compound across components and produce a result that "looks off" even if no single difference is dramatic. Treat the Pencil design as the pixel-level specification and match it exactly.
|
|
17
|
+
|
|
18
|
+
The only areas where interpretation is needed:
|
|
19
|
+
- Interactive states (hover, focus, active) — Pencil can't represent these, so follow existing patterns in the codebase
|
|
20
|
+
- Responsive behavior — implement following existing responsive patterns
|
|
21
|
+
- Dynamic content — use the design's placeholder text for empty states
|
|
22
|
+
</goal>
|
|
23
|
+
|
|
24
|
+
## How to approach this
|
|
25
|
+
|
|
26
|
+
<setup>
|
|
27
|
+
Before writing any code, gather context:
|
|
28
|
+
1. Call `get_editor_state(include_schema: true)` to see the active .pen file and current selection. If the user has selected a frame, that's your target. If not, ask which frame/screen to implement.
|
|
29
|
+
2. Call `get_guidelines(topic: "code")` for Pencil's code generation rules. These supplement the project-specific conventions below.
|
|
30
|
+
3. Call `get_variables` to extract design tokens. Map each Pencil variable to its CSS custom property in `globals.css`. If new variables exist in Pencil that aren't in the CSS yet, add them to `globals.css` following the existing naming convention.
|
|
31
|
+
|
|
32
|
+
Design tokens flow: `Pencil variables → globals.css custom properties → Component CSS`. This chain keeps design and code in sync, so use CSS variables rather than hardcoding values.
|
|
33
|
+
</setup>
|
|
34
|
+
|
|
35
|
+
<implementation>
|
|
36
|
+
Work through components one at a time rather than attempting the full screen at once. This matters because verifying a single component is quick and reliable, while trying to verify an entire screen introduces too many variables — you can't tell which component introduced a discrepancy.
|
|
37
|
+
|
|
38
|
+
For each component:
|
|
39
|
+
|
|
40
|
+
**1. Read the design thoroughly**
|
|
41
|
+
Use `batch_get` with the component's node ID (`readDepth: 10`, `resolveVariables: true`) to get the complete tree. For components with SVGs, also set `includePathGeometry: true`. If it's a reusable component, read its instances too — they often override text, colors, or child visibility.
|
|
42
|
+
|
|
43
|
+
**2. Screenshot as ground truth**
|
|
44
|
+
Call `get_screenshot` on the component. Study the screenshot carefully — this is your specification. Note exact spacing, font sizes, colors, borders, shadows, border-radius, alignment, and text content.
|
|
45
|
+
|
|
46
|
+
**3. Check for existing code**
|
|
47
|
+
Search `src/components/` and `src/app/` for matching component names or CSS classes. If the component already exists, update it. Creating a duplicate leads to divergence over time.
|
|
48
|
+
|
|
49
|
+
**4. Implement**
|
|
50
|
+
Match every visual property from the design:
|
|
51
|
+
- Layout: flex direction, gap, padding, margin, alignment
|
|
52
|
+
- Sizing: exact width/height, `fill_container` → `width: 100%` or `flex: 1`, `fit_content` → `width: fit-content`
|
|
53
|
+
- Colors: map to CSS custom properties (`var(--bg-deep)`, `var(--accent)`, etc.)
|
|
54
|
+
- Typography: font-family, font-size, font-weight, line-height, letter-spacing, color
|
|
55
|
+
- Borders: width, color, radius (map to `var(--radius-*)`)
|
|
56
|
+
- Effects: box-shadow, opacity, backdrop-filter
|
|
57
|
+
- Text content: copy exactly, character for character
|
|
58
|
+
- Icons: match the icon, size, and color
|
|
59
|
+
|
|
60
|
+
When updating existing components, preserve all event handlers, state management, and data flow. Only change visual/layout properties.
|
|
61
|
+
|
|
62
|
+
**5. Verify**
|
|
63
|
+
Take another `get_screenshot` and compare. Check: are colors identical (not close)? Are font sizes and weights exact? Is spacing pixel-accurate? Are border-radius values correct? Is text character-for-character? Are all child elements present (count them)?
|
|
64
|
+
|
|
65
|
+
Fix any difference before moving to the next component.
|
|
66
|
+
|
|
67
|
+
**6. Report**
|
|
68
|
+
State what file was created/modified, list any new CSS variables added, and note any design decisions that required interpretation.
|
|
69
|
+
</implementation>
|
|
70
|
+
|
|
71
|
+
<integration_check>
|
|
72
|
+
After all components are implemented, verify the page-level layout:
|
|
73
|
+
- Use `batch_get` to read the complete target frame with full depth
|
|
74
|
+
- Check component ordering, spacing between components, and overall structure
|
|
75
|
+
- Use `snapshot_layout` to compare Pencil's computed layout rectangles against the CSS layout
|
|
76
|
+
</integration_check>
|
|
77
|
+
|
|
78
|
+
<examples>
|
|
79
|
+
|
|
80
|
+
**Example: Pulling a dashboard card component**
|
|
81
|
+
|
|
82
|
+
The Pencil design shows a card with `cornerRadius: 16` (maps to `var(--radius-md)`), `fill: $bg-deep`, `padding: 24`, and a title text in Space Grotesk at 14px/600. The `batch_get` output shows:
|
|
83
|
+
```
|
|
84
|
+
{type: "frame", cornerRadius: 16, fill: "$bg-deep", padding: 24, layout: "vertical", gap: 12,
|
|
85
|
+
children: [{type: "text", content: "Active Projects", fontFamily: "Space Grotesk", fontSize: 14, fontWeight: 600}]}
|
|
86
|
+
```
|
|
87
|
+
Search code → find `.dash-card` in `dashboard.css`. Update it:
|
|
88
|
+
```css
|
|
89
|
+
.dash-card {
|
|
90
|
+
background: var(--bg-deep);
|
|
91
|
+
border-radius: var(--radius-md);
|
|
92
|
+
padding: 24px;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: 12px;
|
|
96
|
+
}
|
|
97
|
+
.dash-card h3 {
|
|
98
|
+
font-family: var(--space);
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Example: Pulling a component with instance overrides**
|
|
105
|
+
|
|
106
|
+
A button component is reusable in Pencil. The base definition has `content: "Button"` and `fill: "$accent"`. But the instance in this frame overrides `content: "Deploy Now"` and adds a `descendants` override hiding an icon child. You need to:
|
|
107
|
+
1. Read both the base component and this specific instance
|
|
108
|
+
2. Implement the component with the overridden text "Deploy Now"
|
|
109
|
+
3. Respect the hidden icon — don't render it in this usage
|
|
110
|
+
4. Screenshot-verify the result matches the instance, not the base
|
|
111
|
+
|
|
112
|
+
</examples>
|
|
113
|
+
|
|
114
|
+
## Pencil MCP tools you'll use
|
|
115
|
+
|
|
116
|
+
| Task | Tool | Key Params |
|
|
117
|
+
|------|------|-----------|
|
|
118
|
+
| Check what's open | `get_editor_state` | `include_schema: true` |
|
|
119
|
+
| Read design nodes | `batch_get` | `readDepth`, `resolveVariables`, `includePathGeometry` |
|
|
120
|
+
| Take screenshot | `get_screenshot` | `nodeId` |
|
|
121
|
+
| Check layout | `snapshot_layout` | `maxDepth` |
|
|
122
|
+
| Get design tokens | `get_variables` | — |
|
|
123
|
+
| Get code guidelines | `get_guidelines` | `topic: "code"` |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Push Codebase Design to Pencil
|
|
2
|
+
|
|
3
|
+
Read the current UI implementation and recreate it as a matching design in Pencil, so the .pen canvas accurately reflects what's live in code.
|
|
4
|
+
|
|
5
|
+
<project_context>
|
|
6
|
+
- Next.js 16 + React 19, Server Components by default
|
|
7
|
+
- Custom CSS with CSS variables (no Tailwind) — tokens live in `src/app/globals.css`
|
|
8
|
+
- Three visual zones, each with its own CSS file and class prefix:
|
|
9
|
+
- Marketing (`marketing.css`) — cinematic, descriptive class names
|
|
10
|
+
- Auth (`auth.css`) — minimal, `auth-` prefix
|
|
11
|
+
- Dashboard (`dashboard.css`) — functional, `dash-` prefix
|
|
12
|
+
- Design system reference: `docs/design-system.md`
|
|
13
|
+
</project_context>
|
|
14
|
+
|
|
15
|
+
<goal>
|
|
16
|
+
The Pencil file should be a faithful mirror of the coded UI. When someone opens the .pen file, they should see exactly what the live site looks like — same colors, spacing, typography, radii, and component structure. This matters because the .pen file becomes the source of truth for future design iterations: if it drifts from code, every subsequent design change will introduce unintended differences.
|
|
17
|
+
</goal>
|
|
18
|
+
|
|
19
|
+
## How to approach this
|
|
20
|
+
|
|
21
|
+
<setup>
|
|
22
|
+
Start by understanding the current state:
|
|
23
|
+
1. Call `get_editor_state(include_schema: true)` to see if a .pen file is already open. If not, either create one with `open_document("new")` or ask which .pen file to target.
|
|
24
|
+
2. Read the codebase's design tokens from `src/app/globals.css` and `docs/design-system.md`. Also read the zone-specific CSS file for whichever zone the user wants to push.
|
|
25
|
+
3. Sync tokens into Pencil: use `get_variables` to check what exists, then `set_variables` to create/update variables matching the CSS custom properties (colors, radii, fonts). Use Pencil variables throughout — this keeps themes connected between code and Pencil.
|
|
26
|
+
</setup>
|
|
27
|
+
|
|
28
|
+
<implementation>
|
|
29
|
+
Work through each component or section one at a time rather than trying to build the entire page in one pass. Building incrementally lets you verify each piece against the code before moving on, which prevents small errors from compounding into large drift.
|
|
30
|
+
|
|
31
|
+
For each component:
|
|
32
|
+
1. Read the `.tsx` file and its CSS to understand layout, children, and styles
|
|
33
|
+
2. Build the matching frame structure in Pencil using `batch_design` (max 25 operations per call)
|
|
34
|
+
3. Apply styles using Pencil variables — match exact pixel values from CSS for spacing, font sizes, border-radius, etc.
|
|
35
|
+
4. Take a `get_screenshot` and compare against the coded version
|
|
36
|
+
5. Fix any discrepancies before moving on
|
|
37
|
+
|
|
38
|
+
Name Pencil frames and nodes to match CSS class names or React component names. This makes it easy to trace between code and design later.
|
|
39
|
+
</implementation>
|
|
40
|
+
|
|
41
|
+
<examples>
|
|
42
|
+
|
|
43
|
+
**Example: Pushing a dashboard sidebar**
|
|
44
|
+
|
|
45
|
+
The sidebar component lives at `src/components/dashboard/Sidebar.tsx` with styles in `dashboard.css` using `.dash-sidebar`. You would:
|
|
46
|
+
1. Read both files to extract: width (280px via `--sidebar-width`), background color (`var(--bg-deep)`), flex layout (vertical, gap), and all child nav items
|
|
47
|
+
2. Create a frame in Pencil with `width: 280`, `fill: $bg-deep`, `layout: vertical`, matching gap/padding
|
|
48
|
+
3. Add child text nodes and icon frames matching each nav link
|
|
49
|
+
4. Screenshot and verify dimensions, colors, and text content match
|
|
50
|
+
|
|
51
|
+
**Example: Pushing a glass panel component**
|
|
52
|
+
|
|
53
|
+
The `.glass-panel` class in `globals.css` has `border-radius: var(--radius-3xl)` (44px), `backdrop-filter: blur(20px)`, and a liquid highlight. You would:
|
|
54
|
+
1. Create a frame with `cornerRadius: 44`, matching the backdrop-filter effect as closely as Pencil supports
|
|
55
|
+
2. Use the `$glass-bg` variable for background
|
|
56
|
+
3. Verify the panel looks visually consistent with the coded version
|
|
57
|
+
|
|
58
|
+
</examples>
|
|
59
|
+
|
|
60
|
+
## Pencil MCP tools you'll use
|
|
61
|
+
|
|
62
|
+
| Task | Tool | Key Params |
|
|
63
|
+
|------|------|-----------|
|
|
64
|
+
| Check what's open | `get_editor_state` | `include_schema: true` |
|
|
65
|
+
| Open/create .pen file | `open_document` | `"new"` or file path |
|
|
66
|
+
| Read design nodes | `batch_get` | `readDepth`, `searchDepth` |
|
|
67
|
+
| Take screenshot | `get_screenshot` | `nodeId` |
|
|
68
|
+
| Check layout | `snapshot_layout` | `maxDepth` |
|
|
69
|
+
| Get/set design tokens | `get_variables` / `set_variables` | — |
|
|
70
|
+
| Build design | `batch_design` | operations string (max 25 ops) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devlyn-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Claude Code configuration toolkit for teams",
|
|
5
5
|
"bin": {
|
|
6
6
|
"devlyn": "bin/devlyn.js"
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
10
10
|
"config",
|
|
11
|
+
"optional-commands",
|
|
11
12
|
"optional-skills",
|
|
12
13
|
"CLAUDE.md"
|
|
13
14
|
],
|