Add Kiro provider support, clean up legacy code and unused ZIPs

- Add Kiro transformer and build integration (.kiro/skills/ structure)
- Add Kiro to validation allowlists, API handlers, and homepage badge
- Replace legacy getFilePath in Vercel API with unified skills directory structure
- Remove individual provider ZIP creation (only universal ZIPs needed)
- Simplify bundle API allowlist to universal/universal-prefixed only

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-03-05 10:33:51 -08:00
co-authored by Claude Opus 4.6
parent cb596b538e
commit 4ff4f4643a
13 changed files with 114 additions and 3975 deletions
+7 -5
View File
@@ -71,7 +71,7 @@ For each issue, document:
- **Impact**: How it affects users
- **WCAG/Standard**: Which standard it violates (if applicable)
- **Recommendation**: How to fix it
- **Suggested command**: Which command to use (e.g., `/normalize`, `/optimize`, `/harden`)
- **Suggested command**: Which command to use (prefer: /animate, /quieter, /optimize, /adapt, /clarify, /distill, /delight, /onboard, /normalize, /audit, /harden, /polish, /extract, /bolder, /critique, /colorize — or other installed skills you're sure exist)
#### Critical Issues
[Issues that block core functionality or violate WCAG A]
@@ -108,10 +108,12 @@ Create actionable plan:
### Suggested Commands for Fixes
Map issues to appropriate commands:
- "Use `/normalize` to align components with design system (addresses 23 theming issues)"
- "Use `/optimize` to improve performance (addresses 12 performance issues)"
- "Use `/harden` to improve i18n and text handling (addresses 8 edge cases)"
Map issues to available commands. Prefer these: /animate, /quieter, /optimize, /adapt, /clarify, /distill, /delight, /onboard, /normalize, /audit, /harden, /polish, /extract, /bolder, /critique, /colorize. You may also suggest other installed skills you're sure exist, but never invent commands.
Examples:
- "Use `/normalize` to align with design system (addresses N theming issues)"
- "Use `/optimize` to improve performance (addresses N performance issues)"
- "Use `/harden` to improve resilience (addresses N edge cases)"
**IMPORTANT**: Be thorough but actionable. Too many low-priority issues creates noise. Focus on what actually matters.
+1 -1
View File
@@ -98,7 +98,7 @@ For each issue:
- **What**: Name the problem clearly
- **Why it matters**: How this hurts users or undermines goals
- **Fix**: What to do about it (be concrete)
- **Command**: Which command to use (`/polish`, `/distill`, `/bolder`, `/quieter`, etc.)
- **Command**: Which command to use (prefer: /animate, /quieter, /optimize, /adapt, /clarify, /distill, /delight, /onboard, /normalize, /audit, /harden, /polish, /extract, /bolder, /critique, /colorize — or other installed skills you're sure exist)
### Minor Observations
Quick notes on smaller issues worth addressing.
+17 -22
View File
@@ -6,37 +6,32 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const PROJECT_ROOT = join(__dirname, "../../../..");
const PROVIDER_CONFIG_DIRS = {
'cursor': '.cursor',
'claude-code': '.claude',
'gemini': '.gemini',
'codex': '.codex',
'agents': '.agents',
'kiro': '.kiro',
};
function getFilePath(type, provider, id) {
const distDir = join(PROJECT_ROOT, "dist");
if (type === "skill") {
if (provider === "cursor") {
return join(distDir, "cursor", ".cursor", "rules", `${id}.md`);
} else if (provider === "claude-code") {
return join(distDir, "claude-code", ".claude", "skills", id, "SKILL.md");
} else if (provider === "gemini") {
return join(distDir, "gemini", `GEMINI.${id}.md`);
} else if (provider === "codex") {
return join(distDir, "codex", `AGENTS.${id}.md`);
}
} else if (type === "command") {
if (provider === "cursor") {
return join(distDir, "cursor", ".cursor", "commands", `${id}.md`);
} else if (provider === "claude-code") {
return join(distDir, "claude-code", ".claude", "commands", `${id}.md`);
} else if (provider === "gemini") {
return join(distDir, "gemini", ".gemini", "commands", `${id}.toml`);
} else if (provider === "codex") {
return join(distDir, "codex", ".codex", "prompts", `${id}.md`);
}
const configDir = PROVIDER_CONFIG_DIRS[provider];
if (!configDir) return null;
if (type === "skill" || type === "command") {
return join(distDir, provider, configDir, "skills", id, "SKILL.md");
}
return null;
}
const VALID_ID = /^[a-zA-Z0-9_-]+$/;
const ALLOWED_PROVIDERS = [
'cursor', 'claude-code', 'gemini', 'codex', 'agents', 'universal',
'cursor-prefixed', 'claude-code-prefixed', 'gemini-prefixed', 'codex-prefixed', 'agents-prefixed', 'universal-prefixed',
'cursor', 'claude-code', 'gemini', 'codex', 'agents', 'kiro',
'universal', 'universal-prefixed',
];
export default function handler(req, res) {
+1 -2
View File
@@ -7,8 +7,7 @@ const __dirname = dirname(__filename);
const PROJECT_ROOT = join(__dirname, "../../..");
const ALLOWED_PROVIDERS = [
'cursor', 'claude-code', 'gemini', 'codex', 'agents', 'universal',
'cursor-prefixed', 'claude-code-prefixed', 'gemini-prefixed', 'codex-prefixed', 'agents-prefixed', 'universal-prefixed',
'universal', 'universal-prefixed',
];
export default function handler(req, res) {
+1 -3920
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -281,6 +281,10 @@
<img src="https://img.logo.dev/antigravity.google?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Antigravity" width="20" height="20" loading="lazy">
<span>Antigravity</span>
</div>
<div class="install-provider-badge">
<img src="https://img.logo.dev/kiro.dev?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Kiro" width="20" height="20" loading="lazy">
<span>Kiro</span>
</div>
</div>
</div>
+6 -1
View File
@@ -23,7 +23,8 @@ import {
transformClaudeCode,
transformGemini,
transformCodex,
transformAgents
transformAgents,
transformKiro
} from './lib/transformers/index.js';
import { createAllZips } from './lib/zip.js';
import { execSync } from 'child_process';
@@ -144,6 +145,7 @@ function assembleUniversal(distDir, suffix = '') {
{ provider: 'gemini', configDir: '.gemini' },
{ provider: 'codex', configDir: '.codex' },
{ provider: 'agents', configDir: '.agents' },
{ provider: 'kiro', configDir: '.kiro' },
];
for (const { provider, configDir } of providerMappings) {
@@ -168,6 +170,7 @@ This folder contains skills for all supported tools:
.gemini/ → Gemini CLI
.codex/ → Codex CLI
.agents/ → VS Code Copilot, Antigravity
.kiro/ → Kiro
To install, copy the relevant folder(s) into your project root.
These are hidden folders (dotfiles) — press Cmd+Shift+. in Finder to see them.
@@ -211,6 +214,7 @@ async function build() {
transformGemini(skills, DIST_DIR, patterns);
transformCodex(skills, DIST_DIR, patterns);
transformAgents(skills, DIST_DIR, patterns);
transformKiro(skills, DIST_DIR, patterns);
// Transform for each provider (prefixed with i-)
const prefixOptions = { prefix: 'i-', outputSuffix: '-prefixed' };
@@ -219,6 +223,7 @@ async function build() {
transformGemini(skills, DIST_DIR, patterns, prefixOptions);
transformCodex(skills, DIST_DIR, patterns, prefixOptions);
transformAgents(skills, DIST_DIR, patterns, prefixOptions);
transformKiro(skills, DIST_DIR, patterns, prefixOptions);
// Assemble universal directory (unprefixed and prefixed)
assembleUniversal(DIST_DIR);
+1
View File
@@ -3,3 +3,4 @@ export { transformClaudeCode } from './claude-code.js';
export { transformGemini } from './gemini.js';
export { transformCodex } from './codex.js';
export { transformAgents } from './agents.js';
export { transformKiro } from './kiro.js';
+65
View File
@@ -0,0 +1,65 @@
import path from 'path';
import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders, prefixSkillReferences } from '../utils.js';
/**
* Kiro Transformer (Skills Only)
*
* All skills output to .kiro/skills/{name}/SKILL.md
* Frontmatter: name, description, license, compatibility, metadata
*
* @param {Array} skills - All skills (including user-invokable ones)
* @param {string} distDir - Distribution output directory
* @param {Object} patterns - Design patterns data (unused)
* @param {Object} options - Optional settings
* @param {string} options.prefix - Prefix to add to skill names (e.g., 'i-')
* @param {string} options.outputSuffix - Suffix for output directory (e.g., '-prefixed')
*/
export function transformKiro(skills, distDir, patterns = null, options = {}) {
const { prefix = '', outputSuffix = '' } = options;
const kiroDir = path.join(distDir, `kiro${outputSuffix}`);
const skillsDir = path.join(kiroDir, '.kiro/skills');
cleanDir(kiroDir);
ensureDir(skillsDir);
const allSkillNames = skills.map(s => s.name);
const commandNames = skills.filter(s => s.userInvokable).map(s => `${prefix}${s.name}`);
let refCount = 0;
for (const skill of skills) {
const skillName = `${prefix}${skill.name}`;
const skillDir = path.join(skillsDir, skillName);
const frontmatterObj = {
name: skillName,
description: skill.description,
};
if (skill.license) frontmatterObj.license = skill.license;
if (skill.compatibility) frontmatterObj.compatibility = skill.compatibility;
if (skill.metadata) frontmatterObj.metadata = skill.metadata;
const frontmatter = generateYamlFrontmatter(frontmatterObj);
let skillBody = replacePlaceholders(skill.body, 'kiro', commandNames);
if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames);
const content = `${frontmatter}\n\n${skillBody}`;
const outputPath = path.join(skillDir, 'SKILL.md');
writeFile(outputPath, content);
// Copy reference files if they exist
if (skill.references && skill.references.length > 0) {
const refDir = path.join(skillDir, 'reference');
ensureDir(refDir);
for (const ref of skill.references) {
const refOutputPath = path.join(refDir, `${ref.name}.md`);
const refContent = replacePlaceholders(ref.content, 'kiro', commandNames);
writeFile(refOutputPath, refContent);
refCount++;
}
}
}
const userInvokableCount = skills.filter(s => s.userInvokable).length;
const refInfo = refCount > 0 ? ` (${refCount} reference files)` : '';
const prefixInfo = prefix ? ` [${prefix}prefixed]` : '';
console.log(`✓ Kiro${prefixInfo}: ${skills.length} skills (${userInvokableCount} user-invokable)${refInfo}`);
}
+5
View File
@@ -288,6 +288,11 @@ export const PROVIDER_PLACEHOLDERS = {
model: 'the model',
config_file: '.github/copilot-instructions.md',
ask_instruction: 'ask the user directly to clarify what you cannot infer.'
},
'kiro': {
model: 'Claude',
config_file: '.kiro/settings.json',
ask_instruction: 'ask the user directly to clarify what you cannot infer.'
}
};
+3 -22
View File
@@ -51,26 +51,7 @@ export async function createProviderZip(providerDir, distDir, providerName) {
export async function createAllZips(distDir) {
console.log('\n📦 Creating ZIP bundles...');
const providers = ['cursor', 'claude-code', 'gemini', 'codex', 'agents'];
// Create unprefixed ZIPs
for (const provider of providers) {
const providerDir = path.join(distDir, provider);
await createProviderZip(providerDir, distDir, provider);
}
// Create unprefixed universal ZIP
const universalDir = path.join(distDir, 'universal');
await createProviderZip(universalDir, distDir, 'universal');
// Create prefixed ZIPs
console.log(' --- prefixed variants ---');
for (const provider of providers) {
const providerDir = path.join(distDir, `${provider}-prefixed`);
await createProviderZip(providerDir, distDir, `${provider}-prefixed`);
}
// Create prefixed universal ZIP
const universalPrefixedDir = path.join(distDir, 'universal-prefixed');
await createProviderZip(universalPrefixedDir, distDir, 'universal-prefixed');
// Universal ZIPs (unprefixed + prefixed)
await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal');
await createProviderZip(path.join(distDir, 'universal-prefixed'), distDir, 'universal-prefixed');
}
+1
View File
@@ -77,6 +77,7 @@ export function getFilePath(type, provider, id) {
'gemini': '.gemini',
'codex': '.codex',
'agents': '.agents',
'kiro': '.kiro',
};
const configDir = providerPaths[provider];
+2 -2
View File
@@ -4,8 +4,8 @@
export const VALID_ID = /^[a-zA-Z0-9_-]+$/;
export const ALLOWED_PROVIDERS = [
'cursor', 'claude-code', 'gemini', 'codex', 'agents', 'universal',
'cursor-prefixed', 'claude-code-prefixed', 'gemini-prefixed', 'codex-prefixed', 'agents-prefixed', 'universal-prefixed',
'cursor', 'claude-code', 'gemini', 'codex', 'agents', 'kiro',
'universal', 'universal-prefixed',
];
export const ALLOWED_TYPES = ['skill', 'command'];