Skip to content
cccskills
FreePublished on GitHub

code-generator

Scaffolding für Scripts, Skills und Plugins aus Templates.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md4.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Code Generator

Scaffolding für neue OpenAmer-Scripts, Skills und Plugins aus eingebauten Templates. CLI-Tool mit 4 Modi, OPENAMER_TOOL-Konvention, Exit-Codes und JSON-Output.

Usage

# Hilfe
python scripts/code-generator.py --help

# 1) Script generieren
python scripts/code-generator.py --script mein-tool --desc "Mein neues Tool" [--cron 30min]

# 2) Skill generieren
python scripts/code-generator.py --skill mein-skill --desc "Mein neuer Skill" --category system

# 3) Plugin generieren
python scripts/code-generator.py --plugin mein-plugin --desc "Mein Desktop Plugin"

# 4) Templates auflisten
python scripts/code-generator.py --list
python scripts/code-generator.py --list --json

Modi

--script NAME

Generiert scripts/<name>.py mit:

  • Shebang (#!/usr/bin/env python3)
  • Docstring mit OPENAMER_TOOL-Konvention (Tool-Beschreibung, Exit-Codes, JSON-Output-Struktur)
  • Standard-Imports (argparse, json, os, sys, datetime, pathlib, typing)
  • OPENAMER_HOME-Pfadlogik
  • create_parser() mit --json, --verbose
  • run() Funktion
  • main() mit Error-Handling (ValueError → Exit 1, PermissionError → Exit 2, ImportError → Exit 3)
  • if __name__ == "__main__"-Guard
  • Optionaler Cron-Block (--cron 30min → 1800s Intervall)
  • Option --no-exit-codes zum Weglassen der Exit-Code-Doku

--skill NAME --desc BESCHREIBUNG --category KATEGORIE

Generiert skills/<kategorie>/<name>/SKILL.md mit:

  • YAML-Frontmatter (name, category, description)
  • Usage-Sektion (CLI-Befehl, Skill-Config)
  • Implementation-Sektion
  • Verification-Sektion
  • Exit-Codes-Tabelle
  • JSON-Output-Beispiel

Kategorien: system, devops, security, software-development, autonomous-ai-agents, creative, desktop, email, github, imported, marketing, media, mlops, note-taking, productivity, research, smart-home, social-media

--plugin NAME

Generiert desktop-plugins/examples/<name>/ mit:

  • __init__.py (Plugin-Hooks: on_load, on_unload, execute + optionales CLI-Main)
  • plugin.yaml (Metadaten, Hooks, Tags)

--list

Listet alle verfügbaren Templates mit ihren Args, Typen und Dateien.

Exit Codes

CodeBedeutung
0Erfolg
1Fehler (Args, Exist)
2Schreibfehler
3Abhängigkeitsfehler

Templates

Die Templates sind als Dict im Code von scripts/code-generator.py eingebettet (Dict TEMPLATES). Roh-Kopien liegen in .code-generator/templates/ zur Referenz.

Verfügbare Templates:

  • script: Python-Script mit Shebang, Argparse, Exit-Codes, JSON-Output
  • skill: SKILL.md mit Frontmatter, Usage, Implementation, Verification
  • plugin: Desktop-Plugin mit __init__.py + plugin.yaml

JSON Output

Alle Modi unterstützen --json für maschinenlesbare Ausgabe:

{
  "tool": "code-generator",
  "version": "1.0.0",
  "status": "ok",
  "output": {
    "mode": "script",
    "name": "mein-tool",
    "path": "C:/.../scripts/mein-tool.py",
    "cron": "30min",
    "exit_codes": true
  }
}

Verification

# Test: Hilfe anzeigen
python scripts/code-generator.py --help

# Test: Script generieren
python scripts/code-generator.py --script test-tool --desc "Test Tool" --json

# Test: Skill generieren
python scripts/code-generator.py --skill test-skill --desc "Test Skill" --category system --json

# Test: Plugin generieren
python scripts/code-generator.py --plugin test-plugin --desc "Test Plugin" --json

# Test: Templates auflisten
python scripts/code-generator.py --list --json

# Aufräumen
rm -f scripts/test-tool.py
rm -rf skills/system/test-skill
rm -rf desktop-plugins/examples/test-plugin

Implementation

Script: scripts/code-generator.py Templates: .code-generator/templates/ Skill: skills/software-development/code-generator/SKILL.md

Das Tool verwendet:

  • argparse für CLI-Parsing (Mutually Exclusive Group für Modi)
  • textwrap.dedent für saubere Einrückung der Templates
  • pathlib.Path für Plattform-unabhängige Pfade
  • slugify() für konsistente Dateinamen
  • render_template() für {{placeholder}}-Ersetzung

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Build integrated IS/BS/CF financial workbooks in Excel.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

Run and grow the OpenAmer Agent-to-Agent swarm: identity, trust, node-to-node ask, signed skill/insight sharing, and the autonomous self-learning loop.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

Use for A/B experiments on OpenAmer configs and skills.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

Roleplay a hostile user to find and triage UX pain points.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

Agent mesh: master/worker nodes, HTTP delegation, heartbeat.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

Use for agentic commerce payments tasks. Candidate synthesized from trend radar; awaiting trial promotion.

The English summary is being prepared. Showing the original description.

openamer/openamer8Updated Oct 22, 2026

See all skills by openamer

Report a problem with this skill