Compare commits

...

1 Commits

Author SHA1 Message Date
centdix
6717341518 generate skills in plugin skills folder 2026-02-09 10:39:59 +00:00
9 changed files with 92 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
The Windmill CLI (`wmill`) provides commands for managing scripts, flows, apps, and other resources.
Current version: 1.624.0
Current version: 1.628.3
## Global Options
@@ -387,7 +387,8 @@ workspace related commands
- `--create-username <username:string>` - Specify your own username in the newly created workspace. Ignored if --create is not specified, the workspace already exists or automatic username creation is enabled on the instance.
- `workspace remove <workspace_name:string>` - Remove a workspace
- `workspace whoami` - Show the currently active user
- `workspace list` - List workspaces on the remote server that you have access to
- `workspace list` - List local workspace profiles
- `workspace list-remote` - List workspaces on the remote server that you have access to
- `workspace bind` - Bind the current Git branch to the active workspace
- `--branch <branch:string>` - Specify branch (defaults to current)
- `workspace unbind` - Remove workspace binding from the current Git branch

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -17,6 +17,14 @@ properties:
items:
type: string
description: Array of Kafka topic names to subscribe to
filters:
type: array
items:
type: object
properties:
key:
type: string
value: {}
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
@@ -64,3 +72,4 @@ required:
- kafka_resource_path
- group_id
- topics
- filters

View File

@@ -7,7 +7,7 @@ description: MUST use when using the CLI.
The Windmill CLI (`wmill`) provides commands for managing scripts, flows, apps, and other resources.
Current version: 1.624.0
Current version: 1.628.3
## Global Options
@@ -392,7 +392,8 @@ workspace related commands
- `--create-username <username:string>` - Specify your own username in the newly created workspace. Ignored if --create is not specified, the workspace already exists or automatic username creation is enabled on the instance.
- `workspace remove <workspace_name:string>` - Remove a workspace
- `workspace whoami` - Show the currently active user
- `workspace list` - List workspaces on the remote server that you have access to
- `workspace list` - List local workspace profiles
- `workspace list-remote` - List workspaces on the remote server that you have access to
- `workspace bind` - Bind the current Git branch to the active workspace
- `--branch <branch:string>` - Specify branch (defaults to current)
- `workspace unbind` - Remove workspace binding from the current Git branch

File diff suppressed because one or more lines are too long

View File

@@ -35,6 +35,7 @@ from utils import (
CLI_GUIDANCE_DIR,
CLI_MAIN,
CLI_COMMANDS_DIR,
PLUGIN_SKILLS_DIR,
# Language metadata
LANGUAGE_METADATA,
TS_SDK_LANGUAGES,
@@ -904,6 +905,56 @@ def generate_skills_ts_export(skills: list[str], schema_yaml_content: dict[str,
return ts
def generate_plugin_skills(skills: list[str], schema_yaml_content: dict[str, str]) -> int:
"""Generate fully-assembled skill files for the Claude plugin.
Replicates what `wmill init` does: writes each skill's SKILL.md content,
and for skills with schema mappings (triggers, schedules), appends the
formatted schema YAML.
Args:
skills: List of skill names that were generated.
schema_yaml_content: Dict mapping schema keys (e.g., 'http_trigger') to YAML content.
Returns:
Number of skills written.
"""
print("Generating plugin skill files...")
PLUGIN_SKILLS_DIR.mkdir(parents=True, exist_ok=True)
count = 0
for skill_name in skills:
skill_source = OUTPUT_SKILLS_DIR / skill_name / "SKILL.md"
if not skill_source.exists():
print(f" Warning: Skill source not found for '{skill_name}', skipping")
continue
content = skill_source.read_text()
# Append schemas for skills that have schema mappings (mirrors init.ts logic)
if skill_name in SCHEMA_MAPPINGS:
schema_docs = []
for schema_name, file_suffix in SCHEMA_MAPPINGS[skill_name]:
schema_yaml = schema_yaml_content.get(file_suffix)
if schema_yaml:
schema_docs.append(
f"## {schema_name} (`*.{file_suffix}.yaml`)\n\n"
f"Must be a YAML file that adheres to the following schema:\n\n"
f"```yaml\n{schema_yaml.strip()}\n```"
)
if schema_docs:
content = content + "\n\n" + "\n\n".join(schema_docs)
plugin_skill_dir = PLUGIN_SKILLS_DIR / skill_name
plugin_skill_dir.mkdir(parents=True, exist_ok=True)
(plugin_skill_dir / "SKILL.md").write_text(content)
count += 1
print(f" Generated {count} plugin skills in {PLUGIN_SKILLS_DIR}")
return count
# =============================================================================
# Main Entry Point
# =============================================================================
@@ -1097,6 +1148,9 @@ export function getFlowPrompt(): string {
skills_ts = generate_skills_ts_export(skills, schema_yaml_content)
(CLI_GUIDANCE_DIR / "skills.ts").write_text(skills_ts)
# Generate fully-assembled skills for Claude plugin
plugin_skills_count = generate_plugin_skills(skills, schema_yaml_content)
print(f"\nGenerated files:")
print(f" - auto-generated/sdks/typescript.md")
print(f" - auto-generated/sdks/python.md")
@@ -1109,6 +1163,8 @@ export function getFlowPrompt(): string {
print(f" - auto-generated/schemas/ ({len(schema_yaml_content)} schema files)")
print(f"\nGenerated for CLI:")
print(f" - cli/src/guidance/skills.ts")
print(f"\nGenerated for Claude plugin:")
print(f" - windmill-claude-plugin/.../skills/ ({plugin_skills_count} skills)")
print("\nDone!")

View File

@@ -32,6 +32,8 @@ OUTPUT_CLI_DIR = SCRIPT_DIR / "auto-generated" / "cli"
OUTPUT_SKILLS_DIR = SCRIPT_DIR / "auto-generated" / "skills"
OUTPUT_SCHEMAS_DIR = SCRIPT_DIR / "auto-generated" / "schemas"
PLUGIN_SKILLS_DIR = ROOT_DIR.parent / "windmill-claude-plugin" / ".claude-plugin" / "plugins" / "windmill-code-plugin" / "skills"
# =============================================================================
# Schema Mappings for Triggers and Schedules
# =============================================================================