feat: add OpenCode, Slate, and Cursor host configs

Three new hosts added to the declarative config system. Each is a typed
HostConfig object with paths, frontmatter rules, and path rewrites.
All generate valid SKILL.md output with zero .claude/skills path leakage.

- hosts/opencode.ts: OpenCode (opencode.ai), skills at ~/.config/opencode/
- hosts/slate.ts: Slate (Random Labs), skills at ~/.slate/
- hosts/cursor.ts: Cursor, skills at ~/.cursor/
- .gitignore: add .kiro/, .opencode/, .slate/, .cursor/, .openclaw/

Zero code changes needed — just config files + re-export in index.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-03 16:33:54 -07:00
parent 9ac662f6d2
commit 8b5256342b
5 changed files with 148 additions and 2 deletions
+5
View File
@@ -7,6 +7,11 @@ bin/gstack-global-discover
.claude/skills/
.agents/
.factory/
.kiro/
.opencode/
.slate/
.cursor/
.openclaw/
.context/
extension/.auth.json
.gstack-worktrees/
+46
View File
@@ -0,0 +1,46 @@
import type { HostConfig } from '../scripts/host-config';
const cursor: HostConfig = {
name: 'cursor',
displayName: 'Cursor',
cliCommand: 'cursor',
cliAliases: [],
globalRoot: '.cursor/skills/gstack',
localSkillRoot: '.cursor/skills/gstack',
hostSubdir: '.cursor',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.cursor/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.cursor/skills/gstack' },
{ from: '.claude/skills', to: '.cursor/skills' },
],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
learningsMode: 'basic',
};
export default cursor;
+5 -2
View File
@@ -10,9 +10,12 @@ import claude from './claude';
import codex from './codex';
import factory from './factory';
import kiro from './kiro';
import opencode from './opencode';
import slate from './slate';
import cursor from './cursor';
/** All registered host configs. Add new hosts here. */
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro];
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor];
/** Map from host name to config. */
export const HOST_CONFIG_MAP: Record<string, HostConfig> = Object.fromEntries(
@@ -59,4 +62,4 @@ export function getExternalHosts(): HostConfig[] {
}
// Re-export individual configs for direct import
export { claude, codex, factory, kiro };
export { claude, codex, factory, kiro, opencode, slate, cursor };
+46
View File
@@ -0,0 +1,46 @@
import type { HostConfig } from '../scripts/host-config';
const opencode: HostConfig = {
name: 'opencode',
displayName: 'OpenCode',
cliCommand: 'opencode',
cliAliases: [],
globalRoot: '.config/opencode/skills/gstack',
localSkillRoot: '.opencode/skills/gstack',
hostSubdir: '.opencode',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.config/opencode/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.opencode/skills/gstack' },
{ from: '.claude/skills', to: '.opencode/skills' },
],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
learningsMode: 'basic',
};
export default opencode;
+46
View File
@@ -0,0 +1,46 @@
import type { HostConfig } from '../scripts/host-config';
const slate: HostConfig = {
name: 'slate',
displayName: 'Slate',
cliCommand: 'slate',
cliAliases: [],
globalRoot: '.slate/skills/gstack',
localSkillRoot: '.slate/skills/gstack',
hostSubdir: '.slate',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.slate/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.slate/skills/gstack' },
{ from: '.claude/skills', to: '.slate/skills' },
],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
learningsMode: 'basic',
};
export default slate;