Compare commits

...
4 Commits
Author SHA1 Message Date
Alexander 232f201dfa fix(plugin): register all 7 skills in the Claude Code plugin (#385)
Two issues caused Claude Code plugin users to see only 1 (or 0) of the
7 bundled skills:

- .claude-plugin/plugin.json declared `"skills": ["./.claude/skills/ui-ux-pro-max"]`
  — an array pointing at a single subfolder. With a marketplace-root
  source this replaces the default scan, so the other 6 skills never
  load. Point it at the parent directory ("./.claude/skills/") so the
  loader scans all 7 <name>/SKILL.md subfolders. (#360)

- The 6 sub-skill SKILL.md `name:` fields kept a `ckm-` prefix
  (e.g. `ckm-brand` in dir `brand`) that no longer matched their
  directory names, tripping loaders that require name == directory.
  Strip the prefix so each name equals its folder. (#266)

Closes #360
Closes #266
2026-06-25 16:43:46 +07:00
Alexander 4ab70389b2 fix(cli): make uipro update upgrade CLI via npm
Approved by github-maintain cron-safe review. Supersedes #326.
2026-06-25 16:18:09 +07:00
AlexanderandYangKuoshih 3a12b63bd8 fix(scripts): guard persist_design_system against None project_name (#388)
persist_design_system crashed with AttributeError: 'NoneType' object has
no attribute 'lower' when the design_system dict carries an explicit
project_name of None (the default of generate(query, project_name=None)).
dict.get("project_name", "default") only substitutes the default for a
MISSING key, not a present-but-None value, so project_name.lower() blew
up.

Coalesce falsy values (None/""/missing) to "default" before slugifying.
Applied to both the source of truth and the bundled cli/assets copy.

The "search blindness" half of #159 (core.py tokenize length filter) is
already resolved on main (`len(w) >= 2`), so this targets the remaining
crash only.

Closes #159

Co-authored-by: YangKuoshih <155388493+YangKuoshih@users.noreply.github.com>
2026-06-25 15:43:33 +07:00
Alexander 57d9ba7989 fix(cli): replace stale data/scripts pointer files on install (#386)
On Windows, an older install (or a git checkout that materialized the
repo's symlinked data/scripts as plain "pointer" files) leaves a regular
file at <skill>/data or <skill>/scripts. copyDataAndScripts then calls
mkdir on that path, which throws EEXIST; under `uipro init --ai all` the
per-platform error is swallowed, leaving e.g. codex with the stale
pointer files and no real directories.

Add ensureCleanDir(): before mkdir, lstat the target and remove it if it
is not already a directory. Existing real directories are preserved
(re-install is unaffected). Verified with a repro harness.

Closes #237
2026-06-25 15:15:04 +07:00
12 changed files with 72 additions and 19 deletions
+1 -1
View File
@@ -7,5 +7,5 @@
},
"license": "MIT",
"keywords": ["ui", "ux", "design", "styles", "typography", "color-palette", "accessibility", "charts", "components"],
"skills": ["./.claude/skills/ui-ux-pro-max"]
"skills": "./.claude/skills/"
}
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-banner-design
name: banner-design
description: "Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills."
argument-hint: "[platform] [style] [dimensions]"
license: MIT
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-brand
name: brand
description: Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.
argument-hint: "[update|review|create] [args]"
metadata:
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-design-system
name: design-system
description: Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing/typography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.
argument-hint: "[component or token]"
license: MIT
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-design
name: design
description: "Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads."
argument-hint: "[design-type] [context]"
license: MIT
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-slides
name: slides
description: Create strategic HTML presentations with Chart.js, design tokens, responsive layouts, copywriting formulas, and contextual slide strategies.
argument-hint: "[topic] [slide-count]"
metadata:
+1 -1
View File
@@ -1,5 +1,5 @@
---
name: ckm-ui-styling
name: ui-styling
description: Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.
argument-hint: "[component or layout]"
license: MIT
+6 -4
View File
@@ -33,7 +33,7 @@ uipro init --force # Overwrite existing files
# Other commands
uipro versions # List available versions
uipro update # Refresh skill files from installed CLI package
uipro update # Update the global CLI to the latest release
```
## GitHub Authentication
@@ -63,13 +63,15 @@ uipro init
## How It Works
`uipro init` generates assistant-specific files from the templates bundled with the installed CLI package. To get newer templates and data, update the package first:
`uipro init` generates assistant-specific files from the templates bundled with the installed CLI package. To get newer templates and data, update the package, then regenerate:
```bash
npm install -g uipro-cli@latest
uipro init --ai codex
uipro update # updates the global CLI to the latest release
uipro init --ai codex --force # regenerate skill files from the new package
```
`uipro update` runs `npm install -g uipro-cli@latest` for you (it shells out to `npm` only on Windows, where `npm` is a `.cmd`). You can still run that command manually if you prefer. When the CLI is already current, `uipro update` just refreshes the installed skill files.
## Development
```bash
+3 -2
View File
@@ -573,8 +573,9 @@ def persist_design_system(design_system: dict, page: str = None, output_dir: str
"""
base_dir = Path(output_dir) if output_dir else Path.cwd()
# Use project name for project-specific folder
project_name = design_system.get("project_name", "default")
# Use project name for project-specific folder. Coalesce falsy values
# (missing key, explicit None, or "") so the .lower() below can't crash.
project_name = design_system.get("project_name") or "default"
project_slug = project_name.lower().replace(' ', '-')
design_system_dir = base_dir / "design-system" / project_slug
+33 -3
View File
@@ -1,3 +1,4 @@
import { execFileSync } from 'node:child_process';
import { readFile } from 'node:fs/promises';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -38,9 +39,38 @@ export async function updateCommand(options: UpdateOptions): Promise<void> {
if (currentVersion !== latestVersion) {
console.log();
logger.warn(`Installed CLI package is ${chalk.cyan(currentVersion)}, but latest release is ${chalk.cyan(release.tag_name)}.`);
logger.info(`Update the CLI package first: ${chalk.cyan(`npm install -g uipro-cli@${latestVersion}`)}`);
logger.info('Then rerun: uipro init --ai <platform>');
// Only auto-run with a well-formed semver, so nothing unexpected can
// reach the shell that npm.cmd requires on Windows.
if (!/^\d+\.\d+\.\d+([.-][0-9A-Za-z.-]+)?$/.test(latestVersion)) {
logger.warn(`Installed CLI is ${chalk.cyan(currentVersion)}; latest release is ${chalk.cyan(release.tag_name)}.`);
logger.info(`Update the CLI package: ${chalk.cyan(`npm install -g uipro-cli@${latestVersion}`)}`);
logger.info('Then rerun: uipro init --ai <platform> --force');
return;
}
logger.info(`Updating CLI from ${chalk.cyan(currentVersion)} to ${chalk.cyan(latestVersion)}...`);
console.log();
const isWindows = process.platform === 'win32';
try {
// execFileSync with an explicit args array — no shell string to expand.
// On Windows npm is npm.cmd, which Node only spawns via a shell.
execFileSync(
isWindows ? 'npm.cmd' : 'npm',
['install', '-g', `uipro-cli@${latestVersion}`],
{ stdio: 'inherit', shell: isWindows }
);
} catch {
console.log();
logger.error('Automatic update failed (you may need elevated/admin permissions).');
logger.info(`Update manually: ${chalk.cyan(`npm install -g uipro-cli@${latestVersion}`)}`);
process.exit(1);
}
console.log();
logger.success(`Updated to ${chalk.cyan(latestVersion)}.`);
logger.info(`Now rerun ${chalk.cyan('uipro init --ai <platform> --force')} to refresh your skill files.`);
return;
}
+20 -1
View File
@@ -1,4 +1,4 @@
import { readFile, mkdir, writeFile, cp, access, readdir } from 'node:fs/promises';
import { readFile, mkdir, writeFile, cp, access, readdir, lstat, rm } from 'node:fs/promises';
import { join, dirname } from 'node:path';
import { homedir } from 'node:os';
import { fileURLToPath } from 'node:url';
@@ -156,6 +156,23 @@ export async function renderSkillFile(config: PlatformConfig, isGlobal = false):
return frontmatter + content;
}
/**
* Replace a pre-existing non-directory at `path` so a real directory can be
* created there. Older CLI installs (and Windows checkouts of the repo's
* symlinked data/scripts) can leave plain "pointer" files at these paths;
* mkdir then throws EEXIST and the install silently leaves stale files.
*/
async function ensureCleanDir(path: string): Promise<void> {
try {
const stat = await lstat(path);
if (!stat.isDirectory()) {
await rm(path, { recursive: true, force: true });
}
} catch {
// Nothing exists at the path yet — mkdir will create it.
}
}
/**
* Copy data and scripts to target directory
*/
@@ -168,12 +185,14 @@ async function copyDataAndScripts(targetSkillDir: string): Promise<void> {
// Copy data
if (await exists(dataSource)) {
await ensureCleanDir(dataTarget);
await mkdir(dataTarget, { recursive: true });
await cp(dataSource, dataTarget, { recursive: true });
}
// Copy scripts
if (await exists(scriptsSource)) {
await ensureCleanDir(scriptsTarget);
await mkdir(scriptsTarget, { recursive: true });
await cp(scriptsSource, scriptsTarget, { recursive: true });
}
+3 -2
View File
@@ -573,8 +573,9 @@ def persist_design_system(design_system: dict, page: str = None, output_dir: str
"""
base_dir = Path(output_dir) if output_dir else Path.cwd()
# Use project name for project-specific folder
project_name = design_system.get("project_name", "default")
# Use project name for project-specific folder. Coalesce falsy values
# (missing key, explicit None, or "") so the .lower() below can't crash.
project_name = design_system.get("project_name") or "default"
project_slug = project_name.lower().replace(' ', '-')
design_system_dir = base_dir / "design-system" / project_slug